How to setup NFS on new PogoPlug

This forum is for Marvell Kirkwood devices such as the GoFlex Home/Net, PogoPlug v1/v2, SheevaPlug, and ZyXEL devices.

How to setup NFS on new PogoPlug

Postby AnalogMan » Tue Jun 12, 2012 8:30 am

So, I've dealt with linux a bit in the past but this NFS business is confusing the heck out of me. For clarity sake I've reinstalled and updated my system. A list of steps I've done is below:

$this->bbcode_list('1')
  • Followed the instructions located at: http://archlinuxarm.org/platforms/armv5 ... 2-pinkgray to install archlinux to a 4GB flash drive inserted into the front port of my PogoPlug E02.
  • Next I updated the system using the commands from this page: http://www.archlinux.org/news/filesyste ... equired-1/
    $this->bbcode_second_pass_code('', 'pacman -Syu --ignore filesystem # Choose no if it asks to cancel current operation, yes to everything else
    rm -rf /var/run /var/lock
    pacman -S filesystem')
  • Then I setup ntpd for syncronizing my clock. First thing I did was edit /etc/rc.conf to set my time zone then followed the directions to install ntpd from here: http://archlinuxarm.org/support/guides/ ... irst-steps
  • Then I rebooted.

  • This is what I've accomplished so far. Now I need help with some things.
    $this->bbcode_list('1')
  • The pogoplug will not boot if I have any drives other than the boot USB key attached.
    EDIT* This seems to be resolved after redoing the system.
  • Auto mounting of drives. Drives added to fstab automount but I want to plug a drive in and have it mount automatically.
  • NFSv4 shares. My goal is it will share ANY HDD plugged into it to everyone without authorization. It's only being used for a home network with just myself.
  • Some questions I have are which filesystem should I format my drives to for best performance? One of them has to be capable of acting as a Time Machine backup for my Mac.
    AnalogMan
     
    Posts: 3
    Joined: Tue Jun 12, 2012 7:34 am

    Re: How to setup NFS on new PogoPlug

    Postby schn4rk » Wed Jun 13, 2012 12:12 am

    $this->bbcode_second_pass_quote('AnalogMan', 'A')uto mounting of drives. Drives added to fstab automount but I want to plug a drive in and have it mount automatically.

    $this->bbcode_second_pass_code('', 'pacman -S udev-automount')
    $this->bbcode_second_pass_quote('AnalogMan', 'N')FSv4 shares. My goal is it will share ANY HDD plugged into it to everyone without authorization. It's only being used for a home network with just myself.

    There are some instructions here: https://wiki.archlinux.org/index.php/NFSv4

    I am using NFSv4 to share media on my network. I had a helluva time setting it up so a few caveats:
    * Leave the domain in /etc/idmapd.conf as the default (I believe that's localdomain or similar). It needs to be the same domain as the clients and this should save you having to do more configuration than need be.
    * Remember to add "rpcbind nfs-common nfs-server" to your daemons in /etc/rc.conf
    * Make sure you use all the right options in your /etc/exports - I use rw,no_subtree_check,async,no_root_squash,nohide, insecure to make everything work right for my setup.

    $this->bbcode_second_pass_quote('AnalogMan', 'S')ome questions I have are which filesystem should I format my drives to for best performance? One of them has to be capable of acting as a Time Machine backup for my Mac.

    Ah. Here you may run into some problems if your Mac is running Lion. Lion is notoriously frustrating when it comes to SMB & NFS mounts. I have been able to get my NFS share mounting in Lion manually (always using the vers=4,resvport options) but not via "Connect to server" in the Finder, or through Disk Utility. I gather Disk Utility DOES work for many and is the easiest way to set up an NFS automount, ymmv.

    HOWEVER! And this is a big however: I just can't seem to make that share writable in Lion. Everything is set up properly at the server end and a linux client is able to access it properly as R/W. But no options on the Lion end seem to make the share properly writable. It's infuriating - I can even delete files from it using the Finder but can't save anything there.

    So, I strongly advise you to look for another solution for Time Machine backups. NFSv4 is brilliant as far as I'm concerned for sharing media to a Mac, but not for backups. Good luck :)
    schn4rk
     
    Posts: 20
    Joined: Mon Jan 09, 2012 8:55 am
    Top

    Re: How to setup NFS on new PogoPlug

    Postby AnalogMan » Wed Jun 13, 2012 5:48 am

    Thank you for your reply. I will be taking much of it into practice. For the time being I had setup SAMBA shares but the transfer speed is ridiculous! I only get 2MB/s max for my transfer speeds. That is unacceptable. I hope NFS gives a larger boost. Also, I noticed Windows has no real native NFS support, any tools you'd like to point me for when I get there?

    EDIT: Got NFS Setup (this is the third try and it went smooth as butter this time, wth) and I found a NFS client for Windows, though it only supports up to v3, not v4. Testing transfer speeds now.

    EDIT2: Alright, this is odd. Using the Windows client my speeds DROPPED to 1/4 of what they were. I was getting 500KB/s. On my Mac the transfer speed stayed the same at 1.5MB/s. Something has to be up with this because this doesn't seem right at all. I may reinstall my pogo from scratch and just leave SAMBA out of it entirely (until I try to setup AirPrint again).
    I have my HDD's formatted in ext3, is there a better filesystem that would work better?

    EDIT3: Just refreshed my system and NFS is the only thing on there besides openntp and webmin. Write speeds top out at about 1.8MB/s (copy to) and read speeds stop at 2.5MB/s (copy from). Am I missing something? I thought this was supposed to go much faster.
    Last edited by AnalogMan on Wed Jun 13, 2012 8:10 am, edited 1 time in total.
    AnalogMan
     
    Posts: 3
    Joined: Tue Jun 12, 2012 7:34 am

    Re: How to setup NFS on new PogoPlug

    Postby schn4rk » Wed Jun 13, 2012 7:17 am

    $this->bbcode_second_pass_quote('AnalogMan', 'T')hank you for your reply. I will be taking much of it into practice. For the time being I had setup SAMBA shares but the transfer speed is ridiculous! I only get 2MB/s max for my transfer speeds. That is unacceptable. I hope NFS gives a larger boost. Also, I noticed Windows has no real native NFS support, any tools you'd like to point me for when I get there?

    EDIT: Got NFS Setup (this is the third try and it went smooth as butter this time, wth) and I found a NFS client for Windows, though it only supports up to v3, not v4. Testing transfer speeds now.

    EDIT2: Alright, this is odd. Using the Windows client my speeds DROPPED to 1/4 of what they were. I was getting 500KB/s. On my Mac the transfer speed stayed the same at 1.5MB/s. Something has to be up with this because this doesn't seem right at all. I may reinstall my pogo from scratch and just leave SAMBA out of it entirely (until I try to setup AirPrint again).
    I have my HDD's formatted in ext3, is there a better filesystem that would work better?

    There's a few more likely bottlenecks you should investigate before you start worrying about the filesystem, I think.

    First and foremost - the Windows client. I don't use Windows at home so I'm afraid I don't have any specific recommendations, but from what I've heard, Windows NFS clients tend to leave a lot to be desired. What version of Windows are you running? You probably have a lot of googling in your immediate future to make sure you have the best client possible and have addressed any other issues on that side of things. :)

    Next, the Mac client. What version of OS X are you running? As I said earlier, Lion introduced some issues, not all of which I've been able to address myself. In any case, there are a heck of a lot of options you can use when mounting an NFS share, and you may find there is some improvement to be made there.

    You mention samba - yes, getting rid of that may help. You needn't start with a fresh install though, you can uninstall only samba using pacman. Don't forget to remove it from the startup daemons in your /etc/rc.conf - you could always just do that first and reboot to see if it helps.

    Make sure you take into consideration everything else that's running on your plug as well. Some processes can be substantially improved with a little tweaking. For example, if you're using any torrent clients or anything else that needs to encrypt traffic, you will probably see massive gains by installing openssl-cryptodev.

    Let us know how you go. Rest assured that you shouldn't need to reinstall the entire system unless you manage to really screw things up at any point! Arch is really nice in that you have so much control over what you add and remove to your system, and pacman I think does a great job of making everything relatively easy and safe :)
    schn4rk
     
    Posts: 20
    Joined: Mon Jan 09, 2012 8:55 am
    Top

    Re: How to setup NFS on new PogoPlug

    Postby AnalogMan » Wed Jun 13, 2012 12:40 pm

    Well, as I said I had just freshly installed it and I've done it enough I can do it in about 15 minutes so it's no big deal. Some investigating turned up a problem with the custom firmware I had loaded on my router (dd-wrt) and that it seemed to limit me to 30mbps. I flashed stock back on and speeds improved but not by much:

    2.8MB/s Write, 3.7MB/s read. It doubled but double of almost nothing is still pretty low. No other services are running. My router also has a USB I can mount drives on and I did so just to experiment. It mounted via samba and got the exact same speeds. So I feel it may not be the pogos fault or archlinux after all.

    All tests were done on OS X Lion using the built in client. I have a media box for streaming movies that can do NFS but I can't see the transfer rates. It streams fine though. Since you use Mac OS X I'm curious to know what NFS client you prefer?
    AnalogMan
     
    Posts: 3
    Joined: Tue Jun 12, 2012 7:34 am

    Re: How to setup NFS on new PogoPlug

    Postby schn4rk » Wed Jun 13, 2012 12:50 pm

    $this->bbcode_second_pass_quote('AnalogMan', 'A')ll tests were done on OS X Lion using the built in client. I have a media box for streaming movies that can do NFS but I can't see the transfer rates. It streams fine though. Since you use Mac OS X I'm curious to know what NFS client you prefer?

    Your test plugging the drive into the router is very telling. I suspect the bottleneck may truly be at the Mac end. I only use the NFS share for streaming media and that's been working fine for me too. I have been mounting the share manually via the command line, I haven't tried any third party client.

    This may sound crazy but maybe try this? http://howto.tipit.info/mac/7/speed-up- ... ba-server/
    schn4rk
     
    Posts: 20
    Joined: Mon Jan 09, 2012 8:55 am
    Top

    Re: How to setup NFS on new PogoPlug

    Postby sambul13 » Thu Sep 06, 2012 7:48 pm

    One can turn On Services for NFS in Programs and Features - Windows Features. How exactly Samba interferes with NFS when active?

    It seems with Windows 7 & 2008R2 is included Client for NFS3, while current nfs-utils 1.2.6-1 in ArcLinux repository include NFS4 client and server. Despite current NFS4 client supports mounting NFS2,3 and 4 server shares concurrently, I'm not sure if NFS4 server can export NFS3 type shares, and it seems Windows 7 Client for NFS3 doesn't support mounting NFS4 type shares.

    I was able to mount NFS shares in Win7 Explorer, but still struggling to see mounted FS content in these shares, possibly due to twisted FS export options.
    Last edited by sambul13 on Fri Sep 07, 2012 2:13 am, edited 3 times in total.
    sambul13
     
    Posts: 258
    Joined: Sat Aug 18, 2012 10:32 pm

    Re: How to setup NFS on new PogoPlug

    Postby moonman » Fri Sep 07, 2012 12:31 am

    Are you on wireless or wired? If wireless what connection speed do you get? DD-WRT is not the bottleneck, I've used it for the 6 years and never had a problem with it. Likely you had it set up wrong, or used an unstable version.
    Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
    -----------------------------------------------------------------------------------------------------------------------
    [armv5] Updated U-Boot | [armv5] NAND Rescue System
    moonman
    Developer
     
    Posts: 3388
    Joined: Sat Jan 15, 2011 3:36 am

    Re: How to setup NFS on new PogoPlug

    Postby schn4rk » Fri Sep 07, 2012 1:32 am

    $this->bbcode_second_pass_quote('sambul13', 'O')ne can turn On Services for NFS in Programs and Features - Windows Features. How exactly Samba interferes with NFS when active?


    It should not interfere.

    $this->bbcode_second_pass_quote('sambul13', 'I')t seems with Windows 7 & 2008R2 is included Client for NFS3, while current nfs-utils 1.2.6-1 in ArcLinux repository include NFS4 client and server. Despite current NFS4 client supports mounting NFS2,3 and 4 server shares concurrently, I'm not sure if NFS4 server can export NFS3 type shares, and it seems Windows 7 Client for NFS3 doesn't support mounting NFS4 type shares.


    NFSv4 is backwards-compatible in this sense - even though the server is using NFS4, any NFS client should be able to mount the share, as long as you have other settings correct.

    $this->bbcode_second_pass_quote('sambul13', 'I') was able to mount NFS shares in Win7 Explorer, but still struggling to see mounted FS content in these shares, possibly due to twisted FS export options.


    I think this is indeed your problem. When you can mount an NFS share but can't see the contents, it is usually because of permissions. Here is a good web page to help you troubleshoot your settings: http://www.troubleshooters.com/linux/nfs.htm
    schn4rk
     
    Posts: 20
    Joined: Mon Jan 09, 2012 8:55 am
    Top

    Re: How to setup NFS on new PogoPlug

    Postby sambul13 » Fri Sep 07, 2012 2:11 am

    Thanks, great link too! I was able to mount and work with NFS shares in Win7 Explorer. I posted a brief NFS on Pogo and Windows Guide hopefully helpful for others. :P

    But wait... now more issues for me: :oops:

    - [SOLVED] Mounted in Windows NFS root share has wrong much smaller size, despite dh -hT shows correct size in Arch, and nfsstat shows NFS4 exports type 2 and 3 shares supported by Win Client for NFS3. Can't copy large files to its shared FSs. Any ideas?
    - Files copy speed is a bit less compare to Samba and similarly depends on the share FS type.
    - Exported shares aren't auto scanned into Network Neighborhood and remembered there like Samba shares. Need to manually enter share address each time they're re-exported or device restarted, unless you map them to drives or run mount script at boot. Any workaround?
    Last edited by sambul13 on Sun Sep 09, 2012 4:56 pm, edited 5 times in total.
    sambul13
     
    Posts: 258
    Joined: Sat Aug 18, 2012 10:32 pm

    Next

    Return to Marvell Kirkwood

    Who is online

    Users browsing this forum: No registered users and 2 guests