Mounting Filesystem over existing directory

2012-05-30 Thread Sameer Naik
Hello, I have a rather unusual query. Consider that i have a readonly filesystem mounted at / and that the /etc folder consists of some files. Is is possible to mount a ramfs filesystem at /etc such that the existing files in the /etc partition are still accessible and any new files written to

Re: Mounting Filesystem over existing directory

2012-05-30 Thread Ralf Friedl
What you are looking for is sometimes called union file system. There exist some variations of such file systems, unfortunately there is none in the official kernel. It seems that Linus doesn't like the idea. Of course this is not related to busybox. You may want to look at the implementation

Re: Mounting Filesystem over existing directory

2012-05-30 Thread Sameer Naik
Thanks for the quick response. I will check out the links Bartos provided. Certainly, my query is not related to busybox, but where else can i find a better community for my query :) Regards ~Sameer On Wed, May 30, 2012 at 12:34 PM, Ralf Friedl ralf.fri...@online.de wrote: What you are looking

Re: Mounting Filesystem over existing directory

2012-05-30 Thread Bartos-Elekes Zsolt
Sameer Naik wrote: Consider that i have a readonly filesystem mounted at / and that the /etc folder consists of some files. Is is possible to mount a ramfs filesystem at /etc such that the existing files in the /etc partition are still accessible and any new files written to the /etc

Re: Mounting Filesystem over existing directory

2012-05-30 Thread Laurent Bercot
Consider that i have a readonly filesystem mounted at / and that the /etc folder consists of some files. Is is possible to mount a ramfs filesystem at /etc such that the existing files in the /etc partition are still accessible and any new files written to the /etc partition are saved in the

Re: Mounting Filesystem over existing directory

2012-05-30 Thread Eduardo Tongson
On Wed, May 30, 2012 at 6:46 AM, Sameer Naik sameer.subscripti...@damagehead.com wrote: Hello, I have a rather unusual query. Consider that i have a readonly filesystem mounted at / and that the /etc folder consists of some files. Is is possible to mount a ramfs filesystem at /etc such that

Re: Mounting Filesystem over existing directory

2012-05-30 Thread ra...@gmx.de
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

Re: Mounting Filesystem over existing directory

2012-05-30 Thread Eduardo Tongson
On Wed, May 30, 2012 at 9:23 AM, ra...@gmx.de ra...@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

Re: Mounting Filesystem over existing directory

2012-05-30 Thread Sameer Naik
Hello Laurent, The techniques you have mentioned are definitely an option. I will give aufs a honest try and fallback to whatever to you have mentioned if turns out to too much of a hassle :) Regards ~Sameer On Wed, May 30, 2012 at 11:54 AM, Laurent Bercot ska-dietl...@skarnet.org wrote:

Re: Mounting Filesystem over existing directory

2012-05-30 Thread Sameer Naik
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, ra...@gmx.de ra...@gmx.de

Re: Mounting Filesystem over existing directory

2012-05-30 Thread Tito
On Wednesday 30 May 2012 11:42:59 Eduardo Tongson wrote: On Wed, May 30, 2012 at 9:23 AM, ra...@gmx.de ra...@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

Re: Mounting Filesystem over existing directory

2012-05-30 Thread Michael Conrad
On 5/30/2012 3:08 AM, Sameer Naik wrote: Thanks for the quick response. I will check out the links Bartos provided. Certainly, my query is not related to busybox, but where else can i find a better community for my query :) Regards ~Sameer Indeed, you're posting your question to a lot of