LinHES Forums
http://forum.linhes.org/

Solved: Connecting remote drives/directories
http://forum.linhes.org/viewtopic.php?f=5&t=19346
Page 1 of 1

Author:  bigbro [ Wed Dec 17, 2008 1:42 pm ]
Post subject:  Solved: Connecting remote drives/directories

I am having an issue with getting Storage groups to work. I think it is a linux mapping issue for the drives in question.

I have 1 MBE/FE, and 2 SBE/FE but all the storage is on the MBE.

I have always followed the LinHes instructions and now am on R5.5.
With that I got rid of my LVM storage and have reconnected the drives on the MBE as individual locations.

They are /myth/tv, /myth/tv1, /myth/tv2

They work as storage groups on the MBE in that it will places files from it's tuner on any of the 3 locations and any files record to them from any of my BE's are available on any of the frontends.

However, I can only get the SBE to place files onto the /myth/tv or primary file location.

Another issue that arises and this is where i believe it is a Linux permission issue is transcode jobs. Anything that is housed on /myth/tv1 or /myth/tv2 will not transcode from one of the SBE's it seems to be an error in ability to write to the file.

On the MBE in /myth abbreviated for space.
Code:
dadstoy1@mythtv:/myth$ ls -al
total 228
drwxr-xr-x 22 root     root      4096 Nov 15 17:49 .
drwxr-xr-x 27 root     root      4096 Nov 16 09:32 ..
drwxrwxr-x  2 mythtv   mythtv   36864 Dec 17 09:59 tv
drwxrwxr-x  3 mythtv   mythtv   24576 Dec 16 21:02 tv1
drwxrwxr-x  3 mythtv   mythtv   28672 Dec 17 07:15 tv2

and of course those directories have files.

On one sbe (both produce the same) at /mnt
Code:
dadstoy1@mythtv_sbe:/mnt$ ls -al
total 12
drwxr-xr-x  3 root root 4096 Dec  7 16:26 .
drwxr-xr-x 26 root root 4096 Sep 21 14:04 ..
lrwxrwxrwx  1 root root   12 Sep 21 16:46 music -> mythtv/music
drwxr-xr-x 22 root root 4096 Nov 15 17:49 mythtv
lrwxrwxrwx  1 root root    9 Dec  7 16:26 tv -> mythtv/tv
lrwxrwxrwx  1 root root   10 Nov 17 11:48 tv1 -> mythtv/tv1
lrwxrwxrwx  1 root root   10 Nov 17 11:48 tv2 -> mythtv/tv2
lrwxrwxrwx  1 root root   12 Sep 21 16:46 video -> mythtv/video


Then at /mnt/mythtv
Code:
dadstoy1@mythtv_sbe:/mnt/mythtv$ ls -al
total 204
drwxr-xr-x 22 root     root      4096 Nov 15 17:49 .
drwxr-xr-x  3 root     root      4096 Dec  7 16:26 ..
drwxrwxr-x  2 mythtv   mythtv   36864 Dec 17 09:59 tv
drwxr-xr-x  2 root     root      4096 Nov 15 17:49 tv1
drwxrwxr-x  3 mythtv   mythtv   24576 Nov 23 16:46 tv2
drwxr-xr-x  2 root     root      4096 Nov 15 17:49 tv3


If I pull a directory listing on an SBE at /mnt/mythtv/tv I see the files that are in my mbe at /myth/tv. That is correct.

If I pull a directory listing on an SBE at /mnt/mythtv/tv1 or tv2. I see either nothing.

I am thinking I did some step incorrectly here.

Any help is appreciated as a lot of recordings especially over the holidays are getting delegated to Tuner 2-4 and that primary drive is getting full...

TIA

Author:  bigbro [ Thu Dec 18, 2008 9:34 am ]
Post subject: 

Additional Observations.

Digging around to find answers to this.
When I look at the webmin tool using the Filemanager I see the following.

On my MBE/FE where the drives are physically located and setup
the drives show as mythtv user and group with Octal permissions of 0775.
This is the same for all the TV file points.

On either of my SBE/FE the locations are mounted at and show the following:
/mnt/mythtv/tv mythtv mythtv Octal 0775
/mnt/mythtv/tv1 root root Octal 0755
/mnt/mythtv/tv2 mythtv mythtv Octal 0775

As before I can only write TV captures from the SBE/FE to /mnt/mythtv/tv.
and when I try to view files in the /mnt/mythtv/tv1 or tv2 directories there is nothing there. Yet I can play them back from anywhere and physically view them on the MBE/FE

It almost acts like I have done something funky with my mount points?

Author:  bigbro [ Mon Dec 22, 2008 5:25 pm ]
Post subject: 

Bump

What do I need to do so that I can get the two SBE's able to write to /myth/tv1 and /myth/tv2?

Anyone?

Author:  nigelpearson [ Tue Dec 23, 2008 4:54 am ]
Post subject: 

Export those filesystems from your MBE, and mount them on your SBEs. You can do it via NFS (see http://www.knoppmythwiki.org/index.php? ... ckendHowTo and http://www.knoppmythwiki.org/index.php?page=NFSHowTo), or Samba (smbmount).

Author:  bigbro [ Tue Dec 23, 2008 2:33 pm ]
Post subject: 

Thanks Nigel

I have looked those over and made some changes but so far no joy.
I added the specific mounts in my /etc/exports file.
it was /myth *(rw)
it now has /myth/tv1 *(rw) and /myth/tv2 *(rw) in addition to the original.

Seems redundant but after a restart of NFS it didn't change anything.

I checked my Samba mount points and I can write files and move them around fine from a Windoze machine.

I am wondering when I attach via Samba it uses the mythtv username and password pair. Besides the issue I see with how these show up via webmin or though the console is there something I am missing.

I need to go move some snow around the farm right now, but I will be back later this afternoon.

Author:  nigelpearson [ Thu Dec 25, 2008 3:40 am ]
Post subject: 

OK. NFS can be tricky to get working. My server reports:
Code:
nigel@mythtv-server:~$ exportfs -v
/               macaque(ro,wdelay,insecure,root_squash)
/               mythtv-server(ro,wdelay,root_squash)
/myth           <world>(rw,wdelay,root_squash)

but a different server doesn't list any exports.

So, it might be easier to use Samba, but I don't understand your question. Yes, it uses the default mythtv user/password. So, on your SBEs, you would do:
Code:
smbmount //mythtv-server/myth /remotemyth -o username=mythtv,password=mythtv


Once you have got that working manually, than you could put a script in /etc/init.d to mount the filesystem each time the SBE boots

Author:  bigbro [ Sun Dec 28, 2008 7:51 pm ]
Post subject: 

Sorry it has taken me so long to get back to you. We got a major dump of snow and lost some power and my DSL for a while.
Back now.

I ran the code you suggested that check my NFS exports.

Here is my results.
Code:
dadstoy1@mythtv:~$ exportfs -v
/myth/tv1       <world>(rw,wdelay,root_squash,no_subtree_check)
/myth/tv2       <world>(rw,wdelay,root_squash,no_subtree_check)
/myth           <world>(rw,wdelay,root_squash,no_subtree_check)


It is interesting to note that the two I am having trouble with are listed first in the reference.

When I look at /etc/exports
Code:
nano /etc/exports
/myth   *(rw)
/myth/tv1 *(rw)
/myth/tv2 *(rw)


As you see it lists them in the opposite order.

While they appear to be exported is there a possibility they are exporting before /myth is ready and as such I appear to be losing the actual permissions on them?

Edited: 12/30/08 0744pst. I confirmed that they are being loaded in the correct order. Message in Syslog is as follows
Code:
Dec 30 07:25:39 mythtv kernel: Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
Dec 30 07:25:40 mythtv exportfs[3479]: /etc/exports [1]: Neither 'subtree_check' or 'no_subtree_check' specified for export "*:/myth".   Assuming default behaviour ('no_subtree_check').   NOTE: this default$
Dec 30 07:25:40 mythtv exportfs[3479]: /etc/exports [2]: Neither 'subtree_check' or 'no_subtree_check' specified for export "*:/myth/tv1".   Assuming default behaviour ('no_subtree_check').   NOTE: this def$
Dec 30 07:25:40 mythtv exportfs[3479]: /etc/exports [3]: Neither 'subtree_check' or 'no_subtree_check' specified for export "*:/myth/tv2".   Assuming default behaviour ('no_subtree_check').   NOTE: this def$
Dec 30 07:25:40 mythtv kernel: NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory
Dec 30 07:25:40 mythtv kernel: NFSD: starting 90-second grace period


any ideas on where to look next?

TIA

Author:  bigbro [ Tue Dec 30, 2008 11:58 am ]
Post subject: 

Some thing has changed.

Here is what I did.
I changed /etc/exports from the above export to the following.
Code:
nano /etc/exports
/myth /myth/tv1 /myth/tv2 *(rw)


That did not work I was getting an error that /myth/tv1 was invalid and it would just stop.
So I switched it back to the original above.

Now from the sbe's I can list and read files that are in tv1 and tv2 correctly.

doing some investigating
Code:
dadstoy1@mythtv_sbe:/mnt$ ls -al
total 12
drwxr-xr-x  3 root root 4096 Dec 17 12:02 .
drwxr-xr-x 26 root root 4096 Sep 21 14:04 ..
lrwxrwxrwx  1 root root   12 Sep 21 16:46 music -> mythtv/music
drwxr-xr-x 22 root root 4096 Nov 15 17:49 mythtv
lrwxrwxrwx  1 root root    9 Dec  7 16:26 tv -> mythtv/tv
lrwxrwxrwx  1 root root    9 Dec 17 12:02 tv1 -> mythv/tv1
lrwxrwxrwx  1 root root   10 Nov 17 11:48 tv2 -> mythtv/tv2
lrwxrwxrwx  1 root root   12 Sep 21 16:46 video -> mythtv/video

That stayed the same.

At /mnt/mythtv
Code:
dadstoy1@mythtv_sbe:/mnt/mythtv$ ls -al
total 240
drwxr-xr-x 22 root     root      4096 Nov 15 17:49 .
drwxr-xr-x  3 root     root      4096 Dec 17 12:02 ..
drwxrwxr-x  2 mythtv   mythtv   36864 Dec 30 09:32 tv
drwxrwxr-x  3 mythtv   mythtv   32768 Dec 30 08:59 tv1
drwxrwxr-x  3 mythtv   mythtv   32768 Dec 30 08:59 tv2

This definitely changed from before.

I still don't appear to be able to write to tv1 or tv2 but I can read from theme and I will keep trying.

Author:  bigbro [ Tue Dec 30, 2008 7:51 pm ]
Post subject: 

Well I am part way to the solution.
Not exactly sure what is fixing it.

On first sbe, I removed the Symlinks in /mnt that said tv1 -> mythtv/tv1 and same for tv2 -> mythtv/tv2

Then I put in the storage groups section /mnt/mythtv/tv1 and /mnt/mythtv/tv2

It took those and now it writes to the other directories as Storage Groups should work writing files from that capture card to the drive that has the most available space.

Now I tried to replicate exactly what I have done on my second sbe. So far it is acting the same as the first one. Fortunately, these two tuners only come up when absolutely necessary.

Author:  bigbro [ Mon Jan 12, 2009 8:46 pm ]
Post subject: 

Well I now have 1 MBE/FE and 2 SBE/FE reading and writing to all of the TV directories and using the Storage Groups algorythms properly.

Here is what I had to do.

Once I had exported the directories, for some reason I had to completely list the paths for them in each of the SBE /etc/fstab.

They now look like this.
Code:
#nano /etc/fstab
# /etc/fstab: filesystem table.
#
# filesystem  mountpoint  type  options  dump  pass
/dev/hda1  /  ext3 defaults,errors=remount-ro  0  1
/dev/hda3  /myth  auto  defaults,auto  0  2

proc  /proc  proc  defaults  0  0
/dev/fd0  /floppy  vfat  defaults,user,noauto,showexec,umask=022  0  0
usbfs  /proc/bus/usb  usbfs  devmode=0666  0  0
sysfs  /sys  sysfs  defaults  0  0
tmpfs  /dev/shm  tmpfs defaults  0  0
/dev/cdrom /cdrom  auto  defaults,ro,user,noexec,noauto  0  0
# Added by KNOPPIX
/dev/hda2 none swap defaults 0 0
mythtv:/myth /mnt/mythtv nfs rsize=8192,wsize=8192,soft,nfsvers=3
mythtv:/myth/tv1 /mnt/mythtv/tv1 nfs rsize=8192,wsize=8192,soft,nfsvers=3
mythtv:/myth/tv2 /mnt/mythtv/tv2 nfs rsize=8192,wsize=8192,soft,nfsvers=3


Then in the setup for Storage directories in the Default Storage group
I have them as:
Code:
/mnt/mythtv/tv
/mnt/mythtv/tv1
/mnt/mythtv/tv2


That makes it work.

I suppose I could have also pointed the fstab mounts to just the /mnt/tv and then had the Storage directory say the same.
So the fstab would have said something like.

mythtv:/myth/tv1 /mnt/tv1 nfs rsize=8192,wsize=8192,soft,nfsvers=3

and my Storage Directory would have then been /mnt/tv1

That would be repeated for tv2, etc.
Since /mnt/tv1 is symlinked to /mnt/mythtv/tv1 it should work.

Maybe in the future when I have some time I will look at that but for now it works.

Now that I have it working, I have another Disk to add and then transfer all my saved videos back over to the box. Got to make sure that I reserve enough space for her videos. But that would be another thread.

It has been an experience and a learning path.

Thanks for pointing me in the right direction.

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/