setup-storage pulling in disks it should ignore
Matthew Pounsett
matt at conundrum.com
Thu Jan 23 23:33:56 CET 2025
I'm setting up LVM over MD (raid1) for the first time .. we've previously
used hardware RAID ... and running into a problem with setup-storage that I
don't understand. It should be building a pair of RAIDs using /dev/sda
and /dev/sdb, but it's also pulling in /dev/sdc and /dev/sdd for some
reason. My config is very similar to the example in the man page, with
only the LVM layout different.
Can anyone see what I'm getting wrong? I think I've been over all the
relevant parts of the man page, but I'm not spotting my error.
This is my disk_config file:
disk_config disk1 disklabel:gpt-bios bootable:1 fstabkey:uuid
primary - 350 - -
primary swap 16G - -
primary - 0- - -
disk_config disk2 sameas:disk1
disk_config raid fstabkey:uuid
raid1 /boot disk1.1,disk2.1 ext4 rw,noatime,errors=rmount-ro
raid1 - disk1.3,disk2.3 - -
disk_config lvm fstabkey:uuid
vg vg_system md1
vg_system-root / 25G ext4 rw,noatime,errors=remount-ro
vg_system-home /home 100G- ext4 rw,noatime,nosuid,nodev
createopts="-L home -m 1" tuneopts="-c 0 -i 0"
vg_system-usr /usr 100G ext4 rw,noatime
And this is my format.log after it runs:
Starting setup-storage 3.0
Using config file: /var/lib/fai/config/disk_config/srv03
Parted could not read a disk label (new disk?)
Executing: parted -s /dev/sdb mklabel gpt
No volume groups found.
Executing: wipefs -af /dev/sda4
Executing: parted -s /dev/sdb mklabel gpt
Executing: parted -s /dev/sdb mkpart '" "' "" 2097152B 369098751B
Executing: parted -s /dev/sdb set 1 boot on
Executing: parted -s /dev/sdb mkpart '" "' "" 369098752B 17548967935B
Executing: parted -s /dev/sdb mkpart '" "' "" 17548967936B 8001562156543B
Executing: parted -s /dev/sdb mkpart '" "' "" 1048576B 2097151B
Executing: parted -s /dev/sdb set 4 bios_grub on
Executing: mdadm --stop --scan
Executing: mdadm --assemble --scan --config=/tmp/fai/mdadm-from-examine.conf
mdadm --assemble --scan --config=/tmp/fai/mdadm-from-examine.conf had exit
code 1
(STDERR) mdadm: Devices UUID-01c77a40:7ab3107d:583f6322:117cbec4 and
UUID-c5e32267:fd576f2b:ee8febe0:48c9d35a have the same name: /dev/md/0
(STDERR) mdadm: Duplicate MD device names in conf file were found.
Command had non-zero exit code
And finally, /tmp/fai/mdadm-from-examine.conf
ARRAY /dev/md/0 level=raid1 metadata=1.2 num-devices=2
UUID=01c77a40:7ab3107d:583f6322:117cbec4 name=srv03:0
devices=/dev/sdc1
ARRAY /dev/md/1 level=raid1 metadata=1.2 num-devices=2
UUID=62bef3b5:0dfb273f:dc58016f:3027aeea name=srv03:1
devices=/dev/sdc3
ARRAY /dev/md/0 level=raid1 metadata=1.2 num-devices=2
UUID=c5e32267:fd576f2b:ee8febe0:48c9d35a name=srv03:0
devices=/dev/sdd1,/dev/sda1
ARRAY /dev/md/1 level=raid1 metadata=1.2 num-devices=2
UUID=b52d65a9:f44c99a1:ab32f014:23131503 name=srv03:1
devices=/dev/sdd3,/dev/sda3
I've used dd to wipe all four drives of data left behind by the previous
hardware controller, and when I started the install all four drives had no
partitions, but somewhere along the way setup-storage seems to have written
partitions to all four drives, not just the first two.
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 447.1G 0 disk
├─sda1 8:1 0 350M 0 part
├─sda2 8:2 0 16G 0 part
├─sda3 8:3 0 430.8G 0 part
└─sda4 8:4 0 1M 0 part
sdb 8:16 0 7.3T 0 disk
├─sdb1 8:17 0 350M 0 part
├─sdb2 8:18 0 16G 0 part
├─sdb3 8:19 0 7.3T 0 part
└─sdb4 8:20 0 1M 0 part
sdc 8:32 0 447.1G 0 disk
├─sdc1 8:33 0 350M 0 part
├─sdc2 8:34 0 16G 0 part
├─sdc3 8:35 0 430.8G 0 part
└─sdc4 8:36 0 1M 0 part
sdd 8:48 0 7.3T 0 disk
├─sdd1 8:49 0 350M 0 part
├─sdd2 8:50 0 16G 0 part
├─sdd3 8:51 0 7.3T 0 part
└─sdd4 8:52 0 1M 0 part
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.uni-koeln.de/pipermail/linux-fai/attachments/20250123/7c662c1b/attachment.html>
More information about the linux-fai
mailing list