Skip to content

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

@nirs

Description

@nirs

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/)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions