Linux – Advantages and Disadvantages of Hard vs Soft Mounts in UNIX

linuxmountnfsunix

This question may vary between distros but, in general, what are the advantages/disadvantages of using a hard or soft mount in the UNIX world?

Are there certain situations where one is more beneficial or are the uses fairly universal?

Best Answer

A hard mount is generally used for block resources like a local disk or SAN. A soft mount is usually used for network file protocols like NFS or CIFS.

The advantage of a soft mount is that if your NFS server is unavailable, the kernel will time out the I/O operation after a pre-configured period of time. The disadvantage is that if your NFS driver caches data and the soft mount times out, your application may not know which writes to the NFS volumes were actually committed to disk.