LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   How to maintain RAID disk order (https://www.linuxquestions.org/questions/linux-software-2/how-to-maintain-raid-disk-order-820044/)

newbie_0404 07-15-2010 01:47 PM

How to maintain RAID disk order
 
Hello everyone,
I have a system with data stored in multiple disk arrays. I have to come up with a solution that will maintain the disk order of the arrays whenever a stripe fails, is removed and then put back in. One solution I came up with was to stamp every stripe with the disk array it belongs to along with its stripe id. I plan to put this stamp in the last 512 KB of each disk. And I maintain all this information in a sqlite database, that is disk array, stripe id, the software diskname, etc. So that whenever a disk is replaced, its stamp could be read and the corresponding entries in the database are updated. Has anyone worked on something similar ? Or can anyone think of a better solution ?

mitchd123 07-15-2010 02:44 PM

The possible downside of writing to the disk is what to do if a drive fails, or worse case two drives in an array fail. You might instead think about dumping out a hdparm -iv /dev/sd[a-z] |grep Serial hdparm could provide unique info like the drive maker and serial number which may be physically visible when you replace a failed drive. You might follow the command with a mdadm --examine /dev/sd[a-z]1 (or similar) to pull UUID, state, size, date, checksum, etc.

AlucardZero 07-15-2010 02:45 PM

Don't most RAID controllers do their own identification and will automatically recover when you put disks back in in the wrong order? I know I've seen Dells do it.


All times are GMT -5. The time now is 11:03 PM.