Skip to content
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

LXD snap hold on to old swapfile #14768

Open
simondeziel opened this issue Jan 11, 2025 · 2 comments
Open

LXD snap hold on to old swapfile #14768

simondeziel opened this issue Jan 11, 2025 · 2 comments

Comments

@simondeziel
Copy link
Member

I noticed that freeing the GHA ephemeral disk sometimes failed due to Device or resource busy. After some investigation, it seems to be due to LXD holding the block device active despite having swapoff the swapfile and umount the underlying FS.

Here's the simplest reproducer I could come up with:

Prepare the VM with an extra disk to hold onto the swapfile:

$ lxc init ubuntu-minimal-daily:24.04 v1 --vm
$ lxc storage volume create default v1-sdb --type block size=1GiB
$ lxc storage volume attach default v1-sdb v1
$ lxc start v1

Setup swapfile on extra disk:

$ lxc shell v1
root@v1:~# lsblk
NAME    MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
sda       8:0    0   40G  0 disk 
├─sda1    8:1    0   39G  0 part /
├─sda14   8:14   0    4M  0 part 
├─sda15   8:15   0  106M  0 part /boot/efi
└─sda16 259:0    0  913M  0 part /boot
sdb       8:16   0    1G  0 disk 
root@v1:~# mkfs.ext4 /dev/sdb
mke2fs 1.47.0 (5-Feb-2023)During CI debugging, I
Discarding device blocks: done                            
Creating filesystem with 262144 4k blocks and 65536 inodes
Filesystem UUID: a0d0f62b-d0f6-4b43-90a5-6a2cc07ff8ed
Superblock backups stored on blocks: 
	32768, 98304, 163840, 229376

Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done

root@v1:~# mount /dev/sdb /mnt/
root@v1:~# fallocate -l 512M /mnt/swapfile
root@v1:~# chmod 0000 /mnt/swapfile 
root@v1:~# mkswap /mnt/swapfile 
Setting up swapspace version 1, size = 512 MiB (536866816 bytes)
no label, UUID=0b1d0374-a33e-43dc-b1b1-132b49ff37ee
root@v1:~# swapon /mnt/swapfile 

Trying to discard the extra disk but failing due to LXD holding on to it:

root@v1:~# snap install lxd --channel latest/edge
2025-01-11T19:56:23Z INFO Waiting for automatic snapd restart...
lxd (edge) git-0d2dc0a from Canonical✓ installed
root@v1:~# lxd init --auto
root@v1:~# swapoff -a
root@v1:~# umount /mnt/
root@v1:~# blkdiscard /dev/sdb
blkdiscard: cannot open /dev/sdb: Device or resource busy

Workaround to release the block device:

root@v1:~# snap disable lxd
2025-01-11T19:57:46Z INFO Waiting for "snap.lxd.daemon.service" to stop.
lxd disabled
root@v1:~# blkdiscard /dev/sdb
blkdiscard: /dev/sdb contains existing file system (ext4).
blkdiscard: This is destructive operation, data will be lost! Use the -f option to override.
root@v1:~# blkdiscard -f /dev/sdb
blkdiscard: Operation forced, data will be lost!

Here we see that it succeeded after disabling LXD's snap. This shouldn't be needed.

Note

Trying to directly put the swap on /dev/sdb doesn't display the bogus behavior so it seems to be specific to swapfiles.

Additional information

root@v1:~# snap list lxd
Name  Version      Rev    Tracking     Publisher   Notes
lxd   git-0d2dc0a  31942  latest/edge  canonical✓  -
root@v1:~# uname -a
Linux v1 6.8.0-51-generic #52-Ubuntu SMP PREEMPT_DYNAMIC Thu Dec  5 13:09:44 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
root@v1:~# lsb_release -rd
No LSB modules are available.
Description:	Ubuntu 24.04.1 LTS
Release:	24.04
@tomponline
Copy link
Member

Can you try unmounting the /mnt dir inside the lxd snap mount namespace, it might be snaps environment holding onto the mount.

@simondeziel
Copy link
Member Author

Indeed, the snap mount NS still shows /dev/sdb as being mounted:

root@v1:~# LD_LIBRARY_PATH=/snap/lxd/current/lib/:/snap/lxd/current/lib/x86_64-linux-gnu/:/snap/lxd/current/zfs-2.2/lib PATH=/snap/lxd/current/zfs-2.2/bin:/snap/lxd/current/bin:$PATH nsenter --mount=/run/snapd/ns/lxd.mnt -- mount
/dev/sda1 on /var/lib/snapd/hostfs type ext4 (rw,relatime,discard,errors=remount-ro,commit=30)
tmpfs on /var/lib/snapd/hostfs/run type tmpfs (rw,nosuid,nodev,size=3273820k,nr_inodes=819200,mode=755,inode64)
tmpfs on /var/lib/snapd/hostfs/run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k,inode64)
tmpfs on /var/lib/snapd/hostfs/run/lxd_agent type tmpfs (rw,nosuid,nodev,noatime,size=51200k,mode=700,inode64)
tmpfs on /var/lib/snapd/hostfs/run/qemu type tmpfs (rw,nosuid,nodev,relatime,mode=755,inode64)
tmpfs on /var/lib/snapd/hostfs/run/snapd/ns type tmpfs (rw,nosuid,nodev,size=3273820k,nr_inodes=819200,mode=755,inode64)
/dev/sda16 on /var/lib/snapd/hostfs/boot type ext4 (rw,relatime)
/dev/sda15 on /var/lib/snapd/hostfs/boot/efi type vfat (rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
lxd_lxd on /var/lib/snapd/hostfs/root/lxd type virtiofs (rw,relatime)
lxd_lxd--ci on /var/lib/snapd/hostfs/root/lxd-ci type virtiofs (rw,relatime)
/var/lib/snapd/snaps/snapd_23545.snap on /var/lib/snapd/hostfs/snap/snapd/23545 type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/core24_609.snap on /var/lib/snapd/hostfs/snap/core24/609 type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/lxd_31942.snap on /var/lib/snapd/hostfs/snap/lxd/31942 type squashfs (ro,nodev,relatime,errors=continue,threads=single)
none on / type tmpfs (rw,relatime,inode64)
/var/lib/snapd/snaps/core24_609.snap on /bin.usr-is-merged type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/core24_609.snap on /boot type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/core24_609.snap on /host type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/core24_609.snap on /lib.usr-is-merged type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/core24_609.snap on /meta type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/core24_609.snap on /opt type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/core24_609.snap on /sbin.usr-is-merged type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/core24_609.snap on /srv type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/core24_609.snap on /usr type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/core24_609.snap on /var type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/core24_609.snap on /writable type squashfs (ro,nodev,relatime,errors=continue,threads=single)
devtmpfs on /dev type devtmpfs (rw,nosuid,noexec,relatime,size=8177112k,nr_inodes=2044278,mode=755,inode64)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,inode64)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,nosuid,nodev,relatime,pagesize=2M)
mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)
/dev/sda1 on /etc type ext4 (rw,relatime,discard,errors=remount-ro,commit=30)
/dev/sda1 on /home type ext4 (rw,relatime,discard,errors=remount-ro,commit=30)
/dev/sda1 on /root type ext4 (rw,relatime,discard,errors=remount-ro,commit=30)
lxd_lxd on /root/lxd type virtiofs (rw,relatime)
lxd_lxd--ci on /root/lxd-ci type virtiofs (rw,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=33,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=469)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,nosuid,nodev,noexec,relatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
bpf on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime,mode=700)
debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime)
tracefs on /sys/kernel/tracing type tracefs (rw,nosuid,nodev,noexec,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,nosuid,nodev,noexec,relatime)
configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime)
/dev/sda1 on /tmp type ext4 (rw,relatime,discard,errors=remount-ro,commit=30)
/dev/sda1 on /var/snap type ext4 (rw,relatime,discard,errors=remount-ro,commit=30)
/dev/sda1 on /var/lib/snapd type ext4 (rw,relatime,discard,errors=remount-ro,commit=30)
/dev/sda1 on /var/tmp type ext4 (rw,relatime,discard,errors=remount-ro,commit=30)
tmpfs on /run type tmpfs (rw,nosuid,nodev,size=3273820k,nr_inodes=819200,mode=755,inode64)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k,inode64)
tmpfs on /run/lxd_agent type tmpfs (rw,nosuid,nodev,noatime,size=51200k,mode=700,inode64)
tmpfs on /run/qemu type tmpfs (rw,nosuid,nodev,relatime,mode=755,inode64)
tmpfs on /run/snapd/ns type tmpfs (rw,nosuid,nodev,size=3273820k,nr_inodes=819200,mode=755,inode64)
/dev/sda1 on /usr/lib/modules type ext4 (rw,relatime,discard,errors=remount-ro,commit=30)
/dev/sda1 on /usr/lib/firmware type ext4 (rw,relatime,discard,errors=remount-ro,commit=30)
/dev/sda1 on /usr/src type ext4 (rw,relatime,discard,errors=remount-ro,commit=30)
/dev/sda1 on /var/log type ext4 (rw,relatime,discard,errors=remount-ro,commit=30)
/dev/sda1 on /media type ext4 (rw,relatime,discard,errors=remount-ro,commit=30)
tmpfs on /run/netns type tmpfs (rw,nosuid,nodev,size=3273820k,nr_inodes=819200,mode=755,inode64)
/dev/sdb on /mnt type ext4 (rw,relatime)
/var/lib/snapd/snaps/core24_609.snap on /etc/nsswitch.conf type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/core24_609.snap on /etc/apparmor type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/core24_609.snap on /etc/apparmor.d type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/snapd_23545.snap on /usr/lib/snapd type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/dev/sda1 on /snap type ext4 (rw,relatime,discard,errors=remount-ro,commit=30)
/var/lib/snapd/snaps/snapd_23545.snap on /snap/snapd/23545 type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/core24_609.snap on /snap/core24/609 type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/lxd_31942.snap on /snap/lxd/31942 type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/dev/sda1 on /var/lib/snapd/hostfs type ext4 (rw,relatime,discard,errors=remount-ro,commit=30)
/dev/sda1 on /tmp type ext4 (rw,relatime,discard,errors=remount-ro,commit=30)
devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620,ptmxmode=666)
devpts on /dev/ptmx type devpts (rw,relatime,gid=5,mode=620,ptmxmode=666)
tmpfs on /snap/lxd/31942 type tmpfs (rw,relatime,mode=755,inode64)
/var/lib/snapd/snaps/lxd_31942.snap on /snap/lxd/31942/bin type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/lxd_31942.snap on /snap/lxd/31942/commands type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/lxd_31942.snap on /snap/lxd/31942/criu type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/lxd_31942.snap on /snap/lxd/31942/etc type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/lxd_31942.snap on /snap/lxd/31942/lib type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/lxd_31942.snap on /snap/lxd/31942/lxc type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/lxd_31942.snap on /snap/lxd/31942/lxc-completer.sh type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/lxd_31942.snap on /snap/lxd/31942/lxcfs type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/lxd_31942.snap on /snap/lxd/31942/meta type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/lxd_31942.snap on /snap/lxd/31942/sbin type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/lxd_31942.snap on /snap/lxd/31942/share type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/lxd_31942.snap on /snap/lxd/31942/snap type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/lxd_31942.snap on /snap/lxd/31942/wrappers type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/lxd_31942.snap on /snap/lxd/31942/zfs-2.1 type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/lxd_31942.snap on /snap/lxd/31942/zfs-2.2 type squashfs (ro,nodev,relatime,errors=continue,threads=single)
tmpfs on /usr/share/libdrm type tmpfs (rw,relatime,mode=755,inode64)
tmpfs on /usr/share type tmpfs (rw,relatime,mode=755,inode64)
/var/lib/snapd/snaps/core24_609.snap on /usr/share/applications type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/core24_609.snap on /usr/share/base-files type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/core24_609.snap on /usr/share/base-passwd type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/core24_609.snap on /usr/share/bash-completion type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/core24_609.snap on /usr/share/binfmts type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/core24_609.snap on /usr/share/ca-certificates type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/core24_609.snap on /usr/share/common-licenses type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/core24_609.snap on /usr/share/dbus-1 type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/core24_609.snap on /usr/share/debhelper type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/core24_609.snap on /usr/share/debianutils type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/core24_609.snap on /usr/share/dhcpcd type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/core24_609.snap on /usr/share/dict type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/core24_609.snap on /usr/share/distro-info type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/core24_609.snap on /usr/share/doc type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/core24_609.snap on /usr/share/dot.bashrc type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/core24_609.snap on /usr/share/dot.profile type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/core24_609.snap on /usr/share/dot.profile.md5sums type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/core24_609.snap on /usr/share/dpkg type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/core24_609.snap on /usr/share/finalrd type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/core24_609.snap on /usr/share/fontconfig type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/core24_609.snap on /usr/share/fonts type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/core24_609.snap on /usr/share/gcc type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/core24_609.snap on /usr/share/glib-2.0 type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/core24_609.snap on /usr/share/icons type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/core24_609.snap on /usr/share/initramfs-tools type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/core24_609.snap on /usr/share/iptables type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/core24_609.snap on /usr/share/keyrings type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/core24_609.snap on /usr/share/libc-bin type squashfs (ro,nodev,relatime,errors=continue,threads=single)
tmpfs on /usr/share/libdrm type tmpfs (rw,relatime,mode=755,inode64)
/var/lib/snapd/snaps/core24_609.snap on /usr/share/libgcrypt20 type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/core24_609.snap on /usr/share/locale type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/core24_609.snap on /usr/share/man type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/core24_609.snap on /usr/share/menu type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/core24_609.snap on /usr/share/misc type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/core24_609.snap on /usr/share/motd type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/core24_609.snap on /usr/share/netplan type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/core24_609.snap on /usr/share/networks type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/core24_609.snap on /usr/share/opensc type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/core24_609.snap on /usr/share/openssh type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/core24_609.snap on /usr/share/p11-kit type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/core24_609.snap on /usr/share/pam type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/core24_609.snap on /usr/share/pam-configs type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/core24_609.snap on /usr/share/pixmaps type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/core24_609.snap on /usr/share/pkgconfig type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/core24_609.snap on /usr/share/plymouth type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/core24_609.snap on /usr/share/polkit-1 type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/core24_609.snap on /usr/share/profile type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/core24_609.snap on /usr/share/profile.md5sums type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/core24_609.snap on /usr/share/python3 type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/core24_609.snap on /usr/share/readline type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/core24_609.snap on /usr/share/secureboot type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/core24_609.snap on /usr/share/sensible-utils type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/core24_609.snap on /usr/share/sgml type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/core24_609.snap on /usr/share/sgml-base type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/core24_609.snap on /usr/share/snappy type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/core24_609.snap on /usr/share/staff-group-for-usr-local type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/core24_609.snap on /usr/share/subiquity type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/core24_609.snap on /usr/share/systemd type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/core24_609.snap on /usr/share/tabset type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/core24_609.snap on /usr/share/terminfo type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/core24_609.snap on /usr/share/ucf type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/core24_609.snap on /usr/share/util-linux type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/core24_609.snap on /usr/share/vim type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/core24_609.snap on /usr/share/xml type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/core24_609.snap on /usr/share/xml-core type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/var/lib/snapd/snaps/core24_609.snap on /usr/share/zoneinfo type squashfs (ro,nodev,relatime,errors=continue,threads=single)
/dev/sda1 on /var/snap/lxd/common/lxd/storage-pools type ext4 (rw,relatime,discard,errors=remount-ro,commit=30)
/dev/sda1 on /var/snap/lxd/common/lxd/devices type ext4 (rw,relatime,discard,errors=remount-ro,commit=30)
tmpfs on /var/lib/snapd/hostfs/var/snap/lxd/common/ns type tmpfs (rw,relatime,size=1024k,mode=700,inode64)
tmpfs on /var/snap/lxd/common/ns type tmpfs (rw,relatime,size=1024k,mode=700,inode64)
tmpfs on /var/snap/lxd/common/shmounts type tmpfs (rw,relatime,size=1024k,mode=711,inode64)
/var/lib/snapd/snaps/lxd_31942.snap on /usr/bin/kmod type squashfs (ro,relatime,errors=continue,threads=single)
/dev/sda16 on /boot type ext4 (ro,relatime)
tmpfs on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755,inode64)
tmpfs on /etc type tmpfs (rw,relatime,mode=755,inode64)
tmpfs on /usr/share/misc type tmpfs (rw,relatime,mode=755,inode64)
devtmpfs on /var/lib/snapd/hostfs/dev type devtmpfs (rw,nosuid,noexec,relatime,size=8177112k,nr_inodes=2044278,mode=755,inode64)
proc on /var/lib/snapd/hostfs/proc type proc (rw,nosuid,nodev,noexec,relatime)
sysfs on /var/lib/snapd/hostfs/sys type sysfs (rw,nosuid,nodev,noexec,relatime)
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,inode64)
tmpfs on /var/snap/lxd/common/lxd/devlxd type tmpfs (rw,relatime,size=100k,mode=755,inode64)
root@v1:~# LD_LIBRARY_PATH=/snap/lxd/current/lib/:/snap/lxd/current/lib/x86_64-linux-gnu/:/snap/lxd/current/zfs-2.2/lib PATH=/snap/lxd/current/zfs-2.2/bin:/snap/lxd/current/bin:$PATH nsenter --mount=/run/snapd/ns/lxd.mnt -- mount | grep sdb
/dev/sdb on /mnt type ext4 (rw,relatime)
root@v1:~# LD_LIBRARY_PATH=/snap/lxd/current/lib/:/snap/lxd/current/lib/x86_64-linux-gnu/:/snap/lxd/current/zfs-2.2/lib PATH=/snap/lxd/current/zfs-2.2/bin:/snap/lxd/current/bin:$PATH nsenter --mount=/run/snapd/ns/lxd.mnt -- umount /dev/sdb
root@v1:~# blkdiscard /dev/sdb
blkdiscard: /dev/sdb contains existing file system (ext4).
blkdiscard: This is destructive operation, data will be lost! Use the -f option to override.
root@v1:~# blkdiscard -f /dev/sdb
blkdiscard: Operation forced, data will be lost!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants