-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MTL-1560 Support Single Disk Servers (labs) or VMs #14
MTL-1560 Support Single Disk Servers (labs) or VMs #14
Conversation
afe769d
to
0556191
Compare
0556191
to
adc53db
Compare
Saw the expected, default behavior on metal. Testing |
Worked, behold a single-disk RAID (again this is foolish but useful for simpler VMs for mocks/tests) Downside is that it broke the ephemeral disk, it never was created (see sdb and sdc, the two other disks in the system are unused). That is actually a compatibility problem in the other two modules (dracut-metal-dmk8s, dracut-metal-luksetcd). I think that is scope-creep to fix those modules, since this function is really only intended for GCP and labs/benches the partitions don't necessarily need to exist for the system to work. ncn-w002 login: root
Password:
================= =============== ==================
\\ . . . . . . .\\ //. . . . . . .\\ |\\. . . . . . . .\\
||. . ._____. . .|| ||. . ._____. . .|| | || . ._____. . .||
|| . .|| ||. _-|| ||-_ .|| \|____|/ | ||-_.|| || . .||
||. . || ||-' || || `-|| | || `|| ||. . ||
|| . _|| || || || \|___-'\___ | || || || . .||
||_-' || || || || |\ | || || ||'-__||
|| || || .===' `===. .==='.' /==. || || ||
|| || |/ _-' '_`.==..==='_-' '-_ \| || ||
|| |/ |/ _-' `-_/''\_-' '-_ \| \| ||
||.===.' '' '.===.||
==' ' ' '==
\ _-' '-_ /
`'' ''`
ncn-w002:~ # lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
loop0 7:0 0 4.6G 1 loop /run/rootfsbase
loop1 7:1 0 3.2G 0 loop
└─live-overlay-pool 254:0 0 32G 0 dm
loop2 7:2 0 32G 0 loop
└─live-overlay-pool 254:0 0 32G 0 dm
sda 8:0 0 447.1G 0 disk
├─sda1 8:1 0 476M 0 part
│ └─md127 9:127 0 475.9M 0 raid1
├─sda2 8:2 0 22.8G 0 part
│ └─md126 9:126 0 22.8G 0 raid1 /run/initramfs/live
├─sda3 8:3 0 139.7G 0 part
│ └─md125 9:125 0 139.6G 0 raid1 /run/initramfs/overlayfs
└─sda4 8:4 0 139.7G 0 part
└─md124 9:124 0 139.6G 0 raid1
└─metalvg0-CRAYSDU 254:1 0 100G 0 lvm
sdb 8:16 0 447.1G 0 disk
sdc 8:32 0 1.7T 0 disk @heemstra , I think this could merge given no one is instructed to use |
Trying this again to make sure I didn't forget to wipe, but I am 99% certain I wiped. |
I see what is wrong, these line is allowing more than 1 disk to show up and the first disk that does show up is too small. Either the code can loop over the disks, or have handling for |
af74d3b
to
8bd86d7
Compare
I have a change to the
This is confirmed fixed on workers: redbull-ncn-m001-pit:/var/www/ncn-m003 # ssh ncn-w001
Warning: Permanently added 'ncn-w001,10.252.1.7' (ECDSA) to the list of known hosts.
================= =============== ==================
\\ . . . . . . .\\ //. . . . . . .\\ |\\. . . . . . . .\\
||. . ._____. . .|| ||. . ._____. . .|| | || . ._____. . .||
|| . .|| ||. _-|| ||-_ .|| \|____|/ | ||-_.|| || . .||
||. . || ||-' || || `-|| | || `|| ||. . ||
|| . _|| || || || \|___-'\___ | || || || . .||
||_-' || || || || |\ | || || ||'-__||
|| || || .===' `===. .==='.' /==. || || ||
|| || |/ _-' '_`.==..==='_-' '-_ \| || ||
|| |/ |/ _-' `-_/''\_-' '-_ \| \| ||
||.===.' '' '.===.||
==' ' ' '==
\ _-' '-_ /
`'' ''`
ncn-w001:~ # lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
loop0 7:0 0 4.6G 1 loop /run/rootfsbase
loop1 7:1 0 3.2G 0 loop
└─live-overlay-pool 254:0 0 32G 0 dm
loop2 7:2 0 32G 0 loop
└─live-overlay-pool 254:0 0 32G 0 dm
sda 8:0 0 447.1G 0 disk
├─sda1 8:1 0 476M 0 part
│ └─md127 9:127 0 475.9M 0 raid1
├─sda2 8:2 0 22.8G 0 part
│ └─md126 9:126 0 22.8G 0 raid1 /run/initramfs/live
├─sda3 8:3 0 139.7G 0 part
│ └─md125 9:125 0 139.6G 0 raid1 /run/initramfs/overlayfs
└─sda4 8:4 0 139.7G 0 part
└─md124 9:124 0 139.6G 0 raid1
└─metalvg0-CRAYS3CACHE 254:1 0 100G 0 lvm /var/lib/s3fs_cache
sdb 8:16 0 1.7T 0 disk
├─sdb1 8:17 0 69.8G 0 part /run/containerd
├─sdb2 8:18 0 645.5G 0 part /run/lib-containerd
└─sdb3 8:19 0 178.8G 0 part /var/lib/kubelet
sdc 8:32 0 447.1G 0 disk |
8bd86d7
to
42da7cc
Compare
This adds support for single disk systems, such as lab-benches or simple GCP nodes. Setting metal.disks=1 will add --force to the mdadm commands, allowing them to construct a RAID with out additional members. A new library function is added to assist in returning the right disk despite what metal.disks is set to. Specifically, the 2nd-level dracut modules from metal were exiting too early when metal.disks=1 was set. The early exist was due to those modules not checking every disk, they assumed they'd always get the last disk.
42da7cc
to
8b36d25
Compare
Also confirmed working on masters: ncn-m003 login: root
Password:
================= =============== ==================
\\ . . . . . . .\\ //. . . . . . .\\ |\\. . . . . . . .\\
||. . ._____. . .|| ||. . ._____. . .|| | || . ._____. . .||
|| . .|| ||. _-|| ||-_ .|| \|____|/ | ||-_.|| || . .||
||. . || ||-' || || `-|| | || `|| ||. . ||
|| . _|| || || || \|___-'\___ | || || || . .||
||_-' || || || || |\ | || || ||'-__||
|| || || .===' `===. .==='.' /==. || || ||
|| || |/ _-' '_`.==..==='_-' '-_ \| || ||
|| |/ |/ _-' `-_/''\_-' '-_ \| \| ||
||.===.' '' '.===.||
==' ' ' '==
\ _-' '-_ /
`'' ''`
ncn-m003:~ # lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
loop0 7:0 0 4.6G 1 loop /run/rootfsbase
loop1 7:1 0 3.2G 0 loop
└─live-overlay-pool 254:2 0 32G 0 dm
loop2 7:2 0 32G 0 loop
└─live-overlay-pool 254:2 0 32G 0 dm
sda 8:0 0 447.1G 0 disk
├─sda1 8:1 0 476M 0 part
│ └─md127 9:127 0 475.9M 0 raid1
├─sda2 8:2 0 22.8G 0 part
│ └─md126 9:126 0 22.8G 0 raid1 /run/initramfs/live
├─sda3 8:3 0 139.7G 0 part
│ └─md125 9:125 0 139.6G 0 raid1 /run/initramfs/overlayfs
└─sda4 8:4 0 139.7G 0 part
└─md124 9:124 0 139.6G 0 raid1
└─metalvg0-CRAYS3CACHE 254:3 0 100G 0 lvm /var/lib/s3fs_cache
sdb 8:16 0 447.1G 0 disk
sdc 8:32 0 447.1G 0 disk
└─ETCDLVM 254:0 0 447.1G 0 crypt
└─etcdvg0-ETCDK8S 254:1 0 32G 0 lvm /run/lib-etcd |
Summary and Scope
Issue Type
This adds support for single disk systems, such as lab-benches or simple
GCP nodes. Setting metal.disks=1 will add --force to the mdadm commands,
allowing them to construct a RAID with out additional members.
Prerequisites
Idempotency
Risks and Mitigations
This is a tunable item, administrators should not set
metal.disks=1
unless they're debugging or running a bench system. The intent here is to enable virtualization such as VBox and GCP to use simpler partition schemes. That being said, if an admin sets this it'll remove all redundancy.