9

I saw the question : Is it possible (aka safe) to resize a partition while the system is running?

Short answer : yes, but they don't explain how. How do I resize my partition while the system is running. Gparted doesn't offer me other option that mouting the partition.

Thanks

3 Answers3

2

It is filesystem and partition dependant, different flesystems and partitions will use different methods. AFAIK it's usually used on lvm partitions. If you are using Gparted, the safe thing to do is to umount it first.

Usually you use lvextend and resizefs in lvm partitions. You can find more info on their man pages. Again it's not a good idea to do with "normal" partitions.

Javier Rivera
  • 35,153
2

First you have to expand the underlying block device. If you are using a conventional partition on a single hard disk, this is not possible. LVM and mdadm can expand the block device, then you can run resize2fs to expand the fs ( assuming it is ext[234] ).

psusi
  • 37,551
1

It really depends on the filesystem you are using but in most cases the answer is to use a livecd (Since it comes with gparted) but it is highly NOT recommended to resize a mounted, usable partition.

Please note that (at the time I'm speaking ubuntu 11.10 "Gparted 0.8.1") Gparted can't manage partition in the LVM it self...

Luis Alvarado
  • 211,503
  • Can you detail which tool with which file system? – Guillaume Coté Jan 24 '11 at 17:24
  • Not recommended by who? Why? – Guillaume Coté Jan 24 '11 at 17:25
  • Not recommended by me, do not see any author but am guessing you will find many saying the same thing. You could corrupt the data by doing something like that. Even more if you are using the partition and you want to grow/shrink it. For the filesystem open the gparted and go to View -> Filesystem Support and you can see there what partitions you can resize BUT when not mounted. – Luis Alvarado Jan 24 '11 at 17:27