New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'Failed to append name - rootfs' error while destroying container with btrfs storage #2826
Comments
The same happens also on Ubuntu 18.04...
lxc-destroy -n testbtrfs
|
Tracked it down and sent a branch that fixes it: |
@brauner is there a manual fix one can perform in the meantime while waiting on a release with the fix included? |
Why is this issue closed, while it still exists in version 3.0.3 (on Debian Buster)? |
Meanwhile anyone who encounters this issue can insert the following function into is_btrfs_subvolume() {
sudo btrfs subvolume show "$1" >/dev/null 2>&1
}
lxc-destroy(){
# See: https://github.com/lxc/lxc/issues/2826
>&2 echo "I: Using lxc-destroy from bash_aliases."
>&2 echo
local name=$1
[[ -n $name ]] || { echo "Container name is required"; return 1; }
local path=/var/lib/lxc/$name
[[ -d $path ]] || { echo "$path does not exist."; return 1; }
echo "Removing $path"
if [[ -d $path/rootfs ]]; then
if is_btrfs_subvolume $path/rootfs; then
sudo btrfs sub del $path/rootfs
else
sudo rm -r $path/rootfs
fi
fi
sudo rm -r $path
echo "Deleted $path"
} |
Hi,
General Information:
STR:
The text was updated successfully, but these errors were encountered: