SysV Init
The /etc/init.d/mountall.sh
init script mounts local filesystems only:
mount -a -t nonfs,nfs4,smbfs,cifs,ncp,ncpfs,coda,ocfs2,gfs,gfs2,ceph -O no_netdev
Other filesystems are mounted by separate init scripts, like for example /etc/init.d/mountnfs.sh
, which declare (via LSB headers) their dependency on $network
. Thus these get scheduled later, after the network is brought up, while mountall.sh
can run much earlier.
systemd
Local mount units are pulled in by local-fs.target
, remote ones by remote-fs.target
. systemd-fstab-generator
scans /etc/fstab
, generates mount units and assigns these to the above targets based on conditions similar to the above.
delay_connect
This option means that sshfs will not initiate the SSH connection to the remote server at mount time, but will only do so on the first filesystem operation actually requiring it. This delays error reporting, but might be a useful workaround in some cases, for example if your init system hasn't got enough information to order the mount operation correctly. "The network" being "up" is a rather loose term, and even though one can add arbitrary extra dependencies to mount units that doesn't help if the trigger event is not part of the bootup transaction (in systemd parlance).