LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Howto: Extend filesystem on root (https://www.linuxquestions.org/questions/linux-newbie-8/howto-extend-filesystem-on-root-4175415629/)

clov3rN 07-09-2012 01:26 AM

Howto: Extend filesystem on root
 
Hello,

Using LVM on debian squeeze, I have resized partitions, using lvextend, after running out of space on the root partition.

root@OrgFxtop:/home/callum# lvscan
ACTIVE '/dev/ckdeb1laptop/root' [10.32 GiB] inherit
ACTIVE '/dev/ckdeb1laptop/usr' [9.38 GiB] inherit
ACTIVE '/dev/ckdeb1laptop/var' [3.79 GiB] inherit
ACTIVE '/dev/ckdeb1laptop/swap_1' [2.91 GiB] inherit
ACTIVE '/dev/ckdeb1laptop/tmp' [1.37 GiB] inherit
ACTIVE '/dev/ckdeb1laptop/home' [40.52 GiB] inherit

However, I believe I still need to extend the filesystem itself to fill the partitions, as I am still receiving partition full messages, when trying to write to the root partition.

At the moment I think it's only letting me write to a couple of GB, 3 or 4, definitely not the 10.32 it should allow.

I assume I'll need a live disk to extend the root?

Snark1994 07-09-2012 06:54 AM

I believe if you boot into a live disk and run:

Code:

e2fsck -f /dev/the_disk
resize2fs -f /dev/the_disk

it should resize it, though http://linux.die.net/man/8/resize2fs suggests that it may be possible to grow the filesystem while it is still mounted, provided you have a recent kernel and ext3 partition.

In future I would use something like GParted (there's a dedicated live CD) to handle it all for you... Unless you have a particular desire to use the command-line :)

syg00 07-09-2012 07:13 AM

Last I looked libparted didn't support LVM, so the OP has done most of the needed work. For ext[234] resize2fs is the tool to use, other filesystems have their own equivalent. For an increase, online (mounted) resize should be fine, even for the root with current kernels. I seem to recall being surprised SLES 10 didn't have that support though.

Using a liveCD is usually recommended, but would have to have LVM active.


All times are GMT -5. The time now is 04:02 PM.