rename mdadm raid name

changing drives to bigger once caused to create new md raid device for copying files from old md4 to new md127 device. After that should the md4 physically removed and md127 renamed to md4 for other settings compatibility.

first unmount all md devices, then stop md raid:
#mdadm –stop /dev/md127

now rename device (for new meta 1.x, if older, might not work)
#mdadm –assemble –update=name –name=2 /dev/md4 /dev/sdc1

On debian jessie also initramfs should be updated to not to cause old name after reboot:
#update-initramfs -u

now try to mount device and add missing drive to md array.

This entry was posted in Linux/Unix. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *