0

Preface: I am very familiar with gParted, parted, fdisk; Windows system.

I wanted to increase the size on a Ubuntu 14.04 disk, virtualized through ESXi 5.5 and disk connected as "Independent, Persistent".

I resized->increased in the past this disk already, using gParted Live, easy.

Now I wish to keep the Server ON while proceeding to resize it, this is a backup disk and it is only used during the week-end. I can easily unmount it from the system.

I know already how to proceed but I searched for tutorials and explicit commands in order for me to not forget anything.

The question: After Googling it and read several pages of how-to, I discovered that everybody tells that the partition must be deleted first, before resizing it.

I can not understand why one must delete the partition, in CLI, before resizing it. Windows too allows a partition to be resized without previous deleting it.

Sources: https://geekpeek.net/resize-filesystem-fdisk-resize2fs/ - How to extend a non-root partition of a Ubuntu VM by command line (and without GParted) - https://access.redhat.com/articles/1190213

..And the I read this: https://unix.stackexchange.com/questions/169395/how-do-i-resize-partitions-and-filesystems-on-them And I do not understand why this answer doesn't say about deleting the partition first.

For me, this last answer is right: there is not need to delete the partition:

$ sudo parted /dev/sdb resizepart 1 400M
$ sudo resize2fs /dev/sdb1 400M

Can someone tell me more about why some say of deleting the partition?

  • A lot of answers may just be plain wrong but a couple points a) your commands only work if the partition is at the end of the disk b) in fdisk resizing had never been supported but you could delete and create one of larger size without losing data c) there was a period where resize/resizepart was removed from parted. – jordanm Feb 15 '18 at 14:56
  • @jordanm I still find it strange that resizing a partition from CLI is that hard. About a) Move partition #2 "to the right" to allow the left partition to be increased, is commong task in GUI mode. b) unfortunately I know this, that's why i'm wondering why it is so hard this to be implemented :-/ . c) Didn't know this, thank you for the update! – Nihvel Feb 15 '18 at 15:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.