Raid 6 Not showing up after a Drive Swap

  • Hi I swapped out one drive with bad sectors with a new drive and my raid disappear on me. Also to mention I did this with the system running. Really wasn't thinking if OMV was hot swap capable. I'm running raid 6 also not too great with linux. Just tell me what to do and I'll try my best. Thanks

    Code
    root@openmediavault:~# cat /proc/mdstat
    Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] 
    md127 : inactive sda[0](S) sdg[6](S) sdf[5](S) sdd[3](S) sdc[2](S) sdb[1](S)
          3906278928 blocks super 1.2
    
    
    unused devices: <none>



    Code
    root@openmediavault:~# mdadm --detail --scan --verbose
    INACTIVE-ARRAY /dev/md127 num-devices=6 metadata=1.2 name=openmediavault:RAID6 UUID=c2f3b6d0:5a59cb17:f723f081:0d8912cf
       devices=/dev/sda,/dev/sdb,/dev/sdc,/dev/sdd,/dev/sdf,/dev/sdg
    Code
    root@openmediavault:~# blkid
    /dev/sda: UUID="c2f3b6d0-5a59-cb17-f723-f0810d8912cf" UUID_SUB="7f50d1a2-6985-71cd-cef1-8024ec9ecfd9" LABEL="openmediavault:RAID6" TYPE="linux_raid_member"
    /dev/sdb: UUID="c2f3b6d0-5a59-cb17-f723-f0810d8912cf" UUID_SUB="5a159584-febb-8d68-2620-0c102e2417e7" LABEL="openmediavault:RAID6" TYPE="linux_raid_member"
    /dev/sdc: UUID="c2f3b6d0-5a59-cb17-f723-f0810d8912cf" UUID_SUB="764cfc90-2657-522b-a94f-18af81b89121" LABEL="openmediavault:RAID6" TYPE="linux_raid_member"
    /dev/sdd: UUID="c2f3b6d0-5a59-cb17-f723-f0810d8912cf" UUID_SUB="65131d59-791f-dcf4-0bd2-6b05fbff4df3" LABEL="openmediavault:RAID6" TYPE="linux_raid_member"
    /dev/sde1: UUID="51ec3da2-1282-4425-96e4-f70fcc9e6851" TYPE="ext4" PARTUUID="cfcbefca-01"
    /dev/sde5: UUID="87b77a0f-cdec-4d68-84aa-78b54d8589a0" TYPE="swap" PARTUUID="cfcbefca-05"
    /dev/sdf: UUID="c2f3b6d0-5a59-cb17-f723-f0810d8912cf" UUID_SUB="e4e8a25d-c05d-3f60-94db-e579d67c060a" LABEL="openmediavault:RAID6" TYPE="linux_raid_member"
    /dev/sdg: UUID="c2f3b6d0-5a59-cb17-f723-f0810d8912cf" UUID_SUB="294cdbdd-0071-447a-d441-ea363b27031c" LABEL="openmediavault:RAID6" TYPE="linux_raid_member"
    /dev/sdh: PTUUID="ff293242" PTTYPE="dos"
    • Offizieller Beitrag

    Re-assemble it, but to add to what you have discovered OMV (mdadm) is not hot swap you have to tell it or use the gui to make changes,


    mdadm --stop /dev/md127


    mdadm --assemble --force --verbose /dev/md127 /dev/sd[abcdfg]


    hopefully I've got all the drives :)

  • Thanks so much. I think its working, at least it shows up now and rebuilding but can't see my shared folders yet. I like my windows servers I have a few questions first what happens if a drive drops out of the array will this then happen again. Also after this I'm now backing up everything. I though just backing up importation stuff would be good enough but my heart drop when this just happen on non importation stuff.

    • Offizieller Beitrag

    Thanks so much. I think its working, at least it shows up now and rebuilding but can't see my shared folders yet.

    You won't until it's rebuilt and active :)


    I have a few questions first what happens if a drive drops out of the array

    If you have done nothing the raid will display clean/degraded, so still usable.


    If you look at the first output cat /proc/mdstat your raid was simply inactive, this happens because you pulled a drive, even though you replaced it mdadm doesn't know about it, it's software raid. Unlike a hardware raid where you can pull a failing drive, add a new one and the raid will rebuild, that's because the raid controller looks after the drives + in Windows you have software to manage the raid.


    So you wanted to change a drive in your OMV raid, all this can be done in the GUI


    Raid Management -> Select the raid -> from the menu select delete a dialog comes up -> select the drive to remove -> click OK, the drive is removed from the array.


    Remove the drive from the machine -> add the new drive -> storage disks -> select the new drive and wipe from the menu


    The next part either works or it doesn't


    Raid Management -> select the raid -> recover from the menu -> a dialog pops up if the new drive doesn't show go to filesystem, select the new drive and format it the same as your raid, then back to the start of this sentence, the drive will then show in the dialog, select it and click OK and the raid will rebuild.


    My guess is you shut the machine down removed the drive installed a new one then restarted the machine, hence the raid came up as inactive.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!