Filesystem overlay ?
Peter L. Peres
plp-ysDPMY98cNQDDBjDh4tngg at public.gmane.org
Mon Feb 7 17:59:24 UTC 2005
On Mon, 7 Feb 2005, Lennart Sorensen wrote:
> On Fri, Feb 04, 2005 at 02:40:18PM -0700, Adil Kodian wrote:
>> this isnt any complex feature.
>>
>> you have a CDROM mounted with /var on it that is read-only.
>>
>> now you can create a ramdisk and mount it as /var (or whatever you need to
>> be writable.
>>
>> it will overlay your existing /var and use the mounted /var. when you
>> reboot, everything is lost.
>
> Hmm, in my experience, if you mount something on top of something else,
> the something else is hidden until you unmount the new thing. Maybe
> there are mount options to change that but I don't think it does so by
> default. I could be wrong though. I haven't tried it in a while.
That is correct. That's why I proposed for the something to be copied to
the target by a script just before remunting it under /var. E.g.
fsck /dev/hda7 && \
mount /dev/hda7 /mnt/tmphda7 && \
cp -dpr /var/* /mnt/tmphda7 && \
sync && \
umount /dev/hda7 && \
mount /dev/hda7 /var
if [ $? -ne 0 ]; then
echo -e "something went wrong: operator assistance required\a"
read junk
fi
## we won, do something
Peter
--
The Toronto Linux Users Group. Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml
More information about the Legacy
mailing list