map users to NFS Share

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

map users to NFS Share

Postby dmdelorme » Sun Apr 15, 2012 11:18 pm

I am wondering if any one has managed to map a nfs4 share to users ie for backup. I still have samba set up but i am in a pure Linux environment and NFS seems to work better...
I have done some dd tests on my goflex drive connected to a wndr4500 router
with a wired and wireless connection from my Laptop Ubuntu 12.04 i get about 12 to 15 mb/s wireless and 18 to 20 wired
Is this about what i should expect.
this is my exports file
$this->bbcode_second_pass_code('', '# /etc/exports
#
# List of directories exported to NFS clients. See exports(5).
# Use exportfs -arv to reread.
#
# Example for NFSv2 and NFSv3:
#
# Example for NFSv4:
# Using Kerberos and integrity checking:
#
/nfs4exports 192.168.1.1/24(ro,async,insecure,root_squash,no_subtree_check,fsid=0)
/nfs4exports/backup 192.168.1.2(rw,nohide,sync,insecure,root_squash,no_subtree_check)
/nfs4exports/media 192.168.1.1/24(rw,nohide,async,insecure,root_squash,no_subtree_check)
/nfs4exports/downloads 192.168.1.1/24(rw,nohide,async,insecure,root_squash,no_subtree_check)')
this is my Fstab
$this->bbcode_second_pass_code('', 'tmpfs /tmp tmpfs nodev,nosuid 0 0
/swapfile.img none swap sw 0 0
UUID=4ec4f4fa-8b47-404d-8456-0085ff55b465 /home ext3 defaults 0 2
/home /nfs4exports/home none rw,bind 0 0
/home/media /nfs4exports/media none rw,bind 0 0
/home/downloads /nfs4exports/downloads none rw,bind 0 0
/home/backup /nfs4exports/backup none rw,bind 0 0
')
I would love some suggestions as to the first question and if i could lock this down a little better.
dmdelorme
 
Posts: 14
Joined: Sun Apr 08, 2012 5:18 pm
Location: Winnipeg, Canada

Re: map users to NFS Share

Postby WarheadsSE » Mon Apr 16, 2012 12:21 pm

Am I reading that right? You're mounting 2x to /home..
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: map users to NFS Share

Postby dmdelorme » Mon Apr 16, 2012 9:40 pm

LOL i did not even notice the first one is the mount uuid mount to /home that is the big non system user/file space..
the second was the start of mapping shares to users/user ie me i did not export this it should be commented out.

This is how i mount them on the client Ubuntu 12.04 beta AKA Crash Bang although the crash stuff is disappearing fast
It is my laptop and if i move it out of the home I have to su to unmount the shares...

$this->bbcode_second_pass_code('', 'UUID=736fa000-f83b-444e-a68f-a8fcc9cc5dae / ext4 defaults 0 1
UUID=f94aec97-6c3e-4971-8064-1f9cee7dd5e9 swap swap sw 0 0
192.168.1.5:/media /home/david/media nfs4 rw 0 0
192.168.1.5:/downloads /home/david/nfsdownloads nfs4 rw 0 0
192.168.1.5:/backup /home/david/backup nfs4 rw 0 0
')
The second mount is really a bind between /home and /nf4sexport/home it is the part i want to fix ie user x can mount /home/x and can not access /home/y or Z
for now i just allow 192.168.1.2 mount /home/david/backup
dmdelorme
 
Posts: 14
Joined: Sun Apr 08, 2012 5:18 pm
Location: Winnipeg, Canada

max nfs transfer speeds

Postby dmdelorme » Wed May 01, 2013 7:18 pm

Hi well i just did a reinstall of my netflex home and nfs in the process i noticed a big difference in transfer speeds. the main component i played with was rsize and wsize starting with not defining them in my fstab file on the client then going up from 8k 16k 32k 128k the difference was dynamic. with the first one to about 8k i found transfer speeds in the area of 8MB/s with hi cpu usage on the server as i increased the r/w sizes my transfer rtes went up and cpu usage settled to acceptable level ie less then 100%
Here are my current settings
fstab>>client
mercury:/raid /nfs/raid nfs4 rw,rsize=524288,wsize=524288,intr,noatime 0 0
mars:/backup /nfs/mars/backup nfs4 rw,rsize=131072,wsize=131072,timeo=14,intr,_netdev 0 0
the top one is a ubuntu server with 8g ram and i get 105 to 110 MB/s on both read and writes
mars is the goflex home.

the following is local drive access speed
[root@mars nfs4]# time dd if=/dev/zero of=/srv/nfs4/backup/testfile1 bs=16k count=16384
16384+0 records in
16384+0 records out
268435456 bytes (268 MB) copied, 3.05481 s, 87.9 MB/s

real 0m3.061s
user 0m0.030s
sys 0m2.130s
[root@mars nfs4]# time dd if=/srv/nfs4/backup/testfile1 of=/dev/null bs=16k
16384+0 records in
16384+0 records out
268435456 bytes (268 MB) copied, 2.36419 s, 114 MB/s

this is nfs4 with dd
root@solaris:/home/david# time dd if=/dev/zero of=/nfs/mars/backup/testfile2 bs=16k count=16384
16384+0 records in
16384+0 records out
268435456 bytes (268 MB) copied, 13.2403 s, 20.3 MB/s

real 0m13.362s
user 0m0.000s
sys 0m0.444s
root@solaris:/home/david# time dd if=/nfs/mars/backup/testfile2 of=/dev/null bs=16k
16384+0 records in
16384+0 records out
268435456 bytes (268 MB) copied, 8.32116 s, 32.3 MB/s
reading a large file
root@solaris:/home/david# time dd if=/nfs/mars/backup/testfile of=/dev/null bs=16k
514000+0 records in
514000+0 records out
8421376000 bytes (8.4 GB) copied, 227.005 s, 37.1 MB/s

real 3m47.039s
user 0m0.588s
sys 0m13.596s
writing a large file
8421376000 bytes (8.4 GB) copied, 413.883 s, 20.3 MB/s

real 6m53.912s
user 0m0.188s
sys 0m8.784s

I would like to know what others are finding for nfs transfer speeds with a gbit network
and if there are other tuning options as i have not touched the tcp or network stuff

David
dmdelorme
 
Posts: 14
Joined: Sun Apr 08, 2012 5:18 pm
Location: Winnipeg, Canada


Return to Marvell Kirkwood

Who is online

Users browsing this forum: No registered users and 18 guests