Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #240710 > unrolled thread

New mdadm RAID1 gets renamed from md3 to md127 after each reboot

Started byReiner Buehl <reiner.buehl@gmail.com>
First post2021-10-01 11:20 +0200
Last post2021-10-02 07:40 +0200
Articles 11 — 5 participants

Back to article view | Back to linux.debian.user


Contents

  New mdadm RAID1 gets renamed from md3 to md127 after each reboot Reiner Buehl <reiner.buehl@gmail.com> - 2021-10-01 11:20 +0200
    Re: New mdadm RAID1 gets renamed from md3 to md127 after each          reboot Linux-Fan <Ma_Sys.ma@web.de> - 2021-10-01 16:00 +0200
      Re: New mdadm RAID1 gets renamed from md3 to md127 after each reboot Reiner Buehl <reiner.buehl@gmail.com> - 2021-10-01 17:40 +0200
    Re: New mdadm RAID1 gets renamed from md3 to md127 after each reboot Felix Miata <mrmazda@earthlink.net> - 2021-10-01 16:20 +0200
      Re: New mdadm RAID1 gets renamed from md3 to md127 after each reboot Reiner Buehl <reiner.buehl@gmail.com> - 2021-10-01 17:40 +0200
        Re: New mdadm RAID1 gets renamed from md3 to md127 after each  reboot Tim Woodall <debianuser@woodall.me.uk> - 2021-10-02 00:20 +0200
          Re: New mdadm RAID1 gets renamed from md3 to md127 after each  reboot Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2021-10-02 02:00 +0200
            Re: New mdadm RAID1 gets renamed from md3 to md127 after each reboot Reiner Buehl <reiner.buehl@gmail.com> - 2021-10-02 05:10 +0200
              Re: New mdadm RAID1 gets renamed from md3 to md127 after each reboot Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2021-10-04 04:10 +0200
                Re: New mdadm RAID1 gets renamed from md3 to md127 after each reboot Reiner Buehl <reiner.buehl@gmail.com> - 2021-10-04 08:40 +0200
            Re: New mdadm RAID1 gets renamed from md3 to md127 after each  reboot Tim Woodall <debianuser@woodall.me.uk> - 2021-10-02 07:40 +0200

#240710 — New mdadm RAID1 gets renamed from md3 to md127 after each reboot

FromReiner Buehl <reiner.buehl@gmail.com>
Date2021-10-01 11:20 +0200
SubjectNew mdadm RAID1 gets renamed from md3 to md127 after each reboot
Message-ID<D3mRX-3hh-7@gated-at.bofh.it>

[Multipart message — attachments visible in raw view] — view raw

I created a new mdadm RAID 1 as /dev/md3. But after each reboot, it gets
activated as md127. How can I fix this - preferably without haveing to
delete the whole array again...
The array is defined like this in /etc/mdadm:

ARRAY /dev/md3 metadata=1.2  level=raid1 num-devices=1
UUID=41e0a87f:22a2205f:0187c73d:d8ffefea

(yes, it only has one disk at the moment, the other will be added once this
issue is fixed :-) )

I also did run update-initramfs -u to ensure that this is updated there too.

If I manually stop and re-assemble it, it shows as md3, but once I reboot,
it shows up as md127 again. In the mdadm --detail --scan output, it shows
up like this:

ARRAY /dev/md/<Host FQDN>:3 metadata=1.2 name=<Host FQDN>:3
UUID=41e0a87f:22a2205f:0187c73d:d8ffefea

How can I stop the renaming?

Best regards,
Reiner

[toc] | [next] | [standalone]


#240723 — Re: New mdadm RAID1 gets renamed from md3 to md127 after each reboot

FromLinux-Fan <Ma_Sys.ma@web.de>
Date2021-10-01 16:00 +0200
SubjectRe: New mdadm RAID1 gets renamed from md3 to md127 after each reboot
Message-ID<D3reV-5LD-5@gated-at.bofh.it>
In reply to#240710

