Blog Forum Wiki Links Contact Us NetbookUser
RunCore Pro IV SSD Transforms your ASUS EEE PC by increasing 
performance 5-40X. Your satistfaction guaranteed RunCore Pro 70mm SATA Mini PCI-e SSD
RunCore Pro IV 70mm SATA II Mini PCI-e SSD
RunCore Pro IV 2.5 Inch SATA II SSD

You are not logged in.

#1 2008-12-12 6:37:10 pm

tusko
Member
Registered: 2008-12-12
Posts: 16

A new way to get more space for root filesystem without removing aufs

Hi, I got this because the aufs was full (due system modifications, package removing, installing, several vmware attempts, etc.) and I did not want to reinstall and lose my previous system configuration work.

What I'm doing here is expanding aufs to a new directory (named rw) in the user filesystem (mounted at /home). After that, df -h should show more free space than before.

Take into account that I'm testing this and it's up to you to perform the following steps. I'm not taking any responsibility of any bad consequence...

From the console execute the following commands:

$ sudo su -

# mkdir /home/rw

(the rw name is optional, you can name the new dir as you want, provided you are coherent in the next steps)

# df -h

(check the free space in rootfs)

# mount -o remount,prepend:/home/rw=rw,create=mfs /

# df -h

(Enjoy more free space!!)

Note that this change is not permanent on reboot. If you want to make the change permanent, you can add the previous mount command to /usr/sbin/services.sh. I added it after the PATH=... line.

Last edited by tusko (2009-01-04 3:41:04 pm)

Offline

 

#2 2009-01-01 3:12:12 pm

guiddruid
Member
Registered: 2008-09-24
Posts: 32

Re: A new way to get more space for root filesystem without removing aufs

I am having some trouble getting this to work. First time I tried the sequence, the commands completed with no errors, but df -h showed no difference. I rebooted (shutdown, then power back on), removed the empty /home/rw, then tried again. Seems something did hang around over the reboot?:

Code:

/home/user> sudo su -
asus-422339844:/root> mkdir /home/rw
asus-422339844:/root> df -h
Filesystem            Size  Used Avail Use% Mounted on
rootfs                680M  557M   89M  87% /
/dev/sda1             680M  557M   89M  87% /
none                  680M  557M   89M  87% /
tmpfs                1011M   12K 1011M   1% /dev/shm
tmpfs                 128M   56K  128M   1% /tmp
/dev/sdb1              15G  8.0G  6.2G  57% /home
/dev/sda1             3.1G  2.4G  652M  79% /ro
asus-422339844:/root> mount -o remount,br:/home/rw=rw:/.rw=rw:/.ro=ro,create=mfs /
mount: / not mounted already, or bad option

any ideas? i'll have to read the man pages for  mount and work out what I was trying to achieve...

Offline

 

#3 2009-01-02 11:25:58 am

tusko
Member
Registered: 2008-12-12
Posts: 16

Re: A new way to get more space for root filesystem without removing aufs

guidddruid, it seems to me that aufs is not enabled during your boot (are you performing a normal boot or did you remove aufs previously?). Please, let me know what is shown on console when you execute

# mount

, without any options. For the record, I'll post here what is shown by my machine when I execute "df -h" and "mount":

# df -h
S.ficheros          Tamaņo Usado  Disp Uso% Montado en
rootfs                 15G  6,1G  8,1G  43% /
/dev/sda1             3,1G  2,7G  385M  88% /.ro
/dev/sda2             680M  561M   85M  87% /.rw
none                   15G  6,1G  8,1G  43% /
tmpfs                 503M   12K  503M   1% /dev/shm
tmpfs                 503M     0  503M   0% /media
tmpfs                 128M  644K  128M   1% /tmp
/dev/sdb1              15G  6,1G  8,1G  43% /home
/dev/sda1             3,1G  2,7G  385M  88% /ro

# mount
rootfs on / type rootfs (rw)
/dev/sda1 on /.ro type ext2 (ro)
/dev/sda2 on /.rw type ext3 (rw,noatime,data=ordered)
none on / type aufs (rw,xino=/.rw/.aufs.xino,create=mfs,br:/home/rw=rw:/.rw=rw:/.ro=ro)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw)
tmpfs on /dev/shm type tmpfs (rw)
tmpfs on /media type tmpfs (rw)
tmpfs on /tmp type tmpfs (rw)
/dev/sdb1 on /home type ext3 (rw,noatime,data=ordered)
usbfs on /proc/bus/usb type usbfs (rw)
none on /proc/fs/vmblock/mountPoint type vmblock (rw)
/dev/sda1 on /ro type ext2 (ro)

