Skip to content

When moving a mounted tree, all mounted sub tree entries in utab should also be updated #1659

@fbuihuu

Description

@fbuihuu

To illustrate the problem, consider the following use case:

# mount -ox-initrd.mount /dev/vdb /mnt
# mount -ox-initrd.mount /dev/vdb /mnt/mnt/
# cat /run/mount/utab
SRC=/dev/vdb TARGET=/mnt ROOT=/	OPTS=x-initrd.mount
SRC=/dev/vdb TARGET=/mnt/mnt ROOT=/ OPTS=x-initrd.mount
# mount --move /mnt /opt
# cat /run/mount/utab
SRC=/dev/vdb TARGET=/opt ROOT=/	OPTS=x-initrd.mount
SRC=/dev/vdb TARGET=/mnt/mnt ROOT=/ OPTS=x-initrd.mount

Here we can see that the entry for the moved mounted tree /mnt has been correctly updated to the new target /opt however the target of the mounted sub tree /mnt/mnt remained unchanged whereas its new location is at /opt/mnt.

Metadata

Metadata

Assignees

No one assigned

    Labels

    TODOWe going to think about it ;-)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions