1 This is working configuration:
3 + ssh r1u28.gnt.ffzg.hr fdisk -l /var/run/ganeti/instance-disks/armbian:0
4 Disk /var/run/ganeti/instance-disks/armbian:0: 40 GiB, 42949672960 bytes, 10485760 sectors
5 Units: sectors of 1 * 4096 = 4096 bytes
6 Sector size (logical/physical): 4096 bytes / 4096 bytes
7 I/O size (minimum/optimal): 4096 bytes / 4096 bytes
9 Disk identifier: 0xa25190c0
11 Device Boot Start End Sectors Size Id Type
12 /var/run/ganeti/instance-disks/armbian:0p1 * 2048 83886079 83884032 320G 83 Linux
14 confused yet? Why is partition size 320G when disk is only 40G?
17 This is a story about booting ganeti instances from kernel inside virtual machine.
18 We are using ganeti-instance-debootstrap to create instances and have disk with 4k
21 # blockdev --getbsz /dev/md127
24 For this to work, we need msdos partition table which is configured with
26 root@r1u32:~# grep ^PARTITION_STYLE /etc/default/ganeti-instance-debootstrap
27 PARTITION_STYLE="msdos"
29 This should create one partition, offset by 1M (using default):
31 root@r1u32:~# tail -8 /etc/default/ganeti-instance-debootstrap
33 # PARTITION_ALIGNMENT: the alignment of the partitions in sectors
34 # (512B); this defaults to 1MiB to give grub enough space for
35 # embedding and for better alignment with modern media (HDDs and
36 # SSDs), feel free to increase it if your media has even bigger
38 PARTITION_ALIGNMENT=2048
40 This however doesn't work if we are using 4k blocks on device because
41 offset of first partition stored in old primary partition chs format won't
42 match with different blocksize.
44 Solution is to create new partition table after debootstrap (which needs
45 host view of partition table with 4k block) using loopback which has 512b
48 Patch for this is: deboostrap-4k-msdos.diff
50 This patch is submitted to upstream: https://github.com/ganeti/instance-debootstrap/pull/2