I think that the only difference between my machine and an unmodified 901 is that aufs includes /home/rw (fourth line after the mount command). As a consequence, df -h shows a 15G rootfs, but this is performed by remounting during boot on a system which is already using aufs. If you  removed aufs or you boot in rescue mode, aufs is not enabled and the steps on my post should not work.

Offline

 

#4 2009-01-02 1:30:22 pm

guiddruid
Member
Registered: 2008-09-24
Posts: 32

Re: A new way to get more space for root filesystem without removing aufs

I have not removed aufs (i've read about how to do so, and don't think i could have done similar steps by accident).

I have previously booted in via the rescue console to remove a bunch of applications I did not want (mainly to replace the broken staroffice8 with ooo3)

I am running in "advanced" mode, here are the results of df -h and mount (free space now terribly low, since I installed firefox 3.0.4 ... not sure that was a great step forwards. it seems slower than ff2)

Code:

/home/user> mount
rootfs on / type rootfs (rw)
/dev/sda1 on / type ext2 (ro)
none on / type aufs (rw,xino=/.aufs.xino,br:/=rw:/=ro)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw)
tmpfs on /dev/shm type tmpfs (rw)
tmpfs on /tmp type tmpfs (rw)
/dev/sdb1 on /home type ext3 (rw,noatime,data=ordered)
usbfs on /proc/bus/usb type usbfs (rw)
none on /proc/fs/vmblock/mountPoint type vmblock (rw)
/dev/sda1 on /ro type ext2 (ro)
/home/user> df -h
Filesystem            Size  Used Avail Use% Mounted on
rootfs                680M  632M   14M  98% /
/dev/sda1             680M  632M   14M  98% /
none                  680M  632M   14M  98% /
tmpfs                1011M   12K 1011M   1% /dev/shm
tmpfs                 128M   56K  128M   1% /tmp
/dev/sdb1              15G  8.0G  6.2G  57% /home
/dev/sda1             3.1G  2.4G  652M  79% /ro

Offline

 

#5 2009-01-02 3:21:30 pm

tusko
Member
Registered: 2008-12-12
Posts: 16

Re: A new way to get more space for root filesystem without removing aufs

Look, what I found weird about your command results is that /dev/sda2 is not mounted anywhere !! I think it should because sda1 contains the read-only part of the union and sda2 contains the modifications (this info can be obtained from the docs in the wiki about the aufs in the 901 and unionfs of previous asus eeepc versions). The aufs filesystem makes an union of /dev/sda1 and /dev/sda2. However, your results show an union which uses only /dev/sda1 (mounted at  /). I dunno, maybe there are different default configs depending on the 901 version.

Maybe someone with an unmodified aufs can place here what he sees when executing "mount", then we will have more info.

On the other hand you should check if /dev/sda2 exists in your machine. To check, execute "fdisk -l" as root.

Offline

 

#6 2009-01-02 4:46:40 pm

tusko
Member
Registered: 2008-12-12
Posts: 16

Re: A new way to get more space for root filesystem without removing aufs

The fact that your "df -h" shows two entries with /dev/sda1, each one showing different sizes makes me wonder if your setup is hiding /dev/sda2, but performing the union correctly. If that is the case, try if this enlarges your aufs (you must have created /home/rw before, and execute the command as root):

# mount -o remount,rw,xino=/.aufs.xino,create=mfs,br:/home/rw=rw:/=rw:/=ro /

Those are the same options shown by your mount command in the aufs line, and adds the branch /home/rw to the union as read write (the br:/home/rw=rw part), and tells the union to create new files in the branch with more  free space (create=mfs)

If this works, then the command is different depending on the aufs setup (mine or yours).

Please let me know if it works...

Offline

 

#7 2009-01-03 6:24:44 am

guiddruid
Member
Registered: 2008-09-24
Posts: 32

Re: A new way to get more space for root filesystem without removing aufs

the modified command doesn't work either - same error. I've copied the results of the fdisk -l

Code:

/home/user> sudo mount -o remount,rw,xino=/.aufs.xino,create=mfs,br:/home/rw=rw:/=rw:/=ro /
mount: / not mounted already, or bad option

/home/user> sudo fdisk -l

Disk /dev/sda: 4034 MB, 4034838528 bytes
255 heads, 63 sectors/track, 490 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1         400     3212968+  83  Linux
/dev/sda2             401         488      706860   83  Linux
/dev/sda3             489         489        8032+   c  W95 FAT32 (LBA)
/dev/sda4             490         490        8032+  ef  EFI (FAT-12/16/32)

Disk /dev/sdb: 16.1 GB, 16139354112 bytes
255 heads, 63 sectors/track, 1962 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1        1962    15759733+  83  Linux

Offline

 

#8 2009-01-03 7:20:17 am

tusko
Member
Registered: 2008-12-12
Posts: 16

Re: A new way to get more space for root filesystem without removing aufs

Ok, lets try some basic things. Try this:

$ sudo mount -t aufs -o remount,rw,xino=/.aufs.xino,br:/=rw:/=ro none /

This only remounts the aufs without adding anything new. Let me know if this shows any error. If it shows the same error, I would try more things...

Also, please show me the result of executing "cat /proc/mounts", I want to check if it shows the same that "mount".

Offline

 

#9 2009-01-03 8:44:27 am

guiddruid
Member
Registered: 2008-09-24
Posts: 32

Re: A new way to get more space for root filesystem without removing aufs

thank for helping me with this; same error, mounts appears to match mount

Code:

/home/user> sudo mount -t aufs -o remount,rw,xino=/.aufs.xino,br:/=rw:/=ro none /
mount: / not mounted already, or bad option
/home/user> cat /proc/mounts
rootfs / rootfs rw 0 0
/dev/sda1 / ext2 ro 0 0
none / aufs rw,xino=/.aufs.xino,br:/=rw:/=ro 0 0
proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
devpts /dev/pts devpts rw 0 0
tmpfs /dev/shm tmpfs rw 0 0
tmpfs /tmp tmpfs rw 0 0
/dev/sdb1 /home ext3 rw,noatime,data=ordered 0 0
usbfs /proc/bus/usb usbfs rw 0 0
none /proc/fs/vmblock/mountPoint vmblock rw 0 0
/dev/sda1 /ro ext2 ro 0 0
/home/user> mount
rootfs on / type rootfs (rw)
/dev/sda1 on / type ext2 (ro)
none on / type aufs (rw,xino=/.aufs.xino,br:/=rw:/=ro)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw)
tmpfs on /dev/shm type tmpfs (rw)
tmpfs on /tmp type tmpfs (rw)
/dev/sdb1 on /home type ext3 (rw,noatime,data=ordered)
usbfs on /proc/bus/usb type usbfs (rw)
none on /proc/fs/vmblock/mountPoint type vmblock (rw)
/dev/sda1 on /ro type ext2 (ro)

Offline

 

#10 2009-01-03 10:36:35 am

tusko
Member
Registered: 2008-12-12
Posts: 16

Re: A new way to get more space for root filesystem without removing aufs

You are welcome. Hopefully, we will obtain a better understanding of what is happening here. I do not want to post steps that are not correct in all the 901s linux...

The next step is to detect what is exactly the "bad option" because we know that "/" is already mounted. Please issue the same remount command and after that execute "dmesg", the last lines of the dmesg results should give us some hints...

Also, execute "dpkg -l | grep linux-image" to find your installed linux version. Maybe your kernel is different from mine (although I did not remember changing it from the default).

Offline

 

#11 2009-01-03 2:36:08 pm

guiddruid
Member
Registered: 2008-09-24
Posts: 32

Re: A new way to get more space for root filesystem without removing aufs

looks like we have an error message (partial anyway... outside what?):
sudo mount -t aufs -o remount,rw,xino=/.aufs.xino,br:/=rw:/=ro none /
dmesg
.....blah...
[  254.130000] aufs xino_create:536:mount[3009]: /.aufs.xino must be outside

grep returns;
linux-image-2.6.21.4-eeepc

Last edited by guiddruid (2009-01-03 2:37:35 pm)

Offline

 

#12 2009-01-04 12:46:38 pm

tusko
Member
Registered: 2008-12-12
Posts: 16

Re: A new way to get more space for root filesystem without removing aufs

The error is that it expects .aufs.xino, which is a special i-node to aufs, to be outside "/", i guess. We can remove the xino option in the remount command to see what happens, but after some reading of aufs docs and some testing in my machine, I think that I found a better solution. Please try:

# mount -o remount,prepend:/home/rw=rw,create=mfs /

After that, check errors with "dmesg", check if /home/rw is added to the union with "mount", and check if you have more space with "df -h".

(tusko crosses fingers)

Offline

 

#13 2009-01-04 1:45:39 pm

guiddruid
Member
Registered: 2008-09-24
Posts: 32

Re: A new way to get more space for root filesystem without removing aufs

Code:

home/user> sudo mount -o remount,prepend:/home/rw=rw,create=mfs /

home/user> dmesg
...
[  718.960000] timeout[1] (a3a8-a388 = 32 > 10): 168, 16a, flush one!

/home/user> mount
rootfs on / type rootfs (rw)
/dev/sda1 on / type ext2 (ro)
none on / type aufs (rw,xino=/.aufs.xino,create=mfs,br:/home/rw=rw:/=rw:/=ro)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw)
tmpfs on /dev/shm type tmpfs (rw)
tmpfs on /tmp type tmpfs (rw)
/dev/sdb1 on /home type ext3 (rw,noatime,data=ordered)
usbfs on /proc/bus/usb type usbfs (rw)
none on /proc/fs/vmblock/mountPoint type vmblock (rw)
/dev/sda1 on /ro type ext2 (ro)

/home/user> df -h
Filesystem            Size  Used Avail Use% Mounted on
rootfs                 15G  8.0G  6.2G  57% /
/dev/sda1              15G  8.0G  6.2G  57% /
none                   15G  8.0G  6.2G  57% /
tmpfs                1011M   12K 1011M   1% /dev/shm
tmpfs                 128M   56K  128M   1% /tmp
/dev/sdb1              15G  8.0G  6.2G  57% /home
/dev/sda1             3.1G  2.4G  652M  79% /ro

Bingo! The / entry in mount has changed, and more space is available. There was a big delay (2 or 3 seconds?) after issuing the mount command, from the dmesg results, there was a timeout, but it appears to have worked.

I will reboot a few times, and see if there's always the timeout after issuing the mount command. If it's just a one off, then I will edit the services.sh

Offline

 

#14 2009-01-04 3:20:48 pm

guiddruid
Member
Registered: 2008-09-24
Posts: 32

Re: A new way to get more space for root filesystem without removing aufs

