Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Why is it bad to put NFS mounts (or symlinks to NFS mounts) in the root directory?

bad directory mounts NFS symlinks
0
Posted

Why is it bad to put NFS mounts (or symlinks to NFS mounts) in the root directory?

0

Sometimes people wonder why NFS mounts are created in /mnt or /hosts subdirectories under root, like /mnt/jobs, instead of just /jobs. There’s several reasons, one in particular is very important.. to avoid hanging up the entire OS when there’s an NFS outage! Whenever the operating system wants to access a file or program, say /usr/bin/man, the operating system starts at the root (/), and walks the directory contents of the root directory until it hits ‘usr’, then walks the directory list of /usr until it finds ‘bin’, etc. If you have a mount (or symlink pointing to a mount) in the root directory, and it just happens to appear earlier in the directory entries than /usr, invoking /usr/bin/man will involve stepping over your mount/symlink while searching for /usr. If the NFS server is down, your app will hang when it tries to step over the mount point/symlink, causing it to freeze up your shell. (Similar to how running ‘df’ freezes the shell during NFS outages) Consider you’re an adminis

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123