RAID1 missing after each reboot

    • OMV 4.x
    • Resolved

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

    • RAID1 missing after each reboot

      Hey folks! I have a RAID1 with 2x2TB (sdg & sdc). Yesterday I replaced one of the disk. After that I reboot the system and this commands to restore the array:

      Brainfuck Source Code

      1. root@openmediavault:~# mdadm --run /dev/md0
      2. mdadm: started array /dev/md0
      3. root@openmediavault:~# mdadm --add /dev/md0 /dev/sdg
      4. mdadm: added /dev/sdg
      5. root@openmediavault:~# cat /proc/mdstat
      6. Personalities : [raid1] [linear] [multipath] [raid0] [raid6] [raid5] [raid4] [raid10]
      7. md0 : active raid1 sdg[2] sdc[1]
      8. 1953383488 blocks super 1.2 [2/1] [_U]
      9. [=>...................] recovery = 5.2% (101806656/1953383488) finish=274.6min speed=112369K/sec
      10. bitmap: 1/15 pages [4KB], 65536KB chunk
      11. md1 : active raid1 sda[0] sdf[1]
      12. 234307584 blocks super 1.2 [2/2] [UU]
      13. bitmap: 1/2 pages [4KB], 65536KB chunk
      14. unused devices: <none>
      Display All





      Now, after each reboot I have to do this steps again to restore the raid ?(
      I found some threads here with some soltions, e.g. omv-mkconf mdadm and update-initramfs -u, but its still the same problem. :/
      It would be nice if anyone know the solution to store the raid persistent.



      mdadm.conf
      Display Spoiler

      Source Code

      1. # mdadm.conf
      2. #
      3. # Please refer to mdadm.conf(5) for information about this file.
      4. #
      5. # by default, scan all partitions (/proc/partitions) for MD superblocks.
      6. # alternatively, specify devices to scan, using wildcards if desired.
      7. # Note, if no DEVICE line is present, then "DEVICE partitions" is assumed.
      8. # To avoid the auto-assembly of RAID devices a pattern that CAN'T match is
      9. # used if no RAID devices are configured.
      10. DEVICE partitions
      11. # auto-create devices with Debian standard permissions
      12. CREATE owner=root group=disk mode=0660 auto=yes
      13. # automatically tag new arrays as belonging to the local system
      14. HOMEHOST <system>
      15. # definitions of existing MD arrays
      16. ARRAY /dev/md0 metadata=1.2 spares=1 name=Homeserver:Diskstation UUID=2d562cb8:6c2336b2:7a0d7ee0:cb1d1aeb
      17. ARRAY /dev/md1 metadata=1.2 name=openmediavault:vmssd UUID=2c8874e3:5655b13d:9d21b3a5:4577289d
      18. # instruct the monitoring daemon where to send mail alerts
      19. MAILADDR ****@****
      20. MAILFROM root
      Display All

      blkid
      Display Spoiler

      Source Code

      1. /dev/sda: UUID="2c8874e3-5655-b13d-9d21-b3a54577289d" UUID_SUB="fa84b3f3-c794-42dc-72e5-a028bfbb26f2" LABEL="openmediavault:vmssd" TYPE="linux_raid_member"
      2. /dev/sdc: UUID="2d562cb8-6c23-36b2-7a0d-7ee0cb1d1aeb" UUID_SUB="d507beb4-6e71-09cd-0d80-61cd958bcc6c" LABEL="Homeserver:Diskstation" TYPE="linux_raid_member"
      3. /dev/sdd1: LABEL="Seagate2TB" UUID="739070cf-0853-45b8-ae5b-4f0e666aff5a" TYPE="ext4" PARTUUID="cf709073-5308-b845-ae5b-4f0e666aff5a"
      4. /dev/sde1: LABEL="Movies" UUID="b1f0ba9e-ef9b-45d7-a8cc-b5892579472e" TYPE="ext4" PARTUUID="042712d3-d1e1-49d0-96f0-becf406d2b02"
      5. /dev/sdb1: UUID="651de087-dc7d-4fdf-babc-68c9c28bc9e4" TYPE="ext4" PARTUUID="a314a7cd-01"
      6. /dev/sdb5: UUID="222b616d-fcc1-460c-a574-3024eb12b7a0" TYPE="swap" PARTUUID="a314a7cd-05"
      7. /dev/sdf: UUID="2c8874e3-5655-b13d-9d21-b3a54577289d" UUID_SUB="e74774ad-214d-d33a-cce2-27f7dfcbb7f8" LABEL="openmediavault:vmssd" TYPE="linux_raid_member"
      8. /dev/md1: LABEL="vmssd" UUID="1ef45687-ce99-4fd6-84d4-a7ff461942cc" TYPE="ext4"
      9. /dev/md0: LABEL="Diskstation" UUID="e5eb1b9f-9404-48ee-8a55-405298b60745" TYPE="ext4"
      10. /dev/sdg1: PARTUUID="d9c0922c-e3fd-489a-9839-1a1f71233dad"

      fdisk -l | grep "Disk "
      Display Spoiler

      Source Code

      1. The primary GPT table is corrupt, but the backup appears OK, so that will be used.
      2. Disk /dev/sda: 223,6 GiB, 240065183744 bytes, 468877312 sectors
      3. Disk /dev/sdc: 1,8 TiB, 2000398934016 bytes, 3907029168 sectors
      4. Disk /dev/sdd: 1,8 TiB, 2000398934016 bytes, 3907029168 sectors
      5. Disk identifier: D626524B-B40E-964B-8767-0689F8D14FFB
      6. Disk /dev/sde: 9,1 TiB, 10000831348736 bytes, 19532873728 sectors
      7. Disk identifier: 8624BFC7-C523-4D26-9792-DE1FD0972D67
      8. Disk /dev/sdb: 55,9 GiB, 60022480896 bytes, 117231408 sectors
      9. Disk identifier: 0xa314a7cd
      10. Disk /dev/sdf: 223,6 GiB, 240065183744 bytes, 468877312 sectors
      11. Disk /dev/sdg: 3,7 TiB, 4000787030016 bytes, 7814037168 sectors
      12. Disk identifier: DCEC76DF-A4C2-482E-B970-C5D7AC676ECA
      13. Disk /dev/md1: 223,5 GiB, 239930966016 bytes, 468615168 sectors
      14. Disk /dev/md0: 1,8 TiB, 2000264691712 bytes, 3906766976 sectors
      Display All

      mdadm --detail --scan --verbose
      Display Spoiler

      Source Code

      1. ARRAY /dev/md1 level=raid1 num-devices=2 metadata=1.2 name=openmediavault:vmssd UUID=2c8874e3:5655b13d:9d21b3a5:4577289d
      2. devices=/dev/sda,/dev/sdf
      3. ARRAY /dev/md0 level=raid1 num-devices=2 metadata=1.2 spares=1 name=Homeserver:Diskstation UUID=2d562cb8:6c2336b2:7a0d7ee0:cb1d1aeb
      4. devices=/dev/sdc,/dev/sdg