use ganeti symlink for running instance disks
[gnt-info] / doc / deboostrap-4k-msdos.txt
1 This is a story about booting ganeti instances from kernel inside virtual machine.
2 We are using ganeti-instance-debootstrap to create instances and have disk with 4k
3 blocks:
4
5 # blockdev --getbsz /dev/md127 
6 4096
7
8 For this to work, we need msdos partition table which is configured with
9
10 root@r1u32:~# grep ^PARTITION_STYLE /etc/default/ganeti-instance-debootstrap 
11 PARTITION_STYLE="msdos"
12
13 This should create one partition, offset by 1M (using default):
14
15 root@r1u32:~# tail -8 /etc/default/ganeti-instance-debootstrap 
16
17 # PARTITION_ALIGNMENT: the alignment of the partitions in sectors
18 # (512B); this defaults to 1MiB to give grub enough space for
19 # embedding and for better alignment with modern media (HDDs and
20 # SSDs), feel free to increase it if your media has even bigger
21 # allocation blocks
22 PARTITION_ALIGNMENT=2048
23
24 This however doesn't work if we are using 4k blocks on device because
25 offset of first partition stored in old primary partition chs format won't
26 match with different blocksize.
27
28 Solution is to create new partition table after debootstrap (which needs
29 host view of partition table with 4k block) using loopback which has 512b
30 blocksize.
31
32 Patch for this is: deboostrap-4k-msdos.diff
33
34 This patch is submitted to upstream: https://github.com/ganeti/instance-debootstrap/pull/2