rebooted and issued the mount command three times; no timeout & it works fine (at least df -h reports the correct increase in capacity... I've not tried to use the space yet)

I have edited /usr/sbin/services.sh and added the mount command after PATH (i.e. second command in the script), and it seems to work just fine. I now have as much space as I want. big_smile

Thank you tusko!

Offline

 

#15 2009-01-04 3:49:05 pm

tusko
Member
Registered: 2008-12-12
Posts: 16

Re: A new way to get more space for root filesystem without removing aufs

Great!! I have edited the post replacing the remount command. This version is better, because it does not depend on the default aufs mount configuration, which seems to differ among the 901s. Thanks for the bug report!!

Offline

 

#16 2009-01-06 11:24:04 am

arizone
New member
Registered: 2009-01-06
Posts: 2

Re: A new way to get more space for root filesystem without removing aufs

Great it works, but the problem I have is saving the edited services.sh in /usr/slib. It tells me
"The document could not be saved, as it was not possible to write to file:///usr/sbin/services.sh.
Check that you have write access to this file or that enough disk space is available"

I think it is the issue of write access. How do I grant myself write access. I am the owner of the PC and it is only a couple of months old. (eeePC 901/Linux running Linux).

I am a newbie to Linux so any help would be highly appreciated.

Thanks

Offline

 

#17 2009-01-06 3:00:39 pm

guiddruid
Member
Registered: 2008-09-24
Posts: 32

Re: A new way to get more space for root filesystem without removing aufs

put "sudo " before whatever command you are using to edit the file, so you can edit it as root. For example:

Code:

sudo kate /usr/sbin/services.sh

Offline

 

#18 2009-01-08 8:29:24 am

arizone
New member
Registered: 2009-01-06
Posts: 2

Re: A new way to get more space for root filesystem without removing aufs

Thanks  guiddruid,

It worked ...

Offline

 

#19 2009-01-11 11:46:45 am

lhodas
Member
From: Stupava, SK
Registered: 2007-09-19
Posts: 80
Website

Re: A new way to get more space for root filesystem without removing aufs

Thanks tusko, it's working fine!
I would like to know if it haven't side effect for working asus update, for e.g.


Eee PC 901 Xandros; 16GB A-DATA SDHC, Nokia E51 through cable/BT; HP Deskjet F2280 through WiFi router, slovak keyboard; VPN; FF304; My Cinema U3100 Mini; LG GSA-E50L

Offline

 

#20 2009-01-12 5:44:23 am

tusko
Member
Registered: 2008-12-12
Posts: 16

Re: A new way to get more space for root filesystem without removing aufs

I think it should not. The only problem I can think of happens if they update services.sh. In that case, after a reset, the system would be put back in the state previous to the services.sh modification, that is, it still would be usable. To solve that, you only have to reintroduce the remount command in services.sh and everything should be fine (you will not lose anything).

On the other hand, in debian based systems, it is possible to avoid modifications to a given file (e.g., services.sh) if one marks the containing debian package as "Hold" (using synaptic, aptitude, dselect, etc.). Then, you would not have to worry about an update modifying it, although you maybe can miss some important updates for that package. I'll research this at home.

Offline

 

#21 2009-01-12 5:48:11 am

tusko
Member
Registered: 2008-12-12
Posts: 16

Re: A new way to get more space for root filesystem without removing aufs

One question that I'm thinking about lately is if the info. in this post is relevant for other EeePC models, should this info. be cross-posted in other forums?

Offline

 

#22 2009-01-25 3:21:17 pm

Sequin08
New member
Registered: 2009-01-25
Posts: 2

Re: A new way to get more space for root filesystem without removing aufs

Hi

Thanks Tusko for this elegant solution - it has worked for me.

Can I check one point. You indicate it is possible to replace 'rw' as the name of the new subdirectory under /home, with a name of choice. My inclination was to use something like Apps or Programs - so I remember what's in there down the line when the 16 gb space begins to fill up. Given that I have noticed that /.rw is a system file, I was wondering whether the correct command for the prepend command would be

:/home/programs=rw

or

:/home/programs=programs

I take it that even with this expanded room, there is a lot to be said for getting rid of as many unneeded files as possible on the 4 gb SSD.


Asus eeepc 901, 20 GB SSD, 1 GB RAM, Xandros Linux, Easy Mode

Offline

 

#23 2009-01-26 6:32:43 am

tusko
Member
Registered: 2008-12-12
Posts: 16

Re: A new way to get more space for root filesystem without removing aufs

Sequin08,

It should be ":/home/programs=rw". The second rw is not a name, it implies that the directory will be part of the union in read/write mode.

Regarding the unneeded space in the 4GB SSD, it should be possible to have only one partition in the 4GB SSD, and mount this partition as aufs. This must be done when the kernel boots, in the initramfs, performing a variation of what is explained in the wiki section about removing aufs. The key is not getting rid of aufs, but get rid of the two partition scheme and obtain an aufs system with only one partition.

Then, you can apply what is explained here, extending the aufs system of only one partition mounted when the kernel booted.

This way you get the best of both worlds, you do not waste space in the 4GB SSD and you get an expandable filesystem. You can even add space to the rootfs from SD cards or USB sticks.

Offline

 

#24 2009-01-31 10:17:20 am

potter
Senior Member
From: WestMidlands, UK
Registered: 2008-09-13
Posts: 125

Re: A new way to get more space for root filesystem without removing aufs

Thanks for this mod, tusko. I've applied it successfully to my 901xandros/full desktop. There is one problem, though not important, the Xandros disk utility no longer shows the correct size/usage for the system storage device. Mine shows 111644328% used!

Offline

 

#25 2009-02-02 4:05:05 am

tusko
Member
Registered: 2008-12-12
Posts: 16

Re: A new way to get more space for root filesystem without removing aufs

potter: weird :-)

Offline

 

Board footer

Powered by PunBB 1.2.15
© Copyright 2002–2005 Rickard Andersson