Mounting NFS and CIFS at boot

How do I go about mounting NFS and CIFS filesystems at boot?

Ideally I'd like to mount the filesystems once the system has booted. From what I can remember from when I tried it last there was a problem booting if a remote server was offline, that is, it started booting but but hung waiting for the remote server.
 
For filesystems which appear late there is the late option. Please see below two examples from my /etc/fstab.
Code:
md99       none   swap   sw,file=/usr/swap/swap,late   0 0
/usr/home/chris/Downloads /usr/jails/www/home/chris/Downloads nullfs rw,late 0 0
The first example is related to a swap file, the second line to a jail which is started later. I have not used NFS or CIFS, but this method might apply as well.
 
Code:
predrag@lake$ more /etc/fstab

#
# /etc/fstab
# Created by anaconda on Mon Aug 26 06:55:43 2013
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/vg_loom-lv_root /  ext4  defaults  1 1
UUID=891c05da-db22-43b7-aad7-5464cfad315c /boot  ext4  defaults  1 2
/dev/mapper/vg_loom-lv_home /home  ext4  defaults  1 2
/dev/mapper/vg_loom-lv_swap swap  swap  defaults  0 0
tmpfs  /dev/shm  tmpfs  defaults  0 0
devpts  /dev/pts  devpts  gid=5,mode=620  0 0
sysfs  /sys  sysfs  defaults  0 0
proc  /proc  proc  defaults  0 0


gaia:/mnt/zfsauton/zdata  /zfsauton/data  nfs  soft,timeo=600,fg,noatime
gaia:/mnt/zfsauton/project /zfsauton/project  nfs  soft,timeo=600,fg,noatime
gaia:/mnt/zfsauton/home  /zfsauton/home  nfs  soft,timeo=600,fg,noatime
 
Back
Top