From: Alan Mackenzie <acm@muc.de>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Fun with mdadm (Software RAID)
Date: Tue, 1 Apr 2025 17:50:50 +0000 [thread overview]
Message-ID: <Z-wnegBWcvimvBw4@MAC.fritz.box> (raw)
In-Reply-To: <Z2gXbDZqDzias-yI@MAC.fritz.box>
Three and a bit months later...
On Sun, Dec 22, 2024 at 13:43:08 +0000, Alan Mackenzie wrote:
> Hello, Wol.
> On Sun, Dec 22, 2024 at 12:02:49 +0000, Wols Lists wrote:
> > On 20/12/2024 17:44, karl@aspodata.se wrote:
[ .... ]
> > By the way, as to the other point of putting /dev/sda etc on the
> > kernel command line, it's the kernel that's messing up and
> > scrambling which physical disk is which logical sda sdb et al
> > device, so explicitly specifying that will have exactly NO effect
> > when your hardware/software combo changes again.
> /dev/sda (or, in my case, /dev/nvme0n1), etc. don't, in my experience,
> get scrambled by the kernel. They're plugged into the same sockets on
> the motherboard from day to day, so unless you're physically inserting
> or removing them, you won't have trouble.
[ .... ]
> > sda, sdb, sdc et al are allocated AT RANDOM by the kernel.
> Only in the sense that it may be difficult on a new machine to predict
> in advance which physical HDD becomes which sdx. As I said, the
> assignment of physical drives to logical devices is repeatable, and
> doesn't change from day to day.
Wol was right and I was wrong. My two SSDs get allocated randomly to
/dev/nvme0n1 and /dev/nvme1n1. Most of the time I didn't notice this
since all my partitions apart from /boot (and swap) are RAID-1 devices
using the kernel's md facility.
However, today I built a new kernel (6.12.21) and wrote it to /boot.
Unfortunately, this was on the wrong SSD, because of the scrambling Wol
warned me about in December. So I couldn't find the syslinux
configuration file which is only on the "first" SSD.
It took me most of the day to figure out what had happened. In the end,
I fixed the problem by using the UUID for /dev/nvme0n1p1 in the entry
for /boot in /etc/fstab. The other partitions which get assembled into
MD devices are fine, since it doesn't matter which order they're in.
[ .... ]
> > You need to use those UUID/GUID things. I know it's a hassle finding out
> > whether it's a guid or a uuid, and what it is, and all that crud, but
> > trust me they don't change, you can shuffle your disks, stick in another
> > SATA card, move it from SATA to USB (BAD move - don't even think of it
> > !!!), and the system will still find the correct disk.
Indeed.
> The trouble being that a kernel command line, or /etc/fstab, using lots
> of these is not human readable, and hence is at the edge of
> unmaintainability. This maintenance difficulty surely outweighs the
> rare situation where the physical->logical assignment changes due to a
> broken drive. That's what we've got rescue disks for.
So I now have an /etc/fstab which isn't properly human readable. I
regret this, but getting the correct partition mounted on /boot was more
important.
> > Cheers,
> > Wol
--
Alan Mackenzie (Nuremberg, Germany).
next prev parent reply other threads:[~2025-04-01 17:52 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-20 10:47 [gentoo-user] Fun with mdadm (Software RAID) Alan Mackenzie
2024-12-20 14:50 ` karl
2024-12-20 15:28 ` Alan Mackenzie
2024-12-20 17:44 ` karl
2024-12-20 20:19 ` Alan Mackenzie
2024-12-20 20:38 ` Hoël Bézier
2024-12-20 20:53 ` Alan Mackenzie
2024-12-20 22:02 ` karl
2024-12-30 4:08 ` Frank Steinmetzger
2024-12-20 22:02 ` karl
2024-12-21 12:43 ` Alan Mackenzie
2024-12-21 16:36 ` Alan Mackenzie
2024-12-21 16:45 ` karl
2024-12-21 16:58 ` Alan Mackenzie
2024-12-22 13:08 ` Alan Mackenzie
2024-12-22 12:16 ` Wols Lists
2024-12-22 12:08 ` Wols Lists
2024-12-22 12:02 ` Wols Lists
2024-12-22 13:43 ` Alan Mackenzie
2024-12-22 15:29 ` Peter Humphrey
2024-12-22 16:53 ` Wols Lists
2024-12-22 20:05 ` Alan Mackenzie
2024-12-25 21:16 ` Steven Lembark
2025-04-01 17:50 ` Alan Mackenzie [this message]
2025-04-01 18:35 ` Viorel Munteanu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Z-wnegBWcvimvBw4@MAC.fritz.box \
--to=acm@muc.de \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox