LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   change order of scripts in rc.M to accomodate nfs over wireless (https://www.linuxquestions.org/questions/slackware-14/change-order-of-scripts-in-rc-m-to-accomodate-nfs-over-wireless-917731/)

tux_dude 12-11-2011 09:41 AM

Quote:

Originally Posted by Richard Cranium (Post 4546911)
Sorry, that doesn't make any sense. Could you provide a simple example of what you would like to do?

This is more an aesthetic issue than a technical one. Your suggestion would create broken links on the nfs shares for some of the servers.

On the laptop which I would use autofs I have:
/autofs/nfs/share
/autofs/nfs/media2
/autofs/nfs/download
/autofs/nfs/slackware64-current

The end result would require creating symlinks on the each nfs share which is only valid for the one system which would use autofs. The result would be:
/home/share -> /autofs/nfs/share
/home/share/media2 -> /autofs/nfs/media2
/home/share/download -> /autofs/nfs/download
/home/share/download/slackware64-current -> /autofs/nfs/slackware64-current

IMO, this is an utter mess. This is all handled currently with nested nfs mount without the need for symlinks.

Richard Cranium 12-11-2011 05:36 PM

Quote:

Originally Posted by tux_dude (Post 4547191)
This is more an aesthetic issue than a technical one. Your suggestion would create broken links on the nfs shares for some of the servers.

On the laptop which I would use autofs I have:
/autofs/nfs/share
/autofs/nfs/media2
/autofs/nfs/download
/autofs/nfs/slackware64-current

The end result would require creating symlinks on the each nfs share which is only valid for the one system which would use autofs. The result would be:
/home/share -> /autofs/nfs/share
/home/share/media2 -> /autofs/nfs/media2
/home/share/download -> /autofs/nfs/download
/home/share/download/slackware64-current -> /autofs/nfs/slackware64-current

IMO, this is an utter mess. This is all handled currently with nested nfs mount without the need for symlinks.

Well, I guess the other question would be "why not run autofs on the other servers?".

If you check out the autofs package, you'll see that nfs mounts are normally done by accessing the /net/<nfs_host> path. (The mechanism is outlined in /etc/auto.net.)

So on the server exporting the nfs mountpoints, you would add the symlinks to the /net/<nfs_host>/<subdir>

Let's assume that your nfs server is exporting the directories /home/exports/share, /home/exports/media2, /home/exports/download, and /home/exports/slackware64-current. On the nfs server, you'd add the symlinks...
Code:

cd /home/exports/share
ln -s /net/<nfs_host>/media2 media2
ln -s /net/<nfs_host>/download download
cd /home/exports/download
ln -s /net/<nfs_host>/slackware64-current slackware64-current

On the target machine, you'd symlink /home/share to /net/<nfs_host>/share and the rest should be transparent. (Assuming that you just wouldn't access the share via the /net mechanism.)

At my place of employment, they use the same mechanism to automatically attach the NFS mounts required by ClearCase to mount our VOBs. Works fine. In fact, they can change those symlinks around on the server and the change is visible without modifying /etc/fstab on all the using servers.

(It wasn't clear to me from what you've written if what I wrote is the same thing that you didn't want to do. If it was, please accept my apologies for wasting your time.)


All times are GMT -5. The time now is 12:19 PM.