Naming RAID Devices

General support questions
Post Reply
etpoole60
Posts: 54
Joined: 2015/06/21 23:25:20

Naming RAID Devices

Post by etpoole60 » 2019/11/30 00:51:15

My environment consists of several Windows desktops, and 4 machines running CentOS 7. It's the servers that this question is about. All of the servers were migrated for CentOS 5 to CentOS 6 and now CentOS 7. All of the servers use RAID-1 and RAID-10. All of the servers were using the following:
RAID-1 /dev/md0 = /boot
RAID-1 /dev/md1 = /dev/vg_opsys
RAID-1 /dev/md2 = /dev/vg_swapper
RAID-10 /dev/md3 = /dev/vg_data

This is the way these things have been named since CentOS 5.

Let's call it Server4. Server4 was rebuilt and the 4 - 1TB drives were replaced with 2 - 2 TB drives. So at install time there were no predefined filesystems. When I built the 3 RAID-1 devices and the 1 RAID-10 device they were named /dev/md126 through /dev/md129.

To maintain consistiency can I rename /dev/md126 to /dev/md0 and /dev/md127 to /dev/md1, etc.?
Happily Retired
Gene Poole
Woodstock, Georgia

User avatar
TrevorH
Forum Moderator
Posts: 27156
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Naming RAID Devices

Post by TrevorH » 2019/11/30 01:15:17

Check /etc/mdadm.conf. If you run mdadm --examine --scan it should show you the necessary lines to set up the arrays and the first one after the word ARRAY is the name it's given.
CentOS 6 will die in November 2020 - migrate sooner rather than later!
CentOS 5 has been EOL for nearly 3 years and should no longer be used for anything!
Full time Geek, part time moderator. Use the FAQ Luke

etpoole60
Posts: 54
Joined: 2015/06/21 23:25:20

Re: Naming RAID Devices

Post by etpoole60 » 2019/12/02 22:33:16

As far as mdadm.conf is concerned there are differences:

Here's a /etc/mdadm.conf the was migrated from a CentOS 6 system:
# mdadm.conf written out by anaconda
MAILADDR root
AUTO +imsm +1.x -all
ARRAY /dev/md/jpdsys1.jpdesignsinc.com:0 level=raid1 num-devices=2 UUID=af8c89ea:29a497f5:01c5c52b:7ddd5220
ARRAY /dev/md/jpdsys1.jpdesignsinc.com:1 level=raid1 num-devices=2 UUID=98892679:95723301:a2a2e794:b1110264
ARRAY /dev/md/jpdsys1.jpdesignsinc.com:2 level=raid1 num-devices=2 UUID=31b2bb3c:1ede1b0b:5a74f76d:7b6c3bd7
ARRAY /dev/md/jpdsys1.jpdesignsinc.com:3 level=raid10 num-devices=4 UUID=28f7ffc1:b7a58728:83b914eb:87d1537d


Here's the /etc/mdadm.conf for the system that has the filesystem from a native install:
# mdadm.conf written out by anaconda
MAILADDR root
AUTO +imsm +1.x -all
ARRAY /dev/md/boot level=raid1 num-devices=2 UUID=a62e1fb3:519dde03:b2818f5e:a7223262
ARRAY /dev/md/pv00 level=raid1 num-devices=2 UUID=7c933df3:870c4a34:ceaa3191:b35ddc96
ARRAY /dev/md/pv01 level=raid1 num-devices=2 UUID=b14dc3da:2fcbf6cf:6afc404e:df050b40
ARRAY /dev/md/pv02 level=raid10 num-devices=6 UUID=600ba1e8:d518e97a:8ffcac83:6014d273

