LinHES Forums http://forum.linhes.org/ |
|
Linhes NFS sharing issues solved http://forum.linhes.org/viewtopic.php?f=6&t=15781 |
Page 1 of 1 |
Author: | alexvd [ Wed Jul 04, 2007 2:57 pm ] |
Post subject: | Linhes NFS sharing issues solved |
So I took a stab at trying to setup LinHes with NFS sharing. My first goal was to setup the mythtvslavefrontend to be able to view the videos, music and pictures on the mythtvmasterbackend. Right now I was going to have everything stored on the mythtvmasterbackend. However I would really like to be able to see everything on both. I don't think I setup permissions correctly. So please tell me if I missed something. I tried to use Cecils document and other posts but I think its all screwed up now. I saw another post on this where he referenced everything in linhes so I will try to do the same here. [b]On the slave backend in media settings>videos settings>general settings>directory to hold videos: Now changed to: /myth/video etc/hosts on mythtvmasterbackend root@mythtvmasterbackend:~# cat /etc/hosts 192.168.11.50 mythtvmasterbackend 192.168.11.52 mythtvslavefrontend # The following lines are desirable for IPv6 capable hosts # (added automatically by netbase upgrade) ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters ff02::3 ip6-allhosts /etc/fstab on mythtvmasterbackend root@mythtvmasterbackend:~# cat /etc/fstab # /etc/fstab: filesystem table. /dev/hda1 / ext3 defaults,errors=remount-ro 0 1 /dev/hda3 /myth ext3 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 iso9660 defaults,ro,user,noexec,noauto 0 0 # Added by KNOPPIX /dev/hda2 none swap defaults 0 0 # Added by KNOPPIX /dev/hdb /media/hdb auto noauto,users,exec 0 0 # Added by KNOPPIX /dev/hdc /media/hdc auto noauto,users,exec 0 0 #mythtvslavefrontend:/myth /mnt/mythtvslavefrontend rsize=8192,wsize=8192,soft,nf svers=3 /etc/exports on mythtvmasterbackend root@mythtvmasterbackend:~# cat /etc/exports # /etc/exports: the access control list for filesystems which may be exported # to NFS clients. See exports(5). # # Example for NFSv2 and NFSv3: # /srv/homes hostname1(rw,sync) hostname2(ro,sync) # # Example for NFSv4: # /srv/nfs4 gss/krb5i(rw,sync,fsid=0,crossmnt) # /srv/nfs4/homes gss/krb5i(rw,sync) /myth sbe(rw,no_root_squash,async,no_subtree_check) contents of /mnt on mythtvmasterbackend root@mythtvmasterbackend:/mnt# ls hdb hdc music mythtvslavefrontend video /etc/hosts on mythtvslavefrontend root@mythtvslavefrontend:~# cat /etc/hosts 127.0.0.1 mythtvslavefrontend localhost 192.168.11.52 mythtvslavefrontend 192.168.11.50 mythtvmasterbackend # The following lines are desirable for IPv6 capable hosts # (added automatically by netbase upgrade) ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters ff02::3 ip6-allhosts /etc/fstab on mythtvslavefrontend # /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 iso9660 defaults,ro,user,noexec,noauto 0 0 # Added by KNOPPIX /dev/hda2 none swap defaults 0 0 mythtvmasterbackend:/myth /myth nfs rsize=8192,wsize=8192,hard,intr,nfsvers=3 /etc/exports on mythtvslavefrontend # /etc/exports: the access control list for filesystems which may be exported # to NFS clients. See exports(5). # # Example for NFSv2 and NFSv3: # /srv/homes hostname1(rw,sync) hostname2(ro,sync) # # Example for NFSv4: # /srv/nfs4 gss/krb5i(rw,sync,fsid=0,crossmnt) # /srv/nfs4/homes gss/krb5i(rw,sync) # /myth *(rw) ~/.mythtv/mysql.txt on mythtvslavefrontend root@mythtvslavefrontend:~# cat ~/.mythtv/mysql.txt DBHostName=192.168.11.50 DBUserName=mythtv DBPassword=mythtv DBName=mythconverg DBType=QMYSQL3 # Set the following if you want to use something other than the # machine's real hostname for identifying settings in the database. # This is useful if your hostname changes often, as otherwise # you'll need to reconfigure mythtv (or futz with the DB) every time. # TWO HOSTS MUST NOT USE THE SAME VALUE # LocalHostName=mythtvslavefrontend # If you want your frontend to be able to wake your MySQL server # using WakeOnLan, have a look at the following settings: # # Set the time the frontend waits (in seconds) between reconnect tries. # This should be the rough time your MySQL server needs for startup #WOLsqlReconnectWaitTime=0 # # # This is the amount of retries to wake the MySQL server until the frontend # gives up #WOLsqlConnectRetry=5 # # # This is the command executed to wake your MySQL server. #WOLsqlCommand=echo 'WOLsqlServerCommand not set' cat /etc/mythtv/mysql.txt on mythtvslavefrontend root@mythtvslavefrontend:~# cat /etc/mythtv/mysql.txt DBHostName=192.168.11.50 DBUserName=mythtv DBName=mythconverg DBPassword=mythtv[code][/code] |
Author: | cahlfors [ Thu Jul 05, 2007 7:31 am ] |
Post subject: | |
One thing you could do to protect your recordings etc is to rsync the /myth directory to a separate drive (internal or usb) once in a while. Since you do want the database to be backed up too, it would make sense to stop the backend, run mythbackup, rsync and then restart the backend. This could be scripted if you like. It's very important to keep the owner/group on all the files (rsync -av) and this is easy to do when staying in one system. If you are unwilling to stop the backend, you could let mysql export its backups to a second system as described here: http://www.mythtv.org/wiki/index.php/Us ... aintenance rsync would not be able to copy any open files, but I think that would not be a problem as long as you get the database copied. This is a very low tech solution, of course, and it would not save you from a reinstall in worst case, but your content would be safe. ![]() Cheers, /Chris |
Author: | alexvd [ Thu Jul 05, 2007 8:00 am ] |
Post subject: | |
Thanks I will look into doing this. I know that rsync is very powerful way to copy and backup files remotely. I still havent learned how to use it completely yet. |
Author: | tjc [ Thu Jul 05, 2007 5:30 pm ] |
Post subject: | |
I do something like this to copy everything to the locally mounted backup disk: Code: find / -type f -name '*~' -print | xargs rm find /myth/tmp -type f -print | xargs rm /usr/local/bin/mythbackup && /usr/bin/rsync -av --delete /myth /backup For a remote disk I'd probably make the last line something like: Code: /usr/bin/rsync -ave /usr/bin/ssh --delete /myth USER@HOST:/backup
Where USER and HOST were the remote account you're copying to. I actually do this using a slightly more sophisticated script, but the rest of the details are pretty specific to my machine setup. |
Author: | alexvd [ Thu Jul 05, 2007 6:18 pm ] |
Post subject: | |
TJC thanks for the advice. Can you help me figure out why I cant seem to setup the media shares on my masterbackend. When I try to use the video manager it lists no files on the slave frontend. If i goto the frontend on the masterbackend it sees the all the movies in the video folder. I just need you to look at the entries. I think where I have screwed up is the where the symbolic links are pointing and the fstab entries. |
Author: | willem [ Fri Jul 06, 2007 12:41 am ] |
Post subject: | |
Couple of things I noticed: On the masterbackend you have a /myth partition (which is exported with NFS) and a video directory under /mnt. You probably want to make sure that all media files reside under /myth (is probably the largest partition anyway). Another thing on the masterbackend is that in the /etc/exports file you only export the /myth directory to a host called sbe. That host is probably taken from the example and isn't in your network. You probably want to replace sbe with mythslavefrontend. Lastly you mount the exported /myth from the masterbackend under /myth on the slavefrontend. Nothing wrong with that, but then you also need to specify /myth/video as the location of where videofiles reside (after having moved the video directory from /mnt to /myth on the masterbackend) in the settings. |
Author: | alexvd [ Fri Jul 13, 2007 1:58 pm ] |
Post subject: | |
Hi thanks for replying. I took some time off but now I am back to try and fix this. Yes all my media files are on the masterbackend right now in the /myth directory. Code: root@mythtvmasterbackend:~# cd /myth root@mythtvmasterbackend:/myth# ls archive gallery image_cache motion pretty streamtv tv backup games lost+found music stream tmp video root@mythtvmasterbackend:/myth# cd /myth/video root@mythtvmasterbackend:/myth/video# ls Dark Crystal cdrom Dungeons and Dragons (dvdrip) motion Heavy.Metal_1981.H.264_AVC_AAC_5.1_720x392 reign of fire The Sword and the Sorcerer [1982] {XviD} root@mythtvmasterbackend:/myth/video# I also changed the entry for the exports file on the masterbackend Code: root@mythtvmasterbackend:/etc# cat /etc/exports # /etc/exports: the access control list for filesystems which may be exported # to NFS clients. See exports(5). # # Example for NFSv2 and NFSv3: # /srv/homes hostname1(rw,sync) hostname2(ro,sync) # # Example for NFSv4: # /srv/nfs4 gss/krb5i(rw,sync,fsid=0,crossmnt) # /srv/nfs4/homes gss/krb5i(rw,sync) /myth mythtvslavefrontend(rw,no_root_squash,async,no_subtree_check) So you last comment I am confused with. I think you are saying that I have the symbolic link for videos on the slavefrontend pointing to the exported /myth from the backend. This is ok but I have to make sure that all the media files are in the /myth/video on the backend not in /mnt/. Is that right? If so everything is setup right Afaik know but its not working. One question I have is somewhere I read somebody saying that since they wanted to store all files centrally on the backend to comment out the fstab entry on the frontend to mount the /myth directory locally. I thought this was initially what I wanted but I wonder if this is screwing me up. Looking below should I have the /dev/hda3 /myth auto defaults, auto 0 2 commented out? Code: root@mythtvslavefrontend:~# cat /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 iso9660 defaults,ro,user,noexec,noauto 0 0 # Added by KNOPPIX /dev/hda2 none swap defaults 0 0 mythtvmasterbackend:/myth /mnt/mythtvmasterbackend nfs rsize=8192,wsize=8192,hard,intr,nfsvers=3 |
Author: | willem [ Mon Jul 16, 2007 2:37 am ] |
Post subject: | |
You're getting close! What I meant in my last comment was that you need to be consistent. I saw references to having the video directory on the slave under /mnt while you tried to mount it under /myth from the backend. Let's disregard that now and move on to the current situation. You have correctly uncommented the local /myth mount (so the /dev/hda3 partition is not mounted there). The only thing to change now is the last line of your /etc/fstab. Change: Code: mythtvmasterbackend:/myth /mnt/mythtvmasterbackend nfs rsize=8192,wsize=8192,hard,intr,nfsvers=3 into: Code: mythtvmasterbackend:/myth /myth nfs rsize=8192,wsize=8192,hard,intr,nfsvers=3
And it gets mounted under /myth instead of /mnt/mythtvmasterbackend. You can also leave your /etc/fstab alone, but then in the mythtv setup screens you need to specify the correct pathnames all prefixed with /mnt/mythtvmasterbackend. But again this last comment might be confusing... ![]() |
Author: | alexvd [ Mon Jul 16, 2007 10:51 am ] |
Post subject: | |
Willem Thanks I came to the same conclusions over the weekend. I tried to just leave it with the way it was setup as is. I actually had a error in my fstab line that is now fixed. So my last line in /etc/fstab on my mythtvslavefrontend is Code: mythtvmasterbackend:/myth /mnt/mythtvmasterbackend nfs rsize=8192,wsize=8192,hard,intr,nfsvers=3
I changed in media settings=> general the directory to hold videos on the mythtvslavefrontend to /mnt/mythtvmasterbackend/video I guess I will try your suggested changes but boy I don't know why this is so hard. I have done it before. It is still not working. |
Author: | alexvd [ Mon Jul 16, 2007 10:58 am ] |
Post subject: | |
Sorry I spoke to soon. I do see the files when I goto watch videos. However I dont see them when I use the video manager. I guess video manager only scans files on the local machine right. Sorry for all the confusion. |
Page 1 of 1 | All times are UTC - 6 hours |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |