Making sure to partition the right disk(s)

Henning Glawe henning.glawe at mpsd.mpg.de
Fri Jan 19 09:34:49 CET 2024


Moin,

On Fri, Jan 19, 2024 at 09:03:57AM +0100, Diego Zuccato wrote:
> It's not too unusual that sometimes disks get recognized in a different
> order across reboots.
> How can I make sure I'm repartitioning the right disk and not another
> one containing data? I can't find any way to bind some info about HDD to
> "disk1" instead of "disk2".
> 
> If it's not currently supported, it shouldn't be too hard to add to
> 20-hwdetect.sh (I can do it and share the result, if someone is
> interested). But if it's already supported, better to use the official
> method. :)

you can put the /dev/disk/by-id/$disk_id directly into your disk_config.

where $disk_id could be the WWN, serial number or other identifiers
generated by kernel+udev on your hardware.

I have a mechanism in place that aborts installations without this
setup when more than 1 disk is visible, therefore:
- I only have to provide explicit disk configs for storage servers
- but all the boring HPC nodes and simple servers take the generic
  partitioning classes


-- 
Mit freundlichen Grüßen
Henning Glawe

Dr. Henning Glawe
Max-Planck-Institut für Struktur und Dynamik der Materie
Geb. 99 (CFEL), Luruper Chaussee 149, 22761 Hamburg, Germany
http://www.mpsd.mpg.de/, Email: henning.glawe at mpsd.mpg.de
Building/Room: 99/O2.100, Phone: +49-40-8998-88392


More information about the linux-fai mailing list