Mounting and Sharing an External Volume using NFS on a ROCKS Cluster -- Method 2 (autofs)
Mounting the Volume on the Head Node
- Create the directory on the head node on which the volume will be mounted:
$ mkdir /work1
- Add an entry to '/etc/fstab' that mounts the volume:
/dev/sdc1 /work1 ext3 defaults 1 2
Serve the Mounted Volume using NFS
- Add an entry to '/etc/exports' to allow NFS sharing of the volume:
/work1 10.1.1.1(rw,async,no_root_squash) 10.1.0.0/255.255.0.0(rw,async)
- Re-read the new NFS configuration:
$ exportfs -r
Set Up Compute Nodes to Mount the Shared Volume
/etc/auto.share':
$ echo "work1 kwyjibo.local:/work1" >> /etc/auto.share
/etc/auto.master' lists the 'auto.share' entry already:
/share /etc/auto.share --timeout=1200
$ cd /var/411 $ make clean $ make $ cluster-fork 411get --all
$ /sbin/service autofs reload $ cluster-fork service autofs restart
NOTE:
On the client, the mounted directory will not show up when running "ls" under the parent directory (i.e., 'l/share') until it or some file under it is accessed directly (e.g., 'cd /share/work1').
From my reading of the documentation, this behavior should be modifiable by editing '/etc/sysconfig/autofs' and setting the 'BROWSE_MODE':
BROWSE_MODE="yes"
feed
Comments
0 comments postedPost new comment