[Multipart message — attachments visible in raw view] — view raw

Reiner Buehl writes:

> I created a new mdadm RAID 1 as /dev/md3. But after each reboot, it gets  
> activated as md127. How can I fix this - preferably without haveing to delete  
> the whole array again...
> The array is defined like this in /etc/mdadm:
>
> ARRAY /dev/md3 metadata=1.2  level=raid1 num-devices=1 UUID=41e0a87f: 
> 22a2205f:0187c73d:d8ffefea

[...]

I have observed this in the past, too and do not know how to "fix" it.

Why is it necessary for the volume to appear under /dev/md3? Might it be  
possible to use its UUID instead, i.e. check the output of

	ls -l /dev/disk/by-uuid

to find out if your md3/md127 can be accessed by an unique ID. You could  
then point the entries in /etc/fstab to the UUID rather than the "unstable"  
device name?

HTH and YMMV
Linux-Fan

öö

[toc] | [prev] | [next] | [standalone]


#240730

FromReiner Buehl <reiner.buehl@gmail.com>
Date2021-10-01 17:40 +0200
Message-ID<D3sNJ-6Nj-17@gated-at.bofh.it>
In reply to#240723
On 01.10.2021 15:50, Linux-Fan wrote:
> I have observed this in the past, too and do not know how to "fix" it.
>
> Why is it necessary for the volume to appear under /dev/md3? Might it 
> be possible to use its UUID instead, i.e. check the output of
>
>     ls -l /dev/disk/by-uuid
>
> to find out if your md3/md127 can be accessed by an unique ID. You 
> could then point the entries in /etc/fstab to the UUID rather than the 
> "unstable" device name?

It would be beneficial to have the /dev/md3 since I have a few regular 
expressions that look for only one digit numbers in md arrays but the 
main reason for me is that I do not trust the array if it randomly 
renames itself. Mounting via UUID would be possible but I am not sure 
that a few of the monitoring tools that I use like the UUID.

[toc] | [prev] | [next] | [standalone]


#240725

FromFelix Miata <mrmazda@earthlink.net>
Date2021-10-01 16:20 +0200
Message-ID<D3ryh-67d-1@gated-at.bofh.it>
In reply to#240710
Reiner Buehl composed on 2021-10-01 11:11 (UTC+0200):

> I created a new mdadm RAID 1 as /dev/md3. But after each reboot, it gets
> activated as md127. How can I fix this - preferably without haveing to
> delete the whole array again...
> The array is defined like this in /etc/mdadm:

> ARRAY /dev/md3 metadata=1.2  level=raid1 num-devices=1
> UUID=41e0a87f:22a2205f:0187c73d:d8ffefea
...
 											Mine (old) is like so:
# head -n3 /etc/mdadm.conf
HOMEHOST <ignore>
DEVICE containers partitions
ARRAY /dev/md0 metadata=1.0 name=msi85:0tmp UUID=...
-- 
Evolution as taught in public schools is, like religion,
	based on faith, not based on science.

 Team OS/2 ** Reg. Linux User #211409 ** a11y rocks!

Felix Miata

[toc] | [prev] | [next] | [standalone]


#240732

FromReiner Buehl <reiner.buehl@gmail.com>
Date2021-10-01 17:40 +0200
Message-ID<D3sNK-6Nj-39@gated-at.bofh.it>
In reply to#240725
On 01.10.2021 16:11, Felix Miata wrote:
> Mine (old) is like so:
> # head -n3 /etc/mdadm.conf
> HOMEHOST <ignore>
> DEVICE containers partitions
> ARRAY /dev/md0 metadata=1.0 name=msi85:0tmp UUID=...
I tried changing the HOMEHOST from <system> to <ignore> but that did not 
help.

[toc] | [prev] | [next] | [standalone]


#240762 — Re: New mdadm RAID1 gets renamed from md3 to md127 after each reboot

