1

I have this setup, on a virtual machine (Ubuntu 10.04.4), there the old size was 43GB. Then I extended the drive to 100GB.

parted /dev/sda print
Model: VMware Virtual disk (scsi)
Disk /dev/sda: 107GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type      File system  Flags
 1      1049kB  256MB   255MB   primary   ext2         boot
 2      257MB   10,7GB  10,5GB  extended
 5      257MB   10,7GB  10,5GB  logical                lvm
 3      10,7GB  21,5GB  10,7GB  primary                lvm
 4      21,5GB  42,9GB  21,5GB  primary                lvm

So normaly I would have extend the extended partition, which use to be last.

Then it would just have been

parted /dev/sda resize 2 257MB 107GB  

However, on this server, some have created partition 3 og 4, which comes after the extended partition 2.

How can I solve this issue?

1
  • I dont use parted, hence the comment rather then the post, but (and back up first, because there is always risk), using FDISK I would delete partitions 2-5, then recreate partition 2 as an extended partition with the same start block and new end of disk, then create extended partitions 3 with the same geometry as at the moment, and either partition 4 with the same geometry and a partition 5, or partition 4 with a larger geometry and then use lvm to resize the partition.
    – davidgo
    May 1, 2017 at 9:11

0

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.