Degraded RAID array after power failure

    • OMV 2.x

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Degraded RAID array after power failure

      Degraded RAID array after power failure

      We have power outages from time to time. And some outlast our UPS.

      Now, our array is no longer mounting.

      We have 4 500Mb HDDs

      root@NAS01:/# cat /proc/mdstat
      Personalities : [raid6] [raid5] [raid4]
      md127 : inactive sdc[2] sdd[3] sdb[1]
      2929894536 blocks super 1.2

      unused devices: <none>
      root@NAS01:/# mdadm --assemble --scan
      mdadm: /dev/md/Rd5_0 assembled from 1 drive - not enough to start the array.
      mdadm: No arrays found in config file or automatically
      root@NAS01:/# blkid
      /dev/sdd: UUID="17a63c34-6ecf-2c24-14ce-49d6850db42f" UUID_SUB="8adc819b-cc47-bb0d-4505-636ede742f8d" LABEL="NAS01:Rd5" TYPE="linux_raid_member"
      /dev/sda: UUID="17a63c34-6ecf-2c24-14ce-49d6850db42f" UUID_SUB="5d7ec5f2-beea-b34f-6c3d-8a033aa2819b" LABEL="NAS01:Rd5" TYPE="linux_raid_member"
      /dev/sdb: UUID="17a63c34-6ecf-2c24-14ce-49d6850db42f" UUID_SUB="81d3588c-867e-b4b6-2247-5f31ac4d7838" LABEL="NAS01:Rd5" TYPE="linux_raid_member"
      /dev/sdc: UUID="17a63c34-6ecf-2c24-14ce-49d6850db42f" UUID_SUB="847df33c-e5b2-b3d0-96f9-8d93bb19109d" LABEL="NAS01:Rd5" TYPE="linux_raid_member"
      /dev/sdg1: UUID="6dc3c169-be9a-4677-ad83-5f2eeb8f8d84" TYPE="ext4"
      /dev/sdg5: UUID="2fc25249-8ced-4d7b-b9ac-8e7935e880e0" TYPE="swap"
      root@NAS01:/# fdisk -l | grep "Disk "
      Disk /dev/sda doesn't contain a valid partition table
      Disk /dev/sdb doesn't contain a valid partition table
      Disk /dev/sdc doesn't contain a valid partition table
      Disk /dev/sdd doesn't contain a valid partition table
      Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
      Disk identifier: 0x00000000
      Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
      Disk identifier: 0x00000000
      Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes
      Disk identifier: 0x00000000
      Disk /dev/sdd: 1000.2 GB, 1000204886016 bytes
      Disk identifier: 0x00000000
      Disk /dev/sdg: 128.0 GB, 128035676160 bytes
      Disk identifier: 0x000e98df
      root@NAS01:/# mdadm --detail --scan --verbose
      mdadm: cannot open /dev/md/Rd5: No such file or directory
      root@NAS01:/#


      I found a really old FDisk output that had saved. Not really sure if I have changed any hardware since. But the array drives should be the same.
      jonherns@NAS01:/$ sudo fdisk -l

      Disk /dev/sda: 500.1 GB, 500107862016 bytes
      255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
      Units = sectors of 1 * 512 = 512 bytes
      Sector size (logical/physical): 512 bytes / 512 bytes
      I/O size (minimum/optimal): 512 bytes / 512 bytes
      Disk identifier: 0x00000000

      Disk /dev/sda doesn't contain a valid partition table

      Disk /dev/sdb: 500.1 GB, 500107862016 bytes
      255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
      Units = sectors of 1 * 512 = 512 bytes
      Sector size (logical/physical): 512 bytes / 512 bytes
      I/O size (minimum/optimal): 512 bytes / 512 bytes
      Disk identifier: 0x00000000

      Disk /dev/sdb doesn't contain a valid partition table

      Disk /dev/sdc: 500.1 GB, 500107862016 bytes
      255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
      Units = sectors of 1 * 512 = 512 bytes
      Sector size (logical/physical): 512 bytes / 512 bytes
      I/O size (minimum/optimal): 512 bytes / 512 bytes
      Disk identifier: 0x00000000

      Disk /dev/sdc doesn't contain a valid partition table

      Disk /dev/sdd: 500.1 GB, 500107862016 bytes
      255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
      Units = sectors of 1 * 512 = 512 bytes
      Sector size (logical/physical): 512 bytes / 512 bytes
      I/O size (minimum/optimal): 512 bytes / 512 bytes
      Disk identifier: 0x00000000

      Disk /dev/sdd doesn't contain a valid partition table

      Disk /dev/sde: 4110 MB, 4110228480 bytes
      127 heads, 62 sectors/track, 1019 cylinders, total 8027790 sectors
      Units = sectors of 1 * 512 = 512 bytes
      Sector size (logical/physical): 512 bytes / 512 bytes
      I/O size (minimum/optimal): 512 bytes / 512 bytes
      Disk identifier: 0x0008cfe5

      Device Boot Start End Blocks Id System
      /dev/sde1 * 2048 7593983 3795968 83 Linux
      /dev/sde2 7596030 8026111 215041 5 Extended
      /dev/sde5 7596032 8026111 215040 82 Linux swap / Solaris
      jonherns@NAS01:/$
    • mdadm --stop /dev/md127
      mdadm --assemble --force --verbose /dev/md127 /dev/sd[abcd]

      Then post the output cat /proc/mdstat

      if that works, the following might help too:
      omv-mkconf mdadm
      omv 4.0.14 arrakis | 64 bit | 4.13 backports kernel | omvextrasorg 4.1.0
      omv-extras.org plugins source code and issue tracker - github.com/OpenMediaVault-Plugin-Developers

      Please don't PM for support... Too many PMs!
    • Thank you so much. That worked. I was then able to mount the volume. After I get the important stuff backed up, I will reboot and see about re-adding the drive back to the array.

      root@NAS01:/#
      root@NAS01:/# mdadm --stop /dev/md127
      mdadm: stopped /dev/md127
      root@NAS01:/# mdadm --assemble --force --verbose /dev/md127 /dev/sd[abcd]
      mdadm: looking for devices for /dev/md127
      mdadm: /dev/sda is identified as a member of /dev/md127, slot 0.
      mdadm: /dev/sdb is identified as a member of /dev/md127, slot 1.
      mdadm: /dev/sdc is identified as a member of /dev/md127, slot 2.
      mdadm: /dev/sdd is identified as a member of /dev/md127, slot 3.
      mdadm: clearing FAULTY flag for device 1 in /dev/md127 for /dev/sdb
      mdadm: Marking array /dev/md127 as 'clean'
      mdadm: added /dev/sda to /dev/md127 as 0 (possibly out of date)
      mdadm: added /dev/sdb to /dev/md127 as 1
      mdadm: added /dev/sdd to /dev/md127 as 3
      mdadm: added /dev/sdc to /dev/md127 as 2
      mdadm: /dev/md127 has been started with 3 drives (out of 4).
      root@NAS01:/# cat /proc/mdstat
      Personalities : [raid6] [raid5] [raid4]
      md127 : active (auto-read-only) raid5 sdc[2] sdd[3] sdb[1]
      2929893888 blocks super 1.2 level 5, 512k chunk, algorithm 2 [4/3] [_UUU]

      unused devices: <none>
      root@NAS01:/# omv-mkconf mdadm
      update-initramfs: Generating /boot/initrd.img-3.2.0-4-amd64
      root@NAS01:/#