Mounting Filesystem over existing directory

Sameer Naik sameer.subscriptions at damagehead.com
Wed May 30 12:09:23 UTC 2012


Thanks Harald,

I had actually confirmed the behaviour of bind and rbind prior to
making the post.
As it appears bind and rbind are more suited for a chrooted environment.

Following your recommendation, I will try aufs.

Regards
~Sameer

On Wed, May 30, 2012 at 2:53 PM, ralda at gmx.de <ralda at gmx.de> wrote:
> Hi Eduardo !
>
>> Yes that's possible just bind mount a tmpfs dir. So create a tmpfs
>> somewhere eg. /tmpfs then mount -o bind /tmpfs /etc.
>
> This is incorrect. If you mount a file system this way you replace the
> original contents of the directory with contents of the new file system.
>
> The question was to merge the contents of the two file systems. You
> either need to fiddle with symlinks, or need to copy original content
> to a tmpfs and mount that on /etc, or you need to use a union file
> system (which is not part of the standard kernel).
>
> Consider using aufs. I had really success with using this one, without
> any problems in practical use. Problems only arrive when you bypass the
> aufs layer and try to fiddle with the contents of he underlying file
> systems. It is a really nasty thing to have default contents on a read
> only file system (or image) and have a copy on write file system on top
> of the read only system. This allows you to change the contents of any
> file on the fly even if the rest is still on read only file system.
> With some thought you may even backup your modified files and restore
> after boot. The Live CD of SystemRescueCd system (and other Linux live
> CD systems) use this type of mounting.
>
> --
> Harald
> _______________________________________________
> busybox mailing list
> busybox at busybox.net
> http://lists.busybox.net/mailman/listinfo/busybox


More information about the busybox mailing list