I have a symlink etablished under /mnt/
like so ln -s / /mnt/$(HOSTNAME)
. This is so that I can easily access multiple nfs mounted disks, including the host machine itself. But recently a colleague noticed that this has the risk of unmounting the host root directory itself, which makes it impossible to login. So is there any trick/tactic to prevent unmounting the target of a symlink?
Asked
Active
Viewed 70 times
0

John Jiang
- 159
- 6
-
1Does it have to be a symlink? Could a bind mount work for your use-case? – Thegs Jun 23 '21 at 17:14
-
@Thegs that works too! Thanks for the suggestion and I will look into that. – John Jiang Jun 23 '21 at 17:36