mounting file systems and autofs tips and samples

mounting nfs via fstab

server:/usr/local/pub    /pub   nfs    rsize=8192,wsize=8192,timeo=14,intr

Can check the nfs sharing status by using “showmount -e server”

for nfs in autofs,
to mount the directory /hostdir on /misc/mountpoint on your machine, add the following line to auto.master:

/misc   /etc/auto.misc --timeout 60
then in auto.misc
mountpoint  -rw,soft,intr,rsize=8192,wsize=8192
service autofs reload

some other autofs config

cdrom   -fstype=iso9660,ro,sync,nodev,nosuid    :/dev/cdrom
floppy   -fstype=auto,sync,nodev,nosuid          :/dev/fd0
usbdrive -fstype=vfat,uid=1002,gid=1002,umask=002        :/dev/sda1

for samba in autofs, eg

/MY_DIR  -fstype=smbfs,username=yourname,password=yourpass,uid=1000,gid=1000   ://server/dir

samba in fstab, eg

//sambaserver/dir  /yourdir/dir  smbfs  username=yourname,password=yourpass  0 0

Author: bpeh

Bernard Peh is a great passioner of web technologies and one of the co-founder of Website Design and Reviews. He works with experienced web designers and developers everyday, developing and designing commercial websites. He specialises mainly in SEO and PHP programming.

One thought on “mounting file systems and autofs tips and samples”

Comments are closed.