Skip to main content
added 108 characters in body
Source Link
Gilles 'SO- stop being evil'
  • 865.9k
  • 205
  • 1.8k
  • 2.3k

A mount point /mnt/sub is shadowed by another mount point /mnt. Is it always possible to access the mounted filesystem?

Root access is a given. The system is a reasonably recent Linux.

Example scenario: accessing the branches of an overlay root

The basic sequence of operations is:

mount device1 /mnt/sub mount device2 /mnt 

After this /mnt/sub is a file on device2 (if it exists). The question is how to access files on device1.

Some devices can be mounted twice, so mount device1 /elsewhere would work. But this doesn't work for all devices, in particular not for FUSE filesystems.

This differs from the already covered case where a subdirectory is shadowed by a mount point, but the mount point of the subdirectory is itself visible, and a bind mount can create an unobscured view. In the example above, mount --bind / /elsewhere lets us see the /mnt/sub directory from the root filesystem on /elsewhere/mnt/sub, but this question is about accessing the filesystem on device1.

A mount point /mnt/sub is shadowed by another mount point /mnt. Is it always possible to access the mounted filesystem?

Root access is a given. The system is a reasonably recent Linux.

Example scenario: accessing the branches of an overlay root

The basic sequence of operations is:

mount device1 /mnt/sub mount device2 /mnt 

After this /mnt/sub is a file on device2 (if it exists). The question is how to access files on device1.

Some devices can be mounted twice, so mount device1 /elsewhere would work. But this doesn't work for all devices, in particular not for FUSE filesystems.

This differs from the case where a subdirectory is shadowed by a mount point, but the mount point of the subdirectory is itself visible, and a bind mount can create an unobscured view. In the example above, mount --bind / /elsewhere lets us see the /mnt/sub directory from the root filesystem on /elsewhere/mnt/sub, but this question is about accessing the filesystem on device1.

A mount point /mnt/sub is shadowed by another mount point /mnt. Is it always possible to access the mounted filesystem?

Root access is a given. The system is a reasonably recent Linux.

Example scenario: accessing the branches of an overlay root

The basic sequence of operations is:

mount device1 /mnt/sub mount device2 /mnt 

After this /mnt/sub is a file on device2 (if it exists). The question is how to access files on device1.

Some devices can be mounted twice, so mount device1 /elsewhere would work. But this doesn't work for all devices, in particular not for FUSE filesystems.

This differs from the already covered case where a subdirectory is shadowed by a mount point, but the mount point of the subdirectory is itself visible, and a bind mount can create an unobscured view. In the example above, mount --bind / /elsewhere lets us see the /mnt/sub directory from the root filesystem on /elsewhere/mnt/sub, but this question is about accessing the filesystem on device1.

replaced http://unix.stackexchange.com/ with https://unix.stackexchange.com/
Source Link

A mount point /mnt/sub is shadowed by another mount point /mnt. Is it always possible to access the mounted filesystem?

Root access is a given. The system is a reasonably recent Linux.

Example scenario: accessing the branches of an overlay rootaccessing the branches of an overlay root

The basic sequence of operations is:

mount device1 /mnt/sub mount device2 /mnt 

After this /mnt/sub is a file on device2 (if it exists). The question is how to access files on device1.

Some devices can be mounted twice, so mount device1 /elsewhere would work. But this doesn't work for all devices, in particular not for FUSE filesystems.

This differs from the case where a subdirectory is shadowed by a mount point, but the mount point of the subdirectory is itself visible, and a bind mount can create an unobscured view. In the example above, mount --bind / /elsewhere lets us see the /mnt/sub directory from the root filesystem on /elsewhere/mnt/sub, but this question is about accessing the filesystem on device1.

A mount point /mnt/sub is shadowed by another mount point /mnt. Is it always possible to access the mounted filesystem?

Root access is a given. The system is a reasonably recent Linux.

Example scenario: accessing the branches of an overlay root

The basic sequence of operations is:

mount device1 /mnt/sub mount device2 /mnt 

After this /mnt/sub is a file on device2 (if it exists). The question is how to access files on device1.

Some devices can be mounted twice, so mount device1 /elsewhere would work. But this doesn't work for all devices, in particular not for FUSE filesystems.

This differs from the case where a subdirectory is shadowed by a mount point, but the mount point of the subdirectory is itself visible, and a bind mount can create an unobscured view. In the example above, mount --bind / /elsewhere lets us see the /mnt/sub directory from the root filesystem on /elsewhere/mnt/sub, but this question is about accessing the filesystem on device1.

A mount point /mnt/sub is shadowed by another mount point /mnt. Is it always possible to access the mounted filesystem?

Root access is a given. The system is a reasonably recent Linux.

Example scenario: accessing the branches of an overlay root

The basic sequence of operations is:

mount device1 /mnt/sub mount device2 /mnt 

After this /mnt/sub is a file on device2 (if it exists). The question is how to access files on device1.

Some devices can be mounted twice, so mount device1 /elsewhere would work. But this doesn't work for all devices, in particular not for FUSE filesystems.

This differs from the case where a subdirectory is shadowed by a mount point, but the mount point of the subdirectory is itself visible, and a bind mount can create an unobscured view. In the example above, mount --bind / /elsewhere lets us see the /mnt/sub directory from the root filesystem on /elsewhere/mnt/sub, but this question is about accessing the filesystem on device1.

Tweeted twitter.com/StackUnix/status/723207908066992128
Source Link
Gilles 'SO- stop being evil'
  • 865.9k
  • 205
  • 1.8k
  • 2.3k

Accessing a shadowed mount point

A mount point /mnt/sub is shadowed by another mount point /mnt. Is it always possible to access the mounted filesystem?

Root access is a given. The system is a reasonably recent Linux.

Example scenario: accessing the branches of an overlay root

The basic sequence of operations is:

mount device1 /mnt/sub mount device2 /mnt 

After this /mnt/sub is a file on device2 (if it exists). The question is how to access files on device1.

Some devices can be mounted twice, so mount device1 /elsewhere would work. But this doesn't work for all devices, in particular not for FUSE filesystems.

This differs from the case where a subdirectory is shadowed by a mount point, but the mount point of the subdirectory is itself visible, and a bind mount can create an unobscured view. In the example above, mount --bind / /elsewhere lets us see the /mnt/sub directory from the root filesystem on /elsewhere/mnt/sub, but this question is about accessing the filesystem on device1.