Expanding A Root-FS
There might be the situation, that your root filesystem runs out of space, so it has to be expanded. With filesystems other than the root filesystem this could easily be done for instance with gparted. With the root filesystem this is not possible, as gparted could only expand filesystems that are not mounted, which is impossible with the root filesystem. The only way to enlarge the root filesystem is to boot from a kind of rescuesystem, Live-CD or the like, and then to expand the root filesystem. The following tutorial describes, how this is achieved by using Systemrescue-CD. |
|
Comments (9)
Quoting:If the filesystem is mounted, it can be used to expand the size of the mounted filesystem, assuming the kernel supports on-line resizing. (As of this writing, the Linux 2.6 kernel supports on-line resize for filesystems mounted using ext3 only.).
So, it's only ext3 and not ext2/4 as I said in my previous post. It should work (it will generate a warning saying the filesystem is mounted and that online resizing is required. It should work. If it does not, it's a bug in Squeeze.
2.6.28-gentoo-r5 #5 SMP GNU/Linux
on a 100M ext3-filesystem and it seems to work:
#mount -l /dev/mapper/vg0-testlv on /mnt/tmp type ext3 (rw)
#lvextend /dev/vg0/testlv -L+10M
#resize2fs /dev/vg0/testlv
resize2fs 1.41.9 (22-Aug-2009) Filesystem at /dev/vg0/testlv is mounted on /mnt/tmp; on-line resizing required old desc_blocks = 1, new_desc_blocks = 1 Performing an on-line resize of /dev/vg0/testlv to 114688 (1k) blocks. The filesystem on /dev/vg0/testlv is now 114688 blocks long.
Post a comment
A free account is needed to post. Write your comment here first: your text is kept in this browser while you sign up or log in, and is waiting for you when you come back.
Your message:Sign up and post (it is free) or Log in and post
