forked from rook/rook
The 'extra' block device attached to GH actions runners has changed size twice in 3 months. The previous strategy of detecting the disk by size is becoming harder to maintain. Additionally, the block size with recent changes (75G) is now the same as the boot device (also 75G), making the method inexact. The method can now be summarized as, "find the boot disk and choose the disk that isn't the boot disk to be the 'extra' one used." Prior to this, we used a one-liner based on `lsblk`. While we could still make this a one-liner, the method is now updated to 2 effective lines, plus debug text output to stderr to help if we need to debug further in the future. Of note, the 'extra' disk has a mount point of "/mnt", but it is unclear whether this is a reliable heuristic for detecting the extra disk. For years now, GH action runners have had only 2 disks. Therefore, it seems slightly more likely that a heuristic to "choose the non-boot disk" will be a more robust long-term solution. If this strategy proves to be unreliable in the future, it may be wise to consider whether "the device with a partition mounted to '/mnt'" would be a good alternative. Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>