Symptoms
A ploop container cannot be started or mounted:
[root@pcs ~]# vzctl --verbose mount 101
Mount image: /vz/private/101/~
Failed to mount image /vz/private/101/root.hdd: Can't add image /vz/private/101/root.hdd/root.hds: Device or resource busy
Failed to mount image: Can't add image /vz/private/101/root.hdd/root.hds: Device or resource busy [152]
Cause
The container is locked by a backup operation, which was never completed, i.e. abruptly interrupted. It resulted in a stuck ploop mount:
[root@pcs ~]# grep ploop /proc/mounts | grep backup
...
/dev/ploop28726p1 /vz/backup/101/tmpexH6Jq/fs ext4 ro,relatime,barrier=1,data=ordered,balloon_ino=12,pfcache_csum 0 0
The origin of the ploop locker can also be defined by looking into the following cookie file:
[root@pcs ~]# cat /sys/block/ploop28726/pstate/cookie
vzbackup
Resolution
-
Unmount the hung mount:
[root@pcs ~]# ploop umount -d /dev/ploop28726 Unmounting file system at /vz/backup/101/tmpexH6Jq/fs Unmounting device /dev/ploop28726
-
Start the container:
[root@pcs ~]# vzctl start 101