User:Razzi/Learning about partitions for flerovium/furud

From Wikitech

Furud and flerovium: https://phabricator.wikimedia.org/T278421

Goal: reimage the nodes, keeping /srv in place.

razzi@flerovium:~$ lsblk
NAME                     MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
sda                        8:0    0 447.1G  0 disk
├─sda1                     8:1    0  46.6G  0 part
│ └─md0                    9:0    0  46.5G  0 raid1 /
└─sda2                     8:2    0 400.6G  0 part
  └─md1                    9:1    0 400.5G  0 raid1
    └─flerovium--vg-data 253:0    0 400.4G  0 lvm   /srv
sdb                        8:16   0 447.1G  0 disk
├─sdb1                     8:17   0  46.6G  0 part
│ └─md0                    9:0    0  46.5G  0 raid1 /
└─sdb2                     8:18   0 400.6G  0 part
  └─md1                    9:1    0 400.5G  0 raid1
    └─flerovium--vg-data 253:0    0 400.4G  0 lvm   /srv


flerovium has 2 disks, sda and sdb. sda is 447.1G and sdb is 447.1G.

sda is partitioned into sda1 and sda2.

sda1 is 46.6G, and is mounted on /.

It is configured to be redundant with sdb1 from sdb.

md = multiple devices: software raid.

> I think that the standard reuse recipe might not work, there is no mention in it about the md1/md0 raid arrays. For example I'd expect something that lists also:

/dev/md0|1 lvmpv ignore none, \
/dev/md1|1 lvmpv ignore none,

https://www.debian.org/releases/jessie/example-preseed.txt

# this workarounds LP #1012629 / Debian #666974
# it makes grub-installer to jump to step 2, where it uses bootdev
d-i    grub-installer/only_debian      boolean         false

> # This is fairly safe to set, it makes grub install automatically to the MBR

> # if no other operating system is detected on the machine.

d-i    grub-installer/bootdev  string  /dev/sda /dev/sdb

> # To install grub to multiple disks:

> #d-i grub-installer/bootdev string (hd0,1) (hd1,1) (hd2,1)

d-i    partman/reuse_partitions_recipe         string \

> This seems like a fairly standard bit, but I can't figure out where reuse_partitions_recipe is from.

> There are other partman/ instructions, like:

#d-i partman/early_command \
#       string debconf-set partman-auto/disk "$(list-devices disk | head -n1)"

> I think I understand what sda|1 and sta|2 are: shorthand for sda1 and sda2.

                /dev/sda|1 biosboot ignore none|2 raid ignore none, \

> So then this line has, as first part, something resembling:

"sda1 is biosboot"

sda2 is raid

                /dev/sdb|1 biosboot ignore none|2 raid ignore none, \
                /dev/mapper/*-root|1 ext4 format /, \
                /dev/mapper/*-srv|1 ext4 keep /srv

Compare this to an-master:

razzi@an-master1001:~$ lsblk
NAME                         MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
sda                            8:0    0 223.6G  0 disk
├─sda1                         8:1    0  46.6G  0 part
│ └─md0                        9:0    0  46.5G  0 raid1 /
├─sda2                         8:2    0   954M  0 part
│ └─md1                        9:1    0 953.4M  0 raid1 [SWAP]
└─sda3                         8:3    0 176.1G  0 part
  └─md2                        9:2    0   176G  0 raid1
    └─an--master1001--vg-srv 253:0    0   176G  0 lvm   /srv
sdb                            8:16   0 223.6G  0 disk
├─sdb1                         8:17   0  46.6G  0 part
│ └─md0                        9:0    0  46.5G  0 raid1 /
├─sdb2                         8:18   0   954M  0 part
│ └─md1                        9:1    0 953.4M  0 raid1 [SWAP]
└─sdb3                         8:19   0 176.1G  0 part
  └─md2                        9:2    0   176G  0 raid1
    └─an--master1001--vg-srv 253:0    0   176G  0 lvm   /srv

So we'll need to rename the partition to srv.

Other than that, why is one "raid" and one "lvmpv" (logical volume management physical volume)?