Proxmox/OpenVZ Can’t umount (unmount) device or resource busy

proxmox Recently when working on an OpenVZ container I was attempting to create a backup.  While doing so I kept running into a problem where the server wouldn’t let me unmount the container in order to create the backup.  The error you may see in this instance would say “Can’t umount /var/lib/vz/root/OpenVZID device or resource busy”, or “Can’t umount /var/lib/vz/root/100: Device or resource busy TASK ERROR: command ‘vzctl umount 100’ failed: exit code 51″, in this case the container being 100.  Here’s how I was able to fix it …

In the examples below I will be using 100 for the OpenVZ container ID, just change that to whatever container you are troubleshooting.

So first check to make sure you don’t have any other SSH connections open, or any other connection that may be causing the problem. 99% of the time it’s just an SSH connection you still have open.

If that doesn’t work, go ahead and login to the container and shutdown:

Or from the main node:

Once the container is shutdown, attempt to unmount it and see if it throws any errors:

If you still can’t unmount it, try these to see if anything stands out:

The final check which ended up being where I found my problem is to run:

Here’s what I ended up finding:

Turns out it there was still active in read only mode. And the simple way to fix that was:

Hope this helps, good luck!

Share Button