-
Notifications
You must be signed in to change notification settings - Fork 933
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
Comments
Can you try unmounting the /mnt dir inside the lxd snap mount namespace, it might be snaps environment holding onto the mount. |
Indeed, the snap mount NS still shows
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 havingswapoff
the swapfile andumount
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:
Setup swapfile on extra disk:
Trying to discard the extra disk but failing due to LXD holding on to it:
Workaround to release the block device:
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
The text was updated successfully, but these errors were encountered: