2

Using ubuntu 12.04, i have a xen-server and several vms.

Considering

/dev/vm-disks/testes - an lvm volume partitioned during OS install
/dev/vm-disks/testes-home - another lvm volume, unpartitioned

Doing fdisk at the xen server i can see that the first disk's partition starts at 2048

fdisk /dev/vm-disks/testes -> p

                 Device Boot      Start         End      Blocks   Id  System
 /dev/vm-disks/testes1            2048     6289407     3143680   83  Linux

But if i try to create the partition to the other volume at the xen-server, the First sector defaults to 3072:

fdisk /dev/vm-disks/testes-home -> (new partition, etc) -> 

First sector (3072-409599, default 3072):

Does any one know why? This has certain implications namely with resizing the volumes:

If the partitions are done within the VM, i cannot later on resize them at the xen server because the starting sector will default to 3072 instead of 2048...

If on the other hand i first create all partitions at the xen-server starting at 3072, then at the vm they all start at 3072 and so there's no problem with resizing (outside or inside the vm)...

I could always do this way but it puzzles me why it doesn't work the "normal" way...

Caveman
  • 161
  • 1
  • 1
  • 7
  • I'm not sure why this happens, but you can use a loop device as a workaround: `losetup --find --show /dev/vm-disks/testes`, `fdisk /dev/loopX`. Detach loop device with: `losetup --detach /dev/loopX`. – johnLate Jun 15 '22 at 22:57

0 Answers0