I created a new raid5 array with webmin. It has 3x8Tb drives. Everything went ok and after about 2 days, the array was built. Problem was, Webmin created the array using /dev/sdX names. When I rebooted, those names changed. I know why they changed. The problem is how do I get the array to recognize the new /devX names so mdadm can reassemble the array. I really don’t want to rebuild the array again
I once had an admin job following someone that left for a position at
RH. He still lived mainly in the city and I actually rented an upstairs apartment from him. This is just background so that when I say he told me RH considered Fedora their test platform, take it to heart.
Webmin didn’t change the names. Why they changed is a question for RH/Fedora I believe. Always willing to be wrong, but…
Sorry. Maybe knee jerk because people come here blaming the software.
A quick search turns up several Fedora forums. I’m not sure if there is an ‘official’.
I would be interested to know the why though. I’ve never heard of this before. Are you confident this won’t happen again? I see some OLD search results about this.
@daytooner Use mdadm to manually reassemble the array by identifying the correct devices through their persistent identifiers (e.g., /dev/disk/by-id) instead of /dev/sdX. Then update /etc/mdadm.conf with the new metadata so it assembles correctly on boot.
And, always create arrays using stable device UUIDs.
I should have caught that. For Fedora, that is progress. But I created the array with Webmin, which uses the /dev/sdX names. (Maybe it could give a choice for names, like part uuid).
I am now using mdadm to do what you suggested. I ran:
[root@Foghorn ~]# cat /etc/mdadm.conf
ARRAY /dev/md0 level=raid5 num-devices=3 uuid=de09039c:f4a9880b:fbe2b46b:064f3c5d
DEVICE /dev/disk/by-partuuid/65bc5bbb-5570-4a91-98f5-5d65cf7b5f4d /dev/disk/by-partuuid/0171909d-c458-46b0-aec2-3c177e19d21d /dev/disk/by-partuuid/f57cc601-228c-4880-98ff-95f37caccb31
[root@Foghorn ~]# mdadm -v --assemble /dev/md0
mdadm: looking for devices for /dev/md0
mdadm: /dev/disk/by-partuuid/65bc5bbb-5570-4a91-98f5-5d65cf7b5f4d is identified as a member of /dev/md0, slot 1.
mdadm: /dev/disk/by-partuuid/0171909d-c458-46b0-aec2-3c177e19d21d is identified as a member of /dev/md0, slot 0.
mdadm: /dev/disk/by-partuuid/f57cc601-228c-4880-98ff-95f37caccb31 is identified as a member of /dev/md0, slot 2.
mdadm: added /dev/disk/by-partuuid/65bc5bbb-5570-4a91-98f5-5d65cf7b5f4d to /dev/md0 as 1 (possibly out of date)
mdadm: added /dev/disk/by-partuuid/f57cc601-228c-4880-98ff-95f37caccb31 to /dev/md0 as 2 (possibly out of date)
mdadm: added /dev/disk/by-partuuid/0171909d-c458-46b0-aec2-3c177e19d21d to /dev/md0 as 0
mdadm: /dev/md0 assembled from 1 drive - not enough to start the array.
[root@Foghorn ~]#
My guess is mdadm is seeing raid information. Maybe slot 0 was the parity disk and is being assigned to the correct position.
Slot 1 and 2 may simply be reversed in order. That, however, is a rosy assessment. No clue as to what and how the metadata would be stored. The only ‘official’ site for mdadm is github and they pretty much say don’t dare ask us for support.