Mailinglist Archive: opensuse (1264 mails)

< Previous Next >
Re: [opensuse] mdadm raid problem
On 08/06/17 11:20, Istvan Gabor wrote:
On Thu, 8 Jun 2017 06:57:58 +0300, Andrei Borzenkov wrote:


I do not think it is possible. You can change UUID only doing assembly
and you cannot do assembly for duplicated UUID. You need to stop
original array first.

OK. I stopped running md11 which had /dev/sdb11 device.
Then I could assemble a new array that has /dev/sdc11, using the update
uuid option. But the array is always assembled as /dev/md127 and not
to the name I specify:

mdadm -A -U uuid /dev/md111 /dev/sdc11
mdadm: /dev/md111 assembled from 1 drive - need all 2 to start it (use
--run to insist).

mdadm -D /dev/md111
mdadm: cannot open /dev/md111: No such file or directory

cat /proc/mdstat
Personalities : [raid1]
md127 : inactive sdc11[2](S)
62918468 blocks super 1.0

Is this a bug?
How can I assemble the array as md111 or whatever I specify?

You can't.

That's why the recommended way now is to use array names, not numbers,
eg /dev/md/root, /dev/md/home.

It's like /dev/sdX and UUIDs, array numbers are now (normally) assigned
sequentially from 127 in reverse order. If you want a unique
non-changing id of some sort, you have to either use the md-UUID, or a
name of your choice.

Oh - and if you want to look at the second (kicked off) drive, I think
you did it the right way. You have to either stop the original array, or
move the drive you want to look at to another machine.

Note that if the array has bitmaps enabled (the default nowadays), when
you re-add the drive, it knows what it needs to sync so it won't sync
the entire disk - a rather slow option on today's multi-terabyte
drives... :-)

Cheers,
Wol

--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups