Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] NFS conflict between 2 exports ?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
loopx
Advocate
Advocate


Joined: 01 Apr 2005
Posts: 2787
Location: Belgium / Liège

PostPosted: Wed Dec 21, 2011 10:37 pm    Post subject: [SOLVED] NFS conflict between 2 exports ? Reply with quote

Hi,


I quickly post here since I got an issue with NFS and I really don't know how I can fix it in a "good way" ...

Here is a configuration ... :
Code:

/volume1/public 10.2.1.0/26(ro,async,no_wdelay,root_squash,insecure_locks,anonuid=1025,anongid=100)
/volume1/public/autre   10.2.1.0/26(ro,async,no_wdelay,nohide,root_squash,insecure_locks,anonuid=1025,anongid=100)
/volume1/public/music   10.2.1.0/26(ro,async,no_wdelay,nohide,root_squash,insecure_locks,anonuid=1025,anongid=100)
/volume1/public/video   10.2.1.0/26(ro,async,no_wdelay,nohide,root_squash,insecure_locks,anonuid=1025,anongid=100)

/volume1/private_loopx  10.2.1.6(rw,async,no_wdelay,root_squash,insecure_locks,anonuid=1025,anongid=100)
/volume1/private_loopx/loopx    10.2.1.6(rw,async,no_wdelay,nohide,no_root_squash,insecure_locks,anonuid=1025,anongid=100)
/volume1/private_loopx/autre    10.2.1.6(rw,async,no_wdelay,nohide,no_root_squash,insecure_locks,anonuid=1025,anongid=100)
/volume1/private_loopx/music    10.2.1.6(rw,async,no_wdelay,nohide,no_root_squash,insecure_locks,anonuid=1025,anongid=100)
/volume1/private_loopx/video    10.2.1.6(rw,async,no_wdelay,nohide,no_root_squash,insecure_locks,anonuid=1025,anongid=100)


I'm trying to make two entry to NFS shares ... :
- public (will be RO)
- private_loopx (will be RW)

With this configuration, PUBLIC is working fine but PRIVATE has no write access to "autre", "music" and "video" ...

Ok, little work around for "video" .. commented out the "video" line for PUBLIC :
Code:

#/volume1/public/video  10.2.1.0/26(ro,async,no_wdelay,nohide,root_squash,insecure_locks,anonuid=1025,anongid=100)


... restart nfsd and mount it again : it works fine for PRIVATE (is now rw) but ... when using the PUBLIC entry ... I only see an empty "video" folder ... (which is RO because it's the parent => 'public/' which is RO).


I think my problem is related to "mount --bind" ... Check these mounts :
Code:

#PUBLIC
/volume1/autre              5.4T          1.3T    4.0T  25% /volume1/public/autre
/volume1/music              5.4T          1.3T    4.0T  25% /volume1/public/music
/volume1/video              5.4T          1.3T    4.0T  25% /volume1/public/video

#PRIVATE
/volume1/loopx              5.4T          1.3T    4.0T  25% /volume1/private_loopx/loopx
/volume1/autre              5.4T          1.3T    4.0T  25% /volume1/private_loopx/autre
/volume1/music              5.4T          1.3T    4.0T  25% /volume1/private_loopx/music
/volume1/video              5.4T          1.3T    4.0T  25% /volume1/private_loopx/video

.. so, the folder "video" is mounted twice with --bind option ... and may be that's why there is a conflict between RO and RW of two differents export ???

Can anybody confirm me that ???


Thanks
_________________
Mon MediaWiki perso : http://pix-mania.dyndns.org


Last edited by loopx on Wed Dec 21, 2011 11:22 pm; edited 1 time in total
Back to top
View user's profile Send private message
loopx
Advocate
Advocate


Joined: 01 Apr 2005
Posts: 2787
Location: Belgium / Liège

PostPosted: Wed Dec 21, 2011 11:22 pm    Post subject: Reply with quote

Ok, got it ... should use "fsid=.." for sub-folder in the exports .. like this :
Code:

/volume1/public 10.2.1.0/26(ro,async,no_wdelay,root_squash,insecure_locks,anonuid=1025,anongid=100)
/volume1/public/autre   10.2.1.0/26(ro,async,no_wdelay,nohide,root_squash,insecure_locks,anonuid=1025,anongid=100,fsid=10)
/volume1/public/music   10.2.1.0/26(ro,async,no_wdelay,nohide,root_squash,insecure_locks,anonuid=1025,anongid=100,fsid=11)
/volume1/public/video   10.2.1.0/26(ro,async,no_wdelay,nohide,root_squash,insecure_locks,anonuid=1025,anongid=100,fsid=12)

/volume1/private_loopx  10.2.1.6(ro,async,no_wdelay,root_squash,insecure_locks,anonuid=1025,anongid=100)
/volume1/private_loopx/autre    10.2.1.6(rw,async,no_wdelay,nohide,no_root_squash,insecure_locks,anonuid=1025,anongid=100,fsid=20)
/volume1/private_loopx/music    10.2.1.6(rw,async,no_wdelay,nohide,no_root_squash,insecure_locks,anonuid=1025,anongid=100,fsid=21)
/volume1/private_loopx/video    10.2.1.6(rw,async,no_wdelay,nohide,no_root_squash,insecure_locks,anonuid=1025,anongid=100,fsid=22)
/volume1/private_loopx/loopx    10.2.1.6(rw,async,no_wdelay,nohide,no_root_squash,insecure_locks,anonuid=1025,anongid=100,fsid=23)


Now it works as expected :)
_________________
Mon MediaWiki perso : http://pix-mania.dyndns.org
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum