LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-02-2012, 04:44 AM   #1
kostya
Member
 
Registered: Mar 2010
Location: Moscow, Russia
Distribution: Ubuntu Studio, antix(mepis), Fedora, FreeBSD
Posts: 174
Blog Entries: 5

Rep: Reputation: 18
Live Image mount: union FS overlay vs dmsetup overlay


Hi everyone,

I've been testing booting my installed Fedora 16 system from a squashfs'ed image (hosting all fs except my $HOME files). That seems to be a good option for many reasons and has good potentials of use, but for now it is just testing. I'll post more about it in another thread once finished...

I'm using AUFS to mount a writeable overlay, to which I then mount --bind my rw home. To be able to do that I installed a zen-kernel as Fedora includes no support for union filesystems.
Then, analyzing Fedora dracut boot modules I found, that it deals with this problem by using dmsetup like this:
Code:
dd if=/dev/null of=$OVERLAY_LOOPDEV bs=1024 count=1 seek=$((512*1024))
losetup $OVERLAY_LOOPDEV /overlay #this to create overlay image and mount it on loop device
echo 0 `blockdev --getsz $BASE_LOOPDEV` snapshot $BASE_LOOPDEV $OVERLAY_LOOPDEV p 8 | dmsetup create live-rw  #this unites them together, a ro image and rw overlay into the "live-rw" snapshot
While I'm using aufs like this:
Code:
mount -t aufs -o br:$overlay=rw:$squash_img_mnt=ro none $root_mount
mount --bind $HOME(rw) $root_mount/home
(the 200M $overlay is for the system writes and HOME is for me, didn't want to mix these together)

Now the question is: which is better and why?

Fedora doesn't include any union fs into kernel, but keeps using dmsetup for live images, and I prefer to use as much as possible the distro-provided tools to deal with an issue. Fedora is fine, but quite often prefers experimental features over those known for stability, as I have noticed (though it's been my distro of choice these last 3 years). This thread seems to touch upon some existing issues with dmsetup approach to live-img rw overlay, for example.

Then Debian-derived distros do include unionfs into kernel. And overall I couldn't find that much information about it all, except by hacking the initrd creating software in these distros...

Does anyone of you have any such experience? Maybe there are some general considerations as to why the one approach could be preferred over the other? Device-mapper approach over union filesystem mount and vice versa?
I'll keep studying it myself, meantime every thought will be greatly appreciated .

Thanks in advance,
Kostya
 
Old 02-02-2012, 03:08 PM   #2
kostya
Member
 
Registered: Mar 2010
Location: Moscow, Russia
Distribution: Ubuntu Studio, antix(mepis), Fedora, FreeBSD
Posts: 174

Original Poster
Blog Entries: 5

Rep: Reputation: 18
It seems, here is given a very good and detailed answer.
So generally, my question answered.
 
Old 02-16-2012, 06:38 AM   #3
kostya
Member
 
Registered: Mar 2010
Location: Moscow, Russia
Distribution: Ubuntu Studio, antix(mepis), Fedora, FreeBSD
Posts: 174

Original Poster
Blog Entries: 5

Rep: Reputation: 18
OK mark as SOLVED.

Thanks to everyone )
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] unable to create persistent overlay with fc-15 live-usb schneidz Fedora 4 10-31-2011 08:38 AM
fedora-14 live usb - overlay persistent file space issues schneidz Fedora 5 12-12-2010 06:21 PM
How do I boot DSL as a live USB with a persistent overlay without unetbootin and... This is my username DamnSmallLinux 1 08-30-2009 02:48 PM
LXer: Enhance image overlay maps in Google Earth with altitude attributes LXer Syndicated Linux News 0 09-26-2008 01:00 AM
persistent image overlay --live usb fedora 9 kalabharath Linux - Newbie 1 08-05-2008 07:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:46 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration