Re: how to change device number in RAID array
Hi Gary,
On Mon, Aug 22, 2022 at 10:00:34AM -0400, Gary Dale wrote:
> I'm running Debian/Bookworm on an AMD64 system. I recently added a second
> drive to it for use in a RAID1 array.
What was the configuration of the array before you added the new
drive? Was it a RAID-1 with one missing device?
Please show us the exact commands you used to add the new drive.
> However I'm now getting regular messages about "SparesMissing
> event on...".
>
> cat /proc/mdstat shows the problem: active raid1 sda1[0] sdb1[2] - the newly
> added drive is showing up as [2] instead of [1]. Apparently mdadm thinks
> there should be another drive sitting around as a spare.
Not necessarily. The device numbers don't have to be contiguous. It
just means that at some point it thinks a device went away and a new
one appeared. Once you sort out whatever the issue is, the devices
in your array will likely remain as IDs 0 and 2.
> Is there a simple way to fix this?
It should be easy, but before I guess I would like to see the
output of:
$ cat /proc/mdstat
For the future, here's some information that people like to see when
helping with Linux MD RAID questions:
https://raid.wiki.kernel.org/index.php/Asking_for_help
Cheers,
Andy
--
https://bitfolk.com/ -- No-nonsense VPS hosting
Reply to: