lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi] Transitive bind mounts in nested chroots


From: Greg Chicares
Subject: [lmi] Transitive bind mounts in nested chroots
Date: Thu, 21 May 2020 15:42:22 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0

Vadim--GNU/Linux bind mounts seem to work transitively. For example,
given a bullseye chroot nested in a centos chroot on a buster host,
doing this on the buster host (call this command "A"):

  mount --bind /srv/cache_for_lmi /srv/chroot/centos7lmi/srv/cache_for_lmi

and then this in the intermediate centos chroot (call this "B"):

  mount --bind /srv/cache_for_lmi /srv/chroot/bullseye/srv/cache_for_lmi

seems to accomplish the same effect in the innermost chroot as
doing this on the buster host (call this "C"):

  mount --bind /srv/cache_for_lmi 
/srv/chroot/centos7lmi/srv/chroot/bullseye/srv/cache_for_lmi

All I want is the effect of "C". But "A+B" seems clearer to write,
because it treats the intermediate chroot as autonomous--as though
it were the ultimate host.

(I don't care about the side effect that "A" has the side effect
of making 'cache_for_lmi' available in the intermediate chroot,
where I'd never use it.)

However...is "A+B" considered harmful? I understand that chained
bind mounts aren't allowed for NFS, but my use case isn't NFS:
all my mounts are on the same server (perhaps on different disks).


reply via email to

[Prev in Thread] Current Thread [Next in Thread]