# [SOLVED] NFS conflict between 2 exports ?

## loopx

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 ... :

```

/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 :

```

#/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 :

```

#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

----------

## loopx

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

```

/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  :Smile: 

----------

