pct unmount error: exit code 32

codejp3

Member
Nov 29, 2019
17
7
23
43
I'm getting a consistent error when manually unmounting .raw lxc disks.

I have several containers that I wanted to setup mount points within them for users /home directories and other "core" directories, so to do it without borking a live system, I had to shutdown the containers, manually mount the the virtual disk, and move the existing directories to the new external directory (mount point source). I was able to accomplish the task on all the containers I needed to, but I ran into a consistent error every time I tried to unmount one of the manually mounted containers.

Container mounts fine and is accessible:
Bash:
# pct mount 104
mounted CT 104 in '/var/lib/lxc/104/rootfs'
# ls /var/lib/lxc/104/rootfs
bin  boot  dev    etc  home    lib  lib64  lost+found    media  mnt  opt  proc  root  run  sbin    src  srv  sys  tmp  usr  var

I've accomplished what I needed to with external mounts. Not related to the topic at hand, so I'm not posting my steps here unless requested.

The error comes into play when I tried to unmount the mounted container after I finished doing my dirty business:
Code:
# pct unmount 104
umount: /var/lib/lxc/104/rootfs: target is busy.
command 'umount -d /var/lib/lxc/104/rootfs/' failed: exit code 32

I finally just unlocked it, and started the container the "normal" way with debugging. Everything checked out.
Bash:
# pct unlock 104
# lxc-start -n 104 -F -l DEBUG -o /tmp/lxc-104.log && tail -f /tmp/lxc-104.log
lxc-start: 104: conf.c: lxc_setup_boot_id: 3250 Permission denied - Failed to mount /dev/.lxc-boot-id to /proc/sys/kernel/random/boot_id
                                                                                                                                        systemd 245.4-4ubuntu3.1 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN2 -IDN +PCRE2 default-hierarchy=hybrid)
Detected virtualization lxc.
Detected architecture x86-64.

( shows boot messages and command prompt )

My mount points work, the containers function fine, and there are no errors of concern. The process was the same for each container, and gave the same error each time unmounting.

Out of curiosity, I tried manually mounting and unmounting the .raw image files again now that they have been updated with my alterations, and they unmount properly without the "failed: exit code 32" error.

The problem fixed itself so I don't need any help, but I'm wondering what may have been the cause of the issue with the "old" unaltered virtual disks unmounting. I recently suffered a HDD failure and had to re-install pmx-ve and re-do some of my setup. The containers in question were restored from backups. Some had previous mount points, some did not. It didn't seem to matter which container I manually mounted, it would always report "drive busy" and kick out the "exit code 32" error. It wouldn't unmount regardless if I made any changes to the mounted rootfs or not. But now, after altering and re-saving the virtual disks, they're mounting/unmounting fine. I'm not sure what changed other than moving the internal directories to an external drive and mounting them as mount points inside the containers.
 
Whatever it was, you can check with lsof what has an file handle open.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!