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

SATA hotplug + mdadm raid



Hi,

I recently upgraded my home server to an HP ml30 tower server. It came with a 4 drive hotplug SATA cage. I loaded two old unused drives in it and installed Debian Stretch on it putting the drives in a software raid1 via the debian installer. My plan was once I got the new box up and running that I would shut off the old machine and use the drives from that, swapping them out one at a time and letting mdadm resync.

Before putting the new box into "production", I pulled the 2nd drive (sdb) to see what would happen (with the machine still running). Of course mdadm went into degraded mode with a one disk raid1. I slid the same drive back in and it came back as /dev/sdb. Later on, after a few reboots, I pulled the 2nd drive and swapped it with a drive from the old machine (it was also still up and running with mdadm raid1). However this time the new drive didn't come up as sdb, but as /dev/sdc. I set up the partitions the same as sda but I didn't join it to the mdadm array yet. I wasn't sure if joining as "sdc" and then on reboot having it come up possibly as "sdb" would mess up anything so I just rebooted. On reboot it came up as "sdb" and I joined it to the array and all was well.

But I still need to swap the first drive (sda) and I don't really want to have to reboot this time. So what can I do to ensure that once I pull the old drive and put in the new one that it comes back up as "sda"? Or does that even matter? (seems like it would..)


Regards,

Samuel Smith


Reply to: