pvcreate can't open /dev/md1 exclusively

Matthew Pounsett matt at conundrum.com
Fri Jan 24 21:48:08 CET 2025


On Fri, Jan 24, 2025 at 1:07 PM Christopher Huhn <C.Huhn at gsi.de> wrote:

> > sda    8:0    0   7.3T  0 disk
> > sdb    8:16   0   7.3T  0 disk
> > sdc    8:32   0 447.1G  0 disk
> > sdd    8:48   0 447.1G  0 disk
> as you can see here the large disks are sda (disk1) and sdb (disk2)
> while the SSDs are sdc and sdd.
> This mapping is not stable through reboots, so you have to make sure
> your disks are in the intended order in your disklist.
>

Ooof.  Embarrassing. I'm aware it's unstable, but it had been so stable in
my previous tests I stopped paying attention to that.  Thanks for the
second pair of eyes.

Unfortunately though, that doesn't fix my problem.  After correcting for
that, I'm still seeing the same LVM error.


> We use a very basic hook to sort our disks by size:
>
>  > # cat class/31-sortdisks.sh
>  > disklist=$(grep -H '^[1-9]' /sys/block/[hsv]d[a-z]/size
> /sys/block/nvme*n[0-9]/size | sort -n -t : -k 2 | cut -f4 -d / | xargs)
>  > echo "disklist=\"$disklist\"" >> "$LOGDIR/additional.var"
>

This looks REALLY helpful!  Thanks!

I'm making one small modification, using sort's -s modifier... in the
(likely futile) hope that the drives might still be in bus order. :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.uni-koeln.de/pipermail/linux-fai/attachments/20250124/c8178a8e/attachment.html>


More information about the linux-fai mailing list