So an example is we have auto mount table /test specfied in /etc/auto.master which automounts /test/1 and /test/2 automatically.
Say someone was on a system using /test/1 actively. I would want to 'fix' the system by setting up new entries in /etc/fstab for /test/1 and /test/2 and remove /test from /etc/auto.master. Then I would want to restart automount.
/test/1 would still be mounted since its in use which is good as then there is no interruption to the user. I would create /test/2 and mount a 'hard' mount on that. Since automount was restarted and no longer has an entry for /test in /etc/auto.master then /test/1 will never timeout from automount anymore.
However, the base mountpoint that automount was using is /test ... so on a reboot /test will still exist but directories /test/1 and /test/2 will no longer exist and the system will fail to mount on those /etc/fstab entries ...
What I ended up doing was:
- mount --bind / /mnt
- cd /mnt/test
- mkdir 1 2
- cd /
- umount /mnt