---

HowTo: Linux Rename a RAID Array From md0 to md2

I am moving a raid array called /dev/md0 from serverA to serverB. On serverB /dev/md0 is already in use. How do I rename a RAID array from /dev/md0 to /dev/md2?

You can move a RAID array (software based RAID array) to another system. However, if /dev/md0 is already is use on serverB, you can rename /dev/md0 as /dev/m2 (or next available md device). In this example:

/dev/md0 is original software based RAID array.
/dev/md0 is made of the two partitions called /dev/sdc1 and /dev/sdd2.
I am going to rename /dev/md0 as /dev/md2 i.e. set /dev/md2 as the new device name.