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? Commented May 6, 2017 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.
    Commented May 6, 2017 at 12:26
  • And what about LVM? Commented May 6, 2017 at 15:58
  • @MikhailKhirgiy - Sorry... Yes it is an LVM partition.
    – Eric B.
    Commented May 6, 2017 at 16:02
  • LVM is used only for virtual machines or for Xen system partitions also? Commented May 7, 2017 at 8:20

1 Answer 1


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.

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. Commented Feb 5, 2019 at 17:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .