How to increase the size of the root partition of a system a runtime? I have a partition that is not allocated after the root partition (which is in ext4), how can I add it to root without having to shutdown the server? thanks
|
It is not possible to extend an ext4 root partition at runtime, you must shutdown the system and extended using a live cd or booting from another partition. |
|||||||||||||
|
|
It is possible to do a on-line resize of a ext4 filesystem, even if it's your root partition. Use the
EDIT: On-line shrinking is not allowed:
|
|||||||||||||||||
|
|
There are two steps to this: First, the partition must be resized. If you're using LVM, it's easy; if you're using classic partitions, it's a bit more complicated, and might require a reboot (though you never have to boot another system or live CD). One fragile but feasible approach (worked for me) is to use Example:
Again, it is critical that the new partition starts at the same block as the old. The Id should also match (83 for Linux systems). Be prepared to lose all your data at the slightest typo. By now it should be apparent why people recommend using a live CD. ;-) However, once the partition is resized (and the system rebooted, if necessary), it's a simple matter of running Example:
|
|||||||||
|
|
Just finished resizing an ext4 root partition on a live system while the root was mount.
|
|||
|
|
|
You could also just make use of GParted - as long as the partition you are resizing is not the one you booted from - else I suggest the live CD option is somewhat easier for newbies. GParted basically does all of the steps - just based on a GUI fronted. |
||||
|
|
only you need bootable or live cd like hiren's bootcd and this is link http://www.hirensbootcd.org/download/ burn it on cd and restart your computer choose cdrom to boot from it and open cd from menu choose parted magic 6.7 |
|||
|
|
|
As noted previously works fine just need to reset boot flag run 'parted'
verify partition number
reset boot flag on partition number '1' in this case
|
||||
|
|


