0

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?

John Jiang
  • 159
  • 6
  • 1
    Does it have to be a symlink? Could a [bind mount](https://unix.stackexchange.com/a/198591/244846) 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

0 Answers0