-
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-1561 Add GCP mode for supporting GCP NVME #15
Conversation
Metal tests succeeded, saw the expected behavior. |
@taylorludwig , once this is tested in GCP with |
7b506ed
to
6561407
Compare
I'll test and post results |
|
5d39dd1
to
6e43a93
Compare
Great. Just awaiting a retest with the newer build I sent. |
Testing worked nicely, but reboots with I'm looking at a tiny fix to allow the disk selection to work (and not choose existing partitions). The strange thing is (to think aloud here) the wiping is done before the disk selection and udev is even tripped (here https://github.com/Cray-HPE/dracut-metal-mdsquash/blob/main/90metalmdsquash/metal-md-disks.sh#L21). |
This is actually looking good. |
This new toggle will insert the partitioning prefix into all disks, assuming that the disks are GCP provided NVME. This implicitly means that only NVME is supported when gcp-mode is engaged. We can add logic to handle our full-suite of busses, only if we have a use in SAS and SATA GCP disks.
6e43a93
to
d80399a
Compare
# PAVE & GO-AROUND/RETRY | ||
[ ! -f /tmp/metalpave.done ] && [ "${metal_nowipe:-0}" != 1 ] && pave | ||
|
||
# DISKS; disks were detected, find the amount we need or die. Also die if there are 0 disks. | ||
# MAINTAINER NOTE: We filter out NVME partitions because they'll exist at this point since pave() is called afterwards. | ||
md_disks="$(lsblk -l -o SIZE,NAME,TYPE,TRAN | grep -E '('"$metal_transports"')' | sort -u | awk '{print $2}' | head -n ${metal_disks} | tr '\n' ' ' | sed 's/ *$//')" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change of sort -u
to sort -h
is breaking the sorting of the disks by size and the RAID is going to grab the wrong disks.
+ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
loop0 7:0 0 4.7G 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
sdb 8:16 0 1.7T 0 disk
|-sdb1 8:17 0 476M 0 part
| `-md127 9:127 0 475.9M 0 raid1
|-sdb2 8:18 0 22.8G 0 part
| `-md126 9:126 0 22.8G 0 raid1 /run/initramfs/live
|-sdb3 8:19 0 139.7G 0 part
| `-md125 9:125 0 139.6G 0 raid1 /run/initramfs/overlayfs
`-sdb4 8:20 0 139.7G 0 part
`-md124 9:124 0 139.6G 0 raid1
sdc 8:32 0 447.1G 0 disk
Observe above that sdb is the larger, ephemeral disk. However it has been adopted as a RAID member.
Summary and Scope
Issue Type
This new toggle will insert the partitioning prefix into all disks,
assuming that the disks are GCP provided NVME.
This implicitly means that only NVME is supported when gcp-mode is
engaged. We can add logic to handle our full-suite of busses, only if
we have a use in SAS and SATA GCP disks.
Prerequisites
This needs to be tested on GCP and metal, for the new and old behaviors (respectively).
Idempotency
Risks and Mitigations
This does not bring the full suite of busses to GCP, it only enables NVME for GCP.