0

I have an Ubuntu 16.04 VM that's running on Hyper-V 2012 R2 cluster. I needed to extend the space on the VM. The first thing I did was to expand the VHDX file. After doing this, I see a really weird overlapping sectors on the disk. What is happening here? sda2 & sda5 have overlapping (almost identical) sectors.

Device     Boot   Start      End  Sectors  Size Id Type
/dev/sda1  *       2048   999423   997376  487M 83 Linux
/dev/sda2       1001470 20969471 19968002  9.5G  5 Extended
/dev/sda5       1001472 20969471 19968000  9.5G 8e Linux LVM
user2629636
  • 774
  • 5
  • 19
  • 40
  • This is an old MSDOS-style partition table. While GPT partition tables are the current standard, these are still commonly used in virtual machines and older systems. – Michael Hampton Nov 23 '16 at 18:48

1 Answers1

4

That is normal, SDA2 is an extended partition, which is a special 'container' partition, that contains other partitions. An extended partitions permits you to bypass the limitation of 4 'primary' partitions that is left over for the DOS days.

You should be able to resize these using gparted/parted. For safety, you can take a snapshot of your VM before trying to change things, so you can be sure you can undo, if the partitioning goes wrong.

I know what you have is the probably the default partition layout from your distribution, but in the future I strongly suggest you create the LVM as a primary partition, it makes things easier.

Zoredache
  • 130,897
  • 41
  • 276
  • 420