How do I safely remove the /home/virtfs directory?

The virtfs directory contains hard links to all the system binaries to help with security via jailshelled accounts.

If you remove the virtfs system without unmounting the directories under it, you will completely break the system.

The procedure you need to do is the following:

cd /home/virtfs
find . -regex ‘^.*[How do I safely remove the virtfs directory?^.]‘ -type d > t1
for i in $(cat t1); do umount $i; done

After this is ran, you can safely recursively remove the /home/virtfs directory.

Leave a Reply

You must be logged in to post a comment.