I recently installed a new Debian 9 ("stretch") machine.
Initally it had 2 drives. I configured them as RAID1 using the Debian installer, and it gave me a
# definitions of existing MD arrays ARRAY /dev/md/0 metadata=1.2 UUID=3d21d0e0:2758c58e:962b5191:98e225c1 name=MYHOSTNAME:0
md0 : active raid1 sda1 sdb1 488253440 blocks super 1.2 [2/2] [UU] bitmap: 0/4 pages [0KB], 65536KB chunk
That device I formatted as
ext4 and mounted by UUID as '/' in
/etc/fstab). All works fine, as expected.
Later I added a couple more even bigger drives. Partitioned them (with a small swap parition on each first) and configured them using
mdadm -C -n 2 -l raid1 /dev/md1 /dev/sdc2 /dev/sdd2 (that's definitely what I did because it's still in my root's shell history, along with a couple of subsequent
mdadm --examine /dev/md1 and
mdadm --detail --verbose /dev/md1).
I also added a line to
/etc/mdadm/mdadm.conf (just following the pattern for the initial device):
ARRAY /dev/md/1 metadata=1.2 UUID=47492bd7:08d1fd1c:418dad41:2aa7d77f name=MYHOSTNAME:1
And of course I
ext4 formatted the device and added a UUID entry to
/etc/fstab to mount this at my chosen
/data mount point.
That all seems to be working fine, and after multiple reboots of the machine too, and I have happily been doing huge rsyncs to the new disks.
However today I happened to glance at etc/mtab and /proc/mdstat and I notice my /dev/md1 seems to have disappeared and morphed into a /dev/md127 (in /proc/mdstat) and/or a /dev/md127p1 in /etc/mtab:
md127 : active raid1 sdc2 sdd2 3904788480 blocks super 1.2 [2/2] [UU] bitmap: 2/30 pages [8KB], 65536KB chunk md0 : active raid1 sda1 sdb1 488253440 blocks super 1.2 [2/2] [UU] bitmap: 0/4 pages [0KB], 65536KB chunk
/dev/md0 / ext4 rw,relatime,errors=remount-ro,data=ordered 0 0 /dev/md127p1 /data ext4 rw,relatime,errors=remount-ro,data=ordered 0 0
It all still seems to be working fine, but what the heck happened there? I've configured RAID1 in much the same way on a couple of other machines before (admittedly many years ago) and there the RAID arrays just ended up called
/dev/md1. Where did this
127 come from and what's the difference between
/dev/md127p1? Is there some way I can rename them to
/dev/md1, or is this something I'm stuck with?