1

I'm having trouble extending my partition on a XenServer 6.5. I originally had a 1.4TiB device (hardware RAID5) that I since upgraded to 10.9TiB. I upgraded the RAID by swapping out one disk at a time until the 4 disks were replaced.

I then used the RAID configuration to extend the RAID to the full 10.9TiB size.

=> ctrl slot=4 ld all show status
   logicaldrive 1 (10.9 TB, 5): OK

I've next told Xen dom to rescan the scsi device:

echo 1 >  /sys/block/sda/device/rescan 

Now when I start gdisk, I see the following:

Disk /dev/sda: 23441913520 sectors, 10.9 TiB
Logical sector size: 512 bytes
Disk identifier (GUID): A28B730F-3064-494E-BD7E-DDE8CAD5A12D
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 2930122766
Partitions will be aligned on 2048-sector boundaries
Total free space is 6042 sectors (3.0 MiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048         8388641   4.0 GiB     0700  
   2         8390656        16777249   4.0 GiB     0700  
   3        16779264      2930122766   1.4 TiB     8E00  

So I see that gdisk is able to see the full 10.9TiB, but I can't seem to delete and recreate parititon 3 to be larger than the original 1.4TiB. Furthermore, it says last usable sector is 2930122766.

How can I get gdisk to allow me to create a partition that goes from sectors 16779264-23441913520?

  • Try to use parted, it can expand partition without deleting it. Do you use LVM on /dev/sda3? – Mikhail Khirgiy May 6 '17 at 5:10
  • @MikhailKhirgiy - Sadly, I can't seem to find an rpm package parted for XenServer 6.5 (based on CentOS 5). But I still do not understand why gdisk won't allow me to extend beyond the maximum value of the original disk. – Eric B. May 6 '17 at 12:26
  • And what about LVM? – Mikhail Khirgiy May 6 '17 at 15:58
  • @MikhailKhirgiy - Sorry... Yes it is an LVM partition. – Eric B. May 6 '17 at 16:02
  • LVM is used only for virtual machines or for Xen system partitions also? – Mikhail Khirgiy May 7 '17 at 8:20
3

Let gdisk verify the disk for problems (key v).

In my case it identified:

The secondary header's self-pointer indicates that it doesn't reside at the end of the disk. If you've added a disk to a RAID array, use the 'e' option on the experts' menu to adjust the secondary header's and partition table's locations.

I used x e and then m(ain menu) p showed the "last usable sector" as expected.

  • Just as a note to others: The answer is in no way XenServer specific. – klaus thorn Feb 5 at 17:20

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.