Error description
The problem is relevant for LXD clusters. When a dataset (data array) is deleted the dataset is busy error occurs.
The result of zfs destroy command is as follows:
zfs destroy zfs0/containers/vm-2673-vm325664
cannot destroy 'zfs0/containers/vm-2673-vm325664': dataset is busy
The dataset deletion error occurs because the snap software deployment and package management system mounts the file system "in layers". This causes the above problem. This snap error is not related with the VMmanager platform and cannot be fixed by ISPsystem.
Solution
To delete data, you need to go to snap LXD namespace and unmount the dataset.
To delete a dataset causing the problem:
- Connect to the node server via SSH.
-
Go to snap LXD namespace:
nsenter -t $(cat /var/snap/lxd/common/lxd.pid) -m
-
Get a list of file systems:
mount
At the end of the list there will be entries that contain the shmounts string:
tmpfs on /var/snap/lxd/common/shmounts type tmpfs (rw,relatime,size=1024k,mode=711) lxcfs on /var/snap/lxd/common/shmounts/lxcfs type fuse.lxcfs (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other) tmpfs on /var/snap/lxd/common/shmounts/instances type tmpfs (rw,relatime,size=100k,mode=711)
There are also such entries at the beginning of the list, but they do not interfere with proper operation.
-
Unmount the file systems from these entries, starting at the end of the list:
umount <file_system>
Comment -
Delete the dataset causing the problem with the command:
zfs destroy <dataset>