August 22, 201015 yr Would it be possible for unRAID to offer nfs sharing of the flash device as a standard option rather than forcing us to use smb?
September 22, 201015 yr You can export it by yourself anytime by adding to your go script (or executing) two lines like: echo \"/boot \" '-async,no_subtree_check,anongid=0,anonuid=0,all_squash' '*(rw)' >>/etc/exports; /usr/sbin/exportfs -r ;
January 7, 201115 yr I wasn't 100% clear on this. Should I add to my go script or are you saying I can EITHER add something to my go script or run these two lines? It looks like this is trying to add something to a file named exports but I searched and could not find a file named exports on my flash drive. Am I missing something? I don't want to run this every time I restart unraid, does that mean I need to use the go script solution (of the two possibilities you suggested) or is running this command once permanent? I don't mean to be dense here but it was a bit confusing when you said either use method 1 or method 2 like this (example 1). Are you saying your example works for both command line AND the go script? I went ahead and tried adding this to my go script and rebooted my unraid server but I cannot see a share named flash in /mnt or /mnt/user. #added insecure to allow login from a mac. echo \"/boot \" '-async,no_subtree_check,anongid=0,anonuid=0,all_squash' '*(rw,insecure)' >>/etc/exports; /usr/sbin/exportfs -r ; All of my other nfs shares map correctly but I would like to be able to map the flash drive as well so my mac can backup my flash drive configuration. So far the only way I have been able to access the flash share is using smb but that has proved problematic as it seems to get disconnected occasionally and unlike nfs won't reconnect automatically when I next try to use it. Just so I can get an idea of what is going on and help myself more easily in the future, why is it that I cannot find this exports file on my flash drive and just modify it directly? Is it recreated every restart?
January 7, 201115 yr Press Cmd-Shift-G in the Finder and type /net/<name-of-unraid-server>/mnt then you should see boot listed along other exports you have. Double click it to open it. The file is in /etc/exports and yes, it is recreated every time the server boots as /etc is in memory. If you change it by hand you should invoke exportfs -r after changing it. Just exportfs lists exported NFS shares on your unRAID server.
January 7, 201115 yr I found my unraid server in finder using /net/TOWER/mnt but there is no boot share there, only cache, disk1, disk2, disk3, user. I also ran exportfs to show the shares and it does show boot, here is the result: /mnt/user/Downloads <world> /mnt/user/music <world> /mnt/user/photo <world> /mnt/user/video <world> /mnt/user/data <world> /mnt/disk1 <world> /mnt/disk2 <world> /mnt/disk3 <world> /mnt/cache <world> /boot <world> Looking at this made me think boot was in /net/TOWER (not mnt) so I typed that in finder and see boot but when I double click it I can't actually open it, it complains about the alias. All of the other shares work. Do I need to get it into /mnt somehow? I definitely want to do this in my go script so I don't have to mess with it in the future. Is it possible I am putting it in the wrong place in my go script (too early or late)?
January 7, 201115 yr After over an hour of messing with this and having my girlfriend wish I had my synology box back I'm giving up for the night. I'll try again tomorrow. Weird that something that so easy out of the box with smb is so arcane with nfs. I did see what appeared to be an extra trailing space after /boot which I removed but that made no difference. I tried moving it up and down in my go script with no luck. I ended up doing a lot of reboots trying various combinations as I just could not figure out how to save a file in vi when trying to edit exportfs directly in putty (not accessible through the web interface or over the network that I could see). Anyone have tips on editing a text file from the command line? I looked up vi documentation which said to use :q! to save the file and close after I had made my changes but the changes just wouldn't stick.
January 7, 201115 yr Anyone have tips on editing a text file from the command line? You can open midnight commander (type mc at the command prompt) and you can edit files in it. I looked up vi documentation which said to use :q! to save the file and close after I had made my changes but the changes just wouldn't stick. You must have read something wrong as :q! is 'quit and ignore changes'. Take a look at this vi cheat sheet link.
January 7, 201115 yr I looked up vi documentation which said to use :q! to save the file and close after I had made my changes but the changes just wouldn't stick. :q = quit (without saving changes) this command will not work if changes have been made. :w = write changes, but do not quit the editor. :q! = quit (without saving changes) even if the file has been changed :wq = write changes and then quit You specifically told vi to quit and not save your changes. You can learn basic "vi" in about 10 minutes. You might master "most" of what it offers in a few years. (It can do almost anything, except perhaps make coffee. I've been using it since the early 80s...) If you think "vi" is difficult for a beginner, try "emacs" To save changes and exit emacs the key sequence is Control-X Control-C Immediately intuitive, even for a newbie. Joe L.
January 7, 201115 yr The reason 'flash' is not exported via NFS is this note in the NFS HowTo: Second, it is a poor idea to export a FAT or VFAT (i.e., MS-DOS or Windows 95/98) filesystem with NFS. FAT is not designed for use on a multi-user machine, and as a result, operations that depend on permissions will not work well. Moreover, some of the underlying filesystem design is reported to work poorly with NFS's expectations. I didn't investigate the matter further, it's quite possible this is nonsense. Anyway, if someone can point to contrary evidence that no corruption can occur on the flash via NFS prototcol, I'd be happy to include it.
January 7, 201115 yr You can get smb mounts to reappear every time on a mac by dragging the share icon from the finder to your login items in preferences.
January 7, 201115 yr You can export it by yourself anytime by adding to your go script (or executing) two lines like: echo \"/boot \" '-async,no_subtree_check,anongid=0,anonuid=0,all_squash' '*(rw)' >>/etc/exports; /usr/sbin/exportfs -r ; Press Cmd-Shift-G in the Finder and type /net/<name-of-unraid-server>/mnt then you should see boot listed along other exports you have. Double click it to open it. The file is in /etc/exports and yes, it is recreated every time the server boots as /etc is in memory. If you change it by hand you should invoke exportfs -r after changing it. Just exportfs lists exported NFS shares on your unRAID server. This works perfectly for me, however I am not using insecure on unRAID but have configured the automounter on SL (Mac OS X 10.6.5) to use secure ports. To do this put the following lines (as root or by using sudo) in those files and reboot your Mac client (or restart respective processes). in /etc/auto_master: # change the line for /net with this one /net -hosts -nobrowse,nosuid,resvport,intr in /etc/autofs.conf: # change the line for AUTOMOUNTD_MNTOPTS with this one AUTOMOUNTD_MNTOPTS=nosuid,nodev,resvport,intr
January 8, 201115 yr You can get smb mounts to reappear every time on a mac by dragging the share icon from the finder to your login items in preferences. I have tried this and while the drives do automount that way every time I reboot my mac I always end up losing them whenever I have to reboot my unraid server or switch. The nice thing about nfs is that it auto mounts whenever you try to access the share, not just when the computer is rebooted. Well that and get 30MB/s better performance over nfs than SMB, I was blown away by how much faster it is. Not really important in this one use case, I just want it auto backed up via crashplan and while crashplan is backing up all of my nfs shares correctly it keeps losing my smb shares.
January 8, 201115 yr You can export it by yourself anytime by adding to your go script (or executing) two lines like: echo \"/boot \" '-async,no_subtree_check,anongid=0,anonuid=0,all_squash' '*(rw)' >>/etc/exports; /usr/sbin/exportfs -r ; Press Cmd-Shift-G in the Finder and type /net/<name-of-unraid-server>/mnt then you should see boot listed along other exports you have. Double click it to open it. The file is in /etc/exports and yes, it is recreated every time the server boots as /etc is in memory. If you change it by hand you should invoke exportfs -r after changing it. Just exportfs lists exported NFS shares on your unRAID server. This works perfectly for me, however I am not using insecure on unRAID but have configured the automounter on SL (Mac OS X 10.6.5) to use secure ports. To do this put the following lines (as root or by using sudo) in those files and reboot your Mac client (or restart respective processes). in /etc/auto_master: # change the line for /net with this one /net -hosts -nobrowse,nosuid,resvport,intr in /etc/autofs.conf: # change the line for AUTOMOUNTD_MNTOPTS with this one AUTOMOUNTD_MNTOPTS=nosuid,nodev,resvport,intr Thanks for the tips, I'll have to read up on this and see if I can find a way to make it work. No luck so far but it appears you are using a different technique than I am. I went to disk utility > nfs mounts gui and setup my nfs automounting there. It works perfectly except for the boot/flash drive. I am about to give up on this, I'm sure it can be made to work eventually but really how many hours of my time is it worth? I knew going into unraid that everything would be hard but this is still a bit shocking. Just a reboot is hit and miss. It's a one trick pony to be sure, one great trick, but feels about 10 years behind the times in every other area. Taking a step back, my goal wasn't just to share the boot drive, that was just one possible solution to my goal of backing up the flash drive. I'm thinking an easier implementation might be to just copy the flash contents to one of the nfs shares that works properly on a scheduled basis. Is that a reasonable next attempt and if so is there a script to do this already? My thinking here is that once this is all setup I won't mess with it for a few years. If something goes wrong I don't want it to take a week and 10 forum posts to get it up and running again so at least if I am going to spend the effort to configure everything correctly this time I would like to make it really easy to restore if something goes wrong which is why backup of the flash contents feels so important to me. I already back them up manually by shutting down the server whenever I make a change and copying it on my laptop but that is just a really poor solution, there has to be an easier method of online automatic backup that I am missing. I happened to think that method was sharing the flash drive via smb but that kept failing after a day or two. Then I thought the solution was to share it via nfs since that was more robust but that is obviously hit and miss since it works for starcat yet the same command copied and pasted into my environment fails for me. Given all of that I am open to suggestions. Is there a better way or is this just something that is fundamentally difficult to do in an unraid environment? With all of the focus on data availability I would have thought this would be the easiest thing there was to setup but day after day I am failing at finding a workable solution and the constant rebooting of unraid to test things out is not making my girlfriend happy when my constant failed attempts to get this going keep interrupting her media consumption. What are you guys all doing to solve handle this in your own setups?
January 8, 201115 yr The reason 'flash' is not exported via NFS is this note in the NFS HowTo: Second, it is a poor idea to export a FAT or VFAT (i.e., MS-DOS or Windows 95/98) filesystem with NFS. FAT is not designed for use on a multi-user machine, and as a result, operations that depend on permissions will not work well. Moreover, some of the underlying filesystem design is reported to work poorly with NFS's expectations. I didn't investigate the matter further, it's quite possible this is nonsense. Anyway, if someone can point to contrary evidence that no corruption can occur on the flash via NFS prototcol, I'd be happy to include it. If corruption is the issue would you be able to include it read only? If I am manually updating I can simply do it via smb if necessary, at least for my specific need I just need reliable read only access which I am not getting over smb.
January 8, 201115 yr Ok, try mounting it manually, this should work directly without any other precautions: on unRAID: echo \"/boot \" '-async,no_subtree_check,anongid=0,anonuid=0,all_squash' '*(rw)' >>/etc/exports; /usr/sbin/exportfs -r ; on your Mac: mkdir /Volumes/Flash; sudo mount -t nfs -o nosuid,resvport,intr tower:/boot /Volumes/Flash; Susbstitute tower above with the IP address of your unRAID server. Also sudo will ask you for the administrator password on your Mac.
January 8, 201115 yr If corruption is the issue would you be able to include it read only? If I am manually updating I can simply do it via smb if necessary, at least for my specific need I just need reliable read only access which I am not getting over smb. Why do you want readonly mount via NFS? Is this for backup purposes?
January 8, 201115 yr Yes, it is 100% for backup purposes. I would like CrashPlan on my mac to automatically backup my unraid flash drive in case something happens where I mess up my configuration.
January 8, 201115 yr Ok, try mounting it manually, this should work directly without any other precautions: on unRAID: echo \"/boot \" '-async,no_subtree_check,anongid=0,anonuid=0,all_squash' '*(rw)' >>/etc/exports; /usr/sbin/exportfs -r ; on your Mac: mkdir /Volumes/Flash; sudo mount -t nfs -o nosuid,resvport,intr tower:/boot /Volumes/Flash; Susbstitute tower above with the IP address of your unRAID server. Also sudo will ask you for the administrator password on your Mac. I tried this by logging in via putty and doing absolutely nothing but pasting in the first line and hitting enter, then pasting the second line and pressing enter. After the second line I get an error that /boot does not exist. Here is exactly what I see in putty. Linux 2.6.32.9-unRAID. root@Tower:~# echo \"/boot \" '-async,no_subtree_check,anongid=0,anonuid=0,all_squash' '*(rw)' >>/etc/exports; root@Tower:~# /usr/sbin/exportfs -r ; exportfs: Warning: /boot does not exist root@Tower:~#
January 8, 201115 yr No problem. Linux 2.6.32.9-unRAID. root@Tower:~# df -k Filesystem 1K-blocks Used Available Use% Mounted on /dev/sdf1 3920896 336096 3584800 9% /boot /dev/sde1 488371640 728412 487643228 1% /mnt/cache /dev/md3 488371640 39402860 448968780 9% /mnt/disk3 /dev/md1 1465093832 557131824 907962008 39% /mnt/disk1 /dev/md2 1465093832 963062572 502031260 66% /mnt/disk2 shfs 3906930944 1560325668 2346605276 40% /mnt/user shfs 3418559304 1559597256 1858962048 46% /mnt/user0 root@Tower:~#
January 9, 201115 yr Can you post a "cat /etc/exports" and make sure there is only one entry for boot in there? Perhaps reboot and make sure you execute only once the above two commands (echo and exportfs); or put them in your /boot/config/go and reboot.
January 9, 201115 yr This is after a reboot and only executing those two lines. Linux 2.6.32.9-unRAID. root@Tower:~# cat /etc/exports # See exports(5) for a description. # This file contains a list of all directories exported to other computers. # It is used by rpc.nfsd and rpc.mountd. "/mnt/disk1" -async,no_subtree_check,anongid=0,anonuid=0,all_squash,fsid=11 *(rw,insecure) "/mnt/disk2" -async,no_subtree_check,anongid=0,anonuid=0,all_squash,fsid=12 *(rw,insecure) "/mnt/disk3" -async,no_subtree_check,anongid=0,anonuid=0,all_squash,fsid=13 *(rw,insecure) "/mnt/cache" -async,no_subtree_check,anongid=0,anonuid=0,all_squash,fsid=10 *(rw,insecure) "/mnt/user/Downloads" -async,no_subtree_check,anongid=0,anonuid=0,all_squash,fsid=100 *(rw,insecure) "/mnt/user/data" -async,no_subtree_check,anongid=0,anonuid=0,all_squash,fsid=102 *(rw,insecure) "/mnt/user/music" -async,no_subtree_check,anongid=0,anonuid=0,all_squash,fsid=103 *(rw,insecure) "/mnt/user/photo" -async,no_subtree_check,anongid=0,anonuid=0,all_squash,fsid=104 *(rw,insecure) "/mnt/user/video" -async,no_subtree_check,anongid=0,anonuid=0,all_squash,fsid=101 *(rw,insecure) "/boot " -async,no_subtree_check,anongid=0,anonuid=0,all_squash *(rw) root@Tower:~#
January 11, 201115 yr I gave up on this for now but for anyone else who tries to do this I'll post my workaround. I installed Microsoft SyncToy 2.1 on a windows computer in my house. I created a paired folder from the unraid flash drive to a folder in my documents with SyncToy set to "Echo" (one way sync only). I created a scheduled task to launch SyncToy daily with the -R parameter which will sync all paired folders. I set CrashPlan to backup the synced folder in my documents.
Archived
This topic is now archived and is closed to further replies.