FromTim Woodall <debianuser@woodall.me.uk>
Date2021-10-02 00:20 +0200
SubjectRe: New mdadm RAID1 gets renamed from md3 to md127 after each reboot
Message-ID<D3z2N-2c0-3@gated-at.bofh.it>
In reply to#240732
On Fri, 1 Oct 2021, Reiner Buehl wrote:

> On 01.10.2021 16:11, Felix Miata wrote:
>> Mine (old) is like so:
>> # head -n3 /etc/mdadm.conf
>> HOMEHOST <ignore>
>> DEVICE containers partitions
>> ARRAY /dev/md0 metadata=1.0 name=msi85:0tmp UUID=...
> I tried changing the HOMEHOST from <system> to <ignore> but that did not 
> help.
>
>

I've solved this but I don't recall how.

cat /proc/mdstat
Personalities : [raid1] [linear] [multipath] [raid0] [raid6] [raid5]
[raid4] [raid10]
md1 : active raid1 sdb3[2] sda3[3]
       468588347 blocks super 1.2 [2/2] [UU]
       bitmap: 3/4 pages [12KB], 65536KB chunk


mdadm --misc -D /dev/md1
/dev/md1:
...
               Name : xen.home.woodall.me.uk:1


cat /proc/mdstat
Personalities : [raid1] [linear] [multipath] [raid0] [raid6] [raid5]
[raid4] [raid10]
md0 : active raid1 sdb3[2] sda3[3]
       468588356 blocks super 1.2 [2/2] [UU]
       bitmap: 1/2 pages [4KB], 131072KB chunk

mdadm --misc -D /dev/md0
/dev/md0:
...
               Name : boot.home.woodall.me.uk:0



I think it might be that :n at the end of the name.

Another machine doesn't have the :n and there its device md127.

(those machine names bring back memories. I'd rename the array except no
doubt everything would collapse in a heap...)

[toc] | [prev] | [next] | [standalone]


#240766 — Re: New mdadm RAID1 gets renamed from md3 to md127 after each reboot

FromJoe Pfeiffer <pfeiffer@cs.nmsu.edu>
Date2021-10-02 02:00 +0200
SubjectRe: New mdadm RAID1 gets renamed from md3 to md127 after each reboot
Message-ID<D3ABz-2Xh-3@gated-at.bofh.it>
In reply to#240762
Tim Woodall <debianuser@woodall.me.uk> writes:

> On Fri, 1 Oct 2021, Reiner Buehl wrote:
>
>> On 01.10.2021 16:11, Felix Miata wrote:
>>> Mine (old) is like so:
>>> # head -n3 /etc/mdadm.conf
>>> HOMEHOST <ignore>
>>> DEVICE containers partitions
>>> ARRAY /dev/md0 metadata=1.0 name=msi85:0tmp UUID=...
>> I tried changing the HOMEHOST from <system> to <ignore> but that did
>> not help.
>>
>>
>
> I've solved this but I don't recall how.

Same here... FWIW my /etc/mdadm/mdadm.conf contains the line
ARRAY /dev/md/1  metadata=1.2 UUID=67d3c233:96a0737c:5f88ed9b:936ea3ae name=snowball:1

and my array is indeed /dev/md1 (I've got *no* recollection why I didn't
make it md0!).

Is it possible you need to update your init ramdisk?  Maybe your changes
to your mdadm.conf aren't being seen?

[toc] | [prev] | [next] | [standalone]


#240771

FromReiner Buehl <reiner.buehl@gmail.com>
Date2021-10-02 05:10 +0200
Message-ID<D3Dzr-4Zl-1@gated-at.bofh.it>
In reply to#240766
On 02.10.2021 01:32, Joe Pfeiffer wrote:
> Is it possible you need to update your init ramdisk? Maybe your changes
> to your mdadm.conf aren't being seen?

I do run update-initramfs -u after each change. Shouldn't that be enough 
to to update the mdadm.conf in the init ramdisk?

[toc] | [prev] | [next] | [standalone]


#240868

FromJoe Pfeiffer <pfeiffer@cs.nmsu.edu>
Date2021-10-04 04:10 +0200
Message-ID<D4lAt-6Z0-1@gated-at.bofh.it>
In reply to#240771
Reiner Buehl <reiner.buehl@gmail.com> writes:

> On 02.10.2021 01:32, Joe Pfeiffer wrote:
>> Is it possible you need to update your init ramdisk? Maybe your changes
>> to your mdadm.conf aren't being seen?
>
> I do run update-initramfs -u after each change. Shouldn't that be
> enough to to update the mdadm.conf in the init ramdisk?

That's not it then...  googling "md127" I found a *bunch* of possible
causes.

[toc] | [prev] | [next] | [standalone]


#240874

FromReiner Buehl <reiner.buehl@gmail.com>
Date2021-10-04 08:40 +0200
Message-ID<D4pNL-18Y-5@gated-at.bofh.it>
In reply to#240868
On 04.10.2021 03:41, Joe Pfeiffer wrote:
> That's not it then... googling "md127" I found a *bunch* of possible
> causes.

I tried already updating the name attribute, setting the homehost to 
none and a few others. Unfortunately none helped.

[toc] | [prev] | [next] | [standalone]


#240773 — Re: New mdadm RAID1 gets renamed from md3 to md127 after each reboot

FromTim Woodall <debianuser@woodall.me.uk>
Date2021-10-02 07:40 +0200
SubjectRe: New mdadm RAID1 gets renamed from md3 to md127 after each reboot
Message-ID<D3FUB-6sB-1@gated-at.bofh.it>
In reply to#240766
On Fri, 1 Oct 2021, Joe Pfeiffer wrote:

> Tim Woodall <debianuser@woodall.me.uk> writes:
>
>> On Fri, 1 Oct 2021, Reiner Buehl wrote:
>>
>>> On 01.10.2021 16:11, Felix Miata wrote:
>>>> Mine (old) is like so:
>>>> # head -n3 /etc/mdadm.conf
>>>> HOMEHOST <ignore>
>>>> DEVICE containers partitions
>>>> ARRAY /dev/md0 metadata=1.0 name=msi85:0tmp UUID=...
>>> I tried changing the HOMEHOST from <system> to <ignore> but that did
>>> not help.
>>>
>>>
>>
>> I've solved this but I don't recall how.
>
> Same here... FWIW my /etc/mdadm/mdadm.conf contains the line
> ARRAY /dev/md/1  metadata=1.2 UUID=67d3c233:96a0737c:5f88ed9b:936ea3ae name=snowball:1
>
> and my array is indeed /dev/md1 (I've got *no* recollection why I didn't
> make it md0!).
>
> Is it possible you need to update your init ramdisk?  Maybe your changes
> to your mdadm.conf aren't being seen?
>
Don't think it's anything to do with the config file:


root@debootstrap17:~# mdadm --examine --scan
ARRAY /dev/md/debootstrap17  metadata=1.2 UUID=5e7d0dca:9f579eef:afb81eec:b0060281 name=debootstrap17
ARRAY /dev/md/5  metadata=1.2 UUID=1cdac5e5:c9fcac40:5e738a68:0a650b23 name=test:5
ARRAY /dev/md/test5  metadata=1.2 UUID=46ced7db:4b422364:1938cce3:6561f99d name=test5

That's with no arrays defined in the config file.

After these commands:

dd if=/dev/zero of=mdadm.blk bs=1M count=50
losetup -f mdadm.blk
mdadm --create /dev/md/test:5 --metadata=1.2 --bitmap=internal --force --level=1 --raid-devices=1 /dev/loop0
mdadm --stop /dev/md/test\:5
dd if=/dev/zero of=mdadm2.blk bs=1M count=50
losetup -f mdadm2.blk
mdadm --create /dev/md/test5 --metadata=1.2 --bitmap=internal --force --level=1 --raid-devices=1 /dev/loop1
mdadm --stop /dev/md/test5
mdadm --examine --scan

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web