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

Stale links remain after reboot, can lead to corrupting unrelated loop devices #8

Open
nirs opened this issue Aug 6, 2019 · 0 comments
Labels
bug Something isn't working

Comments

@nirs
Copy link
Owner

nirs commented Aug 6, 2019

Rebooting without deleting user storage leaves stale symlinks in the storage base directory.
The stale links are mostly harmless except the loop devices links.

For example, we may have this link after reboot:

/var/tmp/my-storage/
    block-512-loop -> /dev/loop0

If you create a another loop device after reboot, the link will point to the unrelated loop device, and the tests using this link will write the unrelated device. Deleting the storage will detach the unrelated device.

One way to solve this is to install a systemd unit for every backend, so the storage is restored after reboot. Not sue how loop devices can be managed, since they can have different numbers after reboot, depending on other loop devices existing at the time the storage was created.

Another way to solve this is to keep the links in tmpfs (e.g /run/userstorage), so they disappear after reboot. But this will not work for the loop devices backing files which must not be on tmpfs, so maybe move them to another directory (~/.local/userstorage/backing/)

@nirs nirs added the bug Something isn't working label Aug 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant