Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: trying to get unionfs or aufs working
PostPosted: Thu Jul 29, 2010 5:46 am 
Offline

Joined: Thu Jan 22, 2009 4:53 pm
Posts: 45
This is a major edit from my former post:

The reason for my attempts at the following
1. On an ssd or ad or any type of flash media, compressing /usr with sqashfs and some sort of union overlay increases speed immensely.
2. /usr becomes approximately 1/3 of it's original size. On Arch and Ubuntu based EEEbuntu, free space on the device went from 580 MB to 2.1 GB

This does work if I set everything to mount to union at /usr1 but boot stops if I have union-fuse mount to an empty /usr directory (by moving usr to usr2 and recreating an empty usr directory.

The machine will not boot if I set it to /usr, so i am assuming that the unionfs-fuse is NOT occurring soon enough in the boot process and therefore /usr is not writable and boot can go no further? The problem in EB4 is that even in "single' rescue mode, there is a graphic splash and I can't see what is going on completely and it just stops giving text after it shows it successfully mounts the root directory: boot hangs with no other info. I know in ubuntu lucid there was an issue with "mountall" that had been fixed but debian does not have this package.

fstab lines:
/squashed/usr/usr.sfs /squashed/usr/ro squashfs ro,loop,nodev 0 0
unionfs-fuse#/squashed/usr/rw=rw:/squashed/usr/ro=ro /usr1 fuse cow,allow_other,nodev,rw 0 0


I have added this to /etc/modules

squashfs
loop
fuse

unionfs and unionfs-fuse don't seem to be "modules" along with with unionfs-fuse so I have not added those.

And just for good measure: I added to /etc/rc.local
modprobe fuse
mount -a

It is just weird to me that it is working, but not on a "needed" filesystem at boot.

Is this supposed to work from boot, or is there a kernel hook needed to get this to work?

In single user mode (recovery), it hangs after it mounts the root filesystem (that gets an "ok")


Top
 Profile E-mail  
 
 Post subject: Re: trying to get unionfs or aufs working
PostPosted: Tue Aug 03, 2010 4:44 pm 
Offline
Developer
User avatar

Joined: Sun Sep 27, 2009 8:41 pm
Posts: 336
eeePC model: 1005HA
Aurora version: Beta 4.0
Hmm, Ive been looking around and so far I have found that the new kernels we are working on have support for UFS as a module, but writing support disabled. It says that UFS write support is dangerous, but I could enable it for you if you would like. As for Aufs, Debian experimental has some patches which enable it, Ill add those to the Aurora kernels so you could see if that works


Top
 Profile E-mail  
 
 Post subject: Re: trying to get unionfs or aufs working
PostPosted: Wed Aug 04, 2010 12:04 am 
Offline

Joined: Thu Jan 22, 2009 4:53 pm
Posts: 45
UFS? UnionFS? I used "regular" unionfs with Ubuntu (Kubuntu Hardy when I had it running off of an SD card on my EEEPC 701) for quite some time and no major issues mounting an rw directory on top of a mounted squashfs of /usr. That was about 3 years ago I think. I just added "unionfs" to /etc/modules and it worked. I suppose if you had a crash during an update or while installing a package, there would be a bit of a mess, but that could happen anyway.

I would prefer aufs, as that seems to be the "newer and more improved" way to do it. It just needs to be able to create an rw overlay onto another ro directory (one with a squashfs mounted to an ro directory).


Top
 Profile E-mail  
 
 Post subject: Re: trying to get unionfs or aufs working
PostPosted: Wed Aug 04, 2010 6:15 am 
Offline
Developer
User avatar

Joined: Sun Sep 27, 2009 8:41 pm
Posts: 336
eeePC model: 1005HA
Aurora version: Beta 4.0
Interesting... Maybe there was a change in the UnionFS driver since you last used it. Anyway, I will enable write support for UFS. And as soon as my laptop is back up and running, Ill get started with adding Aufs to the kernel. I think I could have it ready by Friday. Willing to test more kernels?


Top
 Profile E-mail  
 
 Post subject: Re: trying to get unionfs or aufs working
PostPosted: Wed Aug 04, 2010 5:21 pm 
Offline

Joined: Thu Jan 22, 2009 4:53 pm
Posts: 45
Sure. I can help up until Aug 12. I will be working on a work project for a few weeks that will require most of my attention. Then I go back to work. Tough life as a teacher:-)

I can still help after Aug 24, but my attention will be spotty with the beginning of a new school year.

I find it odd that unionfs had write support disabled and that it is considered "dangerous;" I think it is still enabled in Ubuntu but I have not tried. "Dangerous" to me is something that would cause catastrophic loss. For those of us who know how to use it and would bother, I guess we would know what we were getting into!


Top
 Profile E-mail  
 
 Post subject: Re: trying to get unionfs or aufs working
PostPosted: Fri Aug 06, 2010 6:34 am 
Offline
Developer
User avatar

Joined: Sun Sep 27, 2009 8:41 pm
Posts: 336
eeePC model: 1005HA
Aurora version: Beta 4.0
Well, aufs is going to take a while to get working. It just doesnt want to build correctly, but Ill keep at it...


Top
 Profile E-mail  
 
 Post subject: Re: trying to get unionfs or aufs working
PostPosted: Mon Aug 09, 2010 4:58 pm 
Offline
Developer
User avatar

Joined: Sun Sep 27, 2009 8:41 pm
Posts: 336
eeePC model: 1005HA
Aurora version: Beta 4.0
Finally got aufs working. Files. I also compiled/included the aufs2-utils, but i dont know if those will run correctly. Please test it and see if it works now


Top
 Profile E-mail  
 
 Post subject: Re: trying to get unionfs or aufs working
PostPosted: Tue Aug 10, 2010 4:21 am 
Offline

Joined: Thu Jan 22, 2009 4:53 pm
Posts: 45
It all works: wifi, aufs. I did the following (as root):

Code:
mkdir -p /squashed/usr/ro
mkdir /squashed/usr/rw


Code:
mksquashfs /usr /squashed/usr/usr.sfs -b 65536


Added these lines to fstab:
Code:
/squashed/usr/usr.sfs   /squashed/usr/ro   squashfs   loop,ro   0 0
usr    /usr    aufs    udba=reval,br:/squashed/usr/rw:/squashed/usr/ro  0 0


then

Code:
init 1


Code:
mv /usr /usr.old
mkdir /usr
reboot


It did take longer for it to boot which isn't a big deal (the splash eb4 circle disappeared and I got a blinking cursor for a while but it did come up to the desktop. I am using an SD card for my experimenting of the kernels so that makes it pretty slow anyway. It is noticeably faster operating once the desktop is up compared to a non compressed /usr directory.

I also went ahead and did the same thing to my /home/usr/.wine directory. It is important to make the /squashed/wine/rw directory owned by the user or it won't work.

I went ahead and did an rm -rf to the /usr.old directory

Originally, free space was 1.6 GB but after this, free space is 3.7 GB

Nice job and anyone with a 1201T or N will be eternally grateful for the wifi (and not know it) and for those of us with SSD's, USB sticks, SD Cards or anyone with limited space really can take advantage of the aufs support.


Top
 Profile E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: