Operating System - Linux
1758539 Members
1735 Online
108872 Solutions
New Discussion юеВ

resize the root filesystem

 
SOLVED
Go to solution
bond007
Advisor

resize the root filesystem

Hi All,

Is it possible to resize the root filesystem in linux?

Thanks and Regards,

Bond
2 REPLIES 2
Matti_Kurkela
Honored Contributor
Solution

Re: resize the root filesystem

It depends on many things.

1.) Is your root filesystem on a LVM logical volume? If not, resizing will be very difficult. Some prefer setting up the root filesystem in a "traditional" non-LVM partition, to make it simpler to recover if something goes wrong.

2.) What is the type of the filesystem you're using? Some filesystem types can be extended in practice, some can in theory be extended but the tools needed for extending may not be available for your distribution.

3.) Since you're asking specifically about the root filesystem, I assume you mean "can it be resized _online_"? To do that, you need a kernel that has the online resize functionality: I understand that the 2.6 series of kernels has it by default.

If you're using a 2.4 series kernel, I think some patches are needed - but most makers of server-related distributions have probably already included these patches in their standard kernel packages.


On HP-UX, the boot sequence and the crash dump facility require that the /stand partition, the primary swap/dump area and the root filesystem are in the beginning of the boot disk, in the specific order and contiguous.

Linux has different (and more relaxed) requirements: the most important thing is that the chosen bootloader must be able to find and load the kernel (and the initrd image, if it is needed). If that can be arranged, any necessary tools to go on from there can be packed in the initrd image.
MK
Andrew Cowan
Honored Contributor

Re: resize the root filesystem

Providin gyou have the sufficient amounts of free space, Powerquest's Partition Magic (now integrated into Norton Ghost) can do this for many Linux filesystems.

One other, slightly less elegant way is to tar/cpio your complete filesytem contents to another place, and then do a basic re-install with the required filesytem sizes, then copy the original files back and reboot.