[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Mdadm device reassignment



Hi all, I just installed the new stable Squeeze system, and moved over a raid5 from an older system. For some reason, it now wants to mount as md127 instead of md0. I've been unable to map it back to md0.

Below is all the terminal commands I thought of as relevant, along with my commentary. I'm downright befuddled, and would love any ideas or suggestions.

Looking at mdstat shows it happily living as md127:
root@jupiter:~# cat /proc/mdstat�
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]�
md127 : active (auto-read-only) raid5 sde1[0] sdb1[3] sdd1[2] sdc1[1]
�� � �4395407808 blocks level 5, 64k chunk, algorithm 2 [4/4] [UUUU]
�� � �
unused devices: <none>

Here's mdadm's output about md127:
root@jupiter:~# mdadm -D /dev/md127
/dev/md127:
�� � � �Version : 0.90
��Creation Time : Fri Oct 30 15:00:52 2009
�� � Raid Level : raid5
�� � Array Size : 4395407808 (4191.79 GiB 4500.90 GB)
��Used Dev Size : 1465135936 (1397.26 GiB 1500.30 GB)
�� Raid Devices : 4
��Total Devices : 4
Preferred Minor : 127
�� �Persistence : Superblock is persistent

�� �Update Time : Thu Feb 17 14:07:02 2011
�� � � � �State : clean
�Active Devices : 4
Working Devices : 4
�Failed Devices : 0
��Spare Devices : 0

�� � � � Layout : left-symmetric
�� � Chunk Size : 64K

�� � � � � UUID : df6df64f:7f3a3af9:e34ba98b:5bc5bc0e
�� � � � Events : 0.1030180

�� �Number � Major � Minor � RaidDevice State
�� � � 0 � � � 8 � � � 65 � � � �0 � � �active sync � /dev/sde1
�� � � 1 � � � 8 � � � 33 � � � �1 � � �active sync � /dev/sdc1
�� � � 2 � � � 8 � � � 49 � � � �2 � � �active sync � /dev/sdd1
�� � � 3 � � � 8 � � � 17 � � � �3 � � �active sync � /dev/sdb1

However, there's lingering references to md0:
root@jupiter:~# mdadm -Ds
ARRAY /dev/md/0_0 metadata=0.90 UUID=df6df64f:7f3a3af9:e34ba98b:5bc5bc0e

The devices themselves have a preferred minor of md0:
root@jupiter:~# mdadm --examine /dev/sdb1�
/dev/sdb1:
�� � � � �Magic : a92b4efc
�� � � �Version : 0.90.00
�� � � � � UUID : df6df64f:7f3a3af9:e34ba98b:5bc5bc0e
��Creation Time : Fri Oct 30 15:00:52 2009
�� � Raid Level : raid5
��Used Dev Size : 1465135936 (1397.26 GiB 1500.30 GB)
�� � Array Size : 4395407808 (4191.79 GiB 4500.90 GB)
�� Raid Devices : 4
��Total Devices : 4
Preferred Minor : 0

�� �Update Time : Thu Feb 17 14:07:02 2011
�� � � � �State : clean
�Active Devices : 4
Working Devices : 4
�Failed Devices : 0
��Spare Devices : 0
�� � � Checksum : 36a288b2 - correct
�� � � � Events : 1030180

�� � � � Layout : left-symmetric
�� � Chunk Size : 64K

�� � �Number � Major � Minor � RaidDevice State
this � � 3 � � � 8 � � � �1 � � � �3 � � �active sync � /dev/sda1

�� 0 � � 0 � � � 8 � � � 49 � � � �0 � � �active sync � /dev/sdd1
�� 1 � � 1 � � � 8 � � � 17 � � � �1 � � �active sync � /dev/sdb1
�� 2 � � 2 � � � 8 � � � 33 � � � �2 � � �active sync � /dev/sdc1
�� 3 � � 3 � � � 8 � � � �1 � � � �3 � � �active sync � /dev/sda1

�The output for each device is similar... and in each device, it thinks of itself as a prior device. sdb1 says "this" is sda1, sdc1 says "this" is sdb1, sdd1 says "this" is sdc1, and sde1 says "this" is sdd1. I don't know if this is important, but I definitely think it's worth pointing out.

I've also tried stopping the device and reassembling as md0:
root@jupiter:~# cat /proc/mdstat�
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]�
md127 : active (auto-read-only) raid5 sde1[0] sdb1[3] sdd1[2] sdc1[1]
�� � �4395407808 blocks level 5, 64k chunk, algorithm 2 [4/4] [UUUU]
�� � �
unused devices: <none>
root@jupiter:~# mdadm --stop /dev/md127
mdadm: stopped /dev/md127
root@jupiter:~# mdadm --assemble /dev/md0 /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1
mdadm: /dev/md0 has been started with 4 drives.
root@jupiter:~# cat /proc/mdstat�
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]�
md0 : active (auto-read-only) raid5 sde1[0] sdb1[3] sdd1[2] sdc1[1]
�� � �4395407808 blocks level 5, 64k chunk, algorithm 2 [4/4] [UUUU]
�� � �
unused devices: <none>

This works fine, until reboot, at which point we're back to md127. In /var/log/syslog, I find this little oddity:
Feb 17 15:33:35 jupiter mdadm[1580]: DeviceDisappeared event detected on md device /dev/md0
Feb 17 15:33:35�jupiter�mdadm[1580]: NewArray event detected on md device /dev/md127

The whole thing has me pretty stumped, what am I missing?

Reply to: