Wednesday, March 15, 2017

Linux software RAID: Does it work if device nodes change?



If, for some reason, hard disks change device identifiers (e.g. /dev/sda becomes /dev/sdb and vice versa) does this affect a Linux software RAID system? I.e. would the device still work (assuming boot and root are not on that RAID partition)?


Answer



The RAID array itself doesn't care about the device nodes, because each component device stores its own metadata, including the UUID of the array that it belongs to. When you assemble the array, if you specify the UUID instead of the device node paths — for example, if you have UUID= on its line in mdadm.conf — then it should continue to work even if the device nodes change.


No comments:

Post a Comment

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...