I no longer have a system running CentOS 6 but I found a backup froma old system no longer running:
ARRAY /dev/md0 level=raid1 num-devices=2 UUID=9a5ad966:1837c04b:d1d3424b:1be5e45b
ARRAY /dev/md1 level=raid1 num-devices=2 UUID=13404ef7:7cd82716:adc9cb14:9dc2597c
ARRAY /dev/md2 level=raid1 num-devices=2 UUID=6f33f63f:a37f1d1a:b397b8c3:18c25866
ARRAY /dev/md3 level=raid1 num-devices=2 UUID=2e63c5cf:816d580e:e045da20:d4aa2d0c
ARRAY /dev/md4 level=raid1 num-devices=2 UUID=fc7710f2:efca82bb:fc39b340:12e4196d
ARRAY /dev/md5 level=raid1 num-devices=2 UUID=3dd689f8:df42a24c:72ae1506:353cc581
ARRAY /dev/md6 level=raid1 num-devices=2 UUID=136f5ba4:c03620eb:7de50132:e92f6e1d
ARRAY /dev/md7 level=raid1 num-devices=2 UUID=08ec6566:c60c3269:83316b53:072b741c
ARRAY /dev/md8 level=raid1 num-devices=2 UUID=9c2566e3:9caeeb11:8c8fb920:6d580f97
ARRAY /dev/md9 level=raid1 num-devices=2 UUID=f8819e98:6d4a2d87:41b9a5f8:31ada714
ARRAY /dev/md10 level=raid1 num-devices=2 UUID=cbe750d6:ff1a2d34:568d7f73:f3c50ec1
ARRAY /dev/md11 level=raid1 num-devices=2 UUID=64d08346:e8eb1b48:9e56c3bf:152906e6
ARRAY /dev/md12 level=raid1 num-devices=2 UUID=bb6fbe68:b2ad9358:03d2fc89:2a4d3866
ARRAY /dev/md13 level=raid1 num-devices=2 UUID=068b11fa:3f32df54:f9138441:4c02fb9b
ARRAY /dev/md14 level=raid1 num-devices=2 UUID=f04f873b:c4655172:afd71faa:d5ed3421
MAILADDR jpdsys2@comcast.net


I never realized how many changes had been made between CentOS 6 and CentOS 7. But I don't see myself doing direct editing of mdadm.conf any longer. I considering installing CentOS 6 and getting the filesystem exactly like I want then installing CentOS 7 over the old filesystem

TIA
Gene
Happily Retired
Gene Poole
Woodstock, Georgia

etpoole60
Posts: 54
Joined: 2015/06/21 23:25:20

Re: Naming RAID Devices

Post by etpoole60 » 2019/12/02 22:39:28

I produced the following by entering 'mdadm --examine --scan' on 2 differnt machines

From a system the had the filesystem defined under CentOS 6 (software RAID):
[root@jpdsys1 /]# mdadm --examine --scan | more
ARRAY /dev/md/0 metadata=1.0 UUID=af8c89ea:29a497f5:01c5c52b:7ddd5220 name=jpdsys1.jpdesignsinc.com:0
ARRAY /dev/md/1 metadata=1.1 UUID=98892679:95723301:a2a2e794:b1110264 name=jpdsys1.jpdesignsinc.com:1
ARRAY /dev/md/2 metadata=1.1 UUID=31b2bb3c:1ede1b0b:5a74f76d:7b6c3bd7 name=jpdsys1.jpdesignsinc.com:2
ARRAY /dev/md/3 metadata=1.2 UUID=28f7ffc1:b7a58728:83b914eb:87d1537d name=jpdsys1.jpdesignsinc.com:3


From the system were the filesystem was defined during the graphical installation (software RAID):
[root@jpdsys3 ~]# mdadm --examine --scan | more
ARRAY /dev/md/pv00 metadata=1.2 UUID=7c933df3:870c4a34:ceaa3191:b35ddc96 name=jpdsys3.jpdesignsinc.com:pv00
ARRAY /dev/md/pv01 metadata=1.2 UUID=b14dc3da:2fcbf6cf:6afc404e:df050b40 name=jpdsys3.jpdesignsinc.com:pv01
ARRAY /dev/md/boot metadata=1.2 UUID=a62e1fb3:519dde03:b2818f5e:a7223262 name=jpdsys3.jpdesignsinc.com:boot
ARRAY /dev/md/pv02 metadata=1.2 UUID=600ba1e8:d518e97a:8ffcac83:6014d273 name=jpdsys3.jpdesignsinc.com:pv02

They've really changed the naming conventions.
TIA
Gene
Happily Retired
Gene Poole
Woodstock, Georgia

User avatar
jlehtone
Posts: 2432
Joined: 2007/12/11 08:17:33
Location: Finland

Re: Naming RAID Devices

Post by jlehtone » 2019/12/03 11:44:42

etpoole60 wrote:
2019/12/02 22:33:16
I considering installing CentOS 6 and getting the filesystem exactly like I want then installing CentOS 7 over the old filesystem
I would not "install" CentOS 6 for that; rather boot CentOS 6 rescue image to create RAID metadata.
etpoole60 wrote:
2019/12/02 22:39:28
They've really changed the naming conventions.
Including default metadata format. That includes placement within the disks. Earlier bootloaders had requirements and "alignment" is now paid more attention.


What in your configuration does depend on the names in hardcoded way?

Post Reply

Return to “CentOS 7 - General Support”