Using ln -s with NFS across two drives?

Hi

I have a server with a large RAID partition on it.

The raid partition is split into a few directories which are then shared individually via NFS.

Unfortunately the whole array is filling up and I need to do a little bit of juggling till I can upgrade the whole array to new disks.

I have therefore added some spare available drives to make a second array on the same machine, I do not want to share this array via NFS as that would require reconfiguring the clients and then reconfiguring them back when the change gets unwound.

So what I wanted to do is move one of the directories from the original Array (Array 1) to the new temporary Array (Array 2) and set a symbolic link thus....

ln -s /mnt/path/to/array1 /mnt/path/to/array2

This gets seen and works fine on the server but of course as the clients can't see /mnt/path/to/array2 they fail.....

Is there an obvious fix/fudge I'm missing?

Thanks and Season Greetings!!

@Bashingaway,

NFS does not allow you to cross mount points, which it appears your symbolic links are doing. Are the clients NFS mounting /mnt/path/to/array1? Or /mnt/path/to/array1/directory7? Is this configured on the clients as a static mounted (in /etc/*fstab) or automounted share?

The mounts go to the directories in fstab...

for example:-

192.168.1.159:/mnt/RAIDARRAY1/directory1   /mnt/directory1 nfs defaults 0 0
192.168.1.159:/mnt/RAIDARRAY1/directory2   /mnt/directory2   nfs  defaults 0 0

Regards

You are not going to like it, but you are going to have to go with reconfiguring each client. You'll just have to decide if you are going to go with an automount option, or (if your system supports binding mounts), change to a per-directory scheme, something like:

192.168.1.159:/share/directory1   /mnt/directory1 nfs defaults 0 0
192.168.1.159:/share/directory2   /mnt/directory1 nfs defaults 0 0

To support this, you would have to add the following in /etc/fstab on your server (in blue):

array1partition /mnt/to/array1 extN defaults 1 2
/mnt/to/array1/directory1 /share/directory1 bind defaults 0 0
/mnt/to/array1/directory2 /share/directory2 bind defaults 0 0

And change /etc/exports to share out each directory properly.
Just update /etc/fstab when you move directoryN.

1 Like

I was afraid that was the case......

Since I posted the original question I came across this thread which suggests SMB shares will traverse boundries.

Mounting NFS of a symbolic link - Ubuntu Forums

If I'm going to have to reconfigure the clients I may go that way....

Just remember that SMB supports window-based file permissions, which may, or may not, work properly when mapped to unix-based file permissions.

1 Like