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:
Code
root@openmediavault:~# mdadm --run /dev/md0
mdadm: started array /dev/md0
root@openmediavault:~# mdadm --add /dev/md0 /dev/sdg
mdadm: added /dev/sdg
root@openmediavault:~# cat /proc/mdstat
Personalities : [raid1] [linear] [multipath] [raid0] [raid6] [raid5] [raid4] [raid10]
md0 : active raid1 sdg[2] sdc[1]
1953383488 blocks super 1.2 [2/1] [_U]
[=>...................] recovery = 5.2% (101806656/1953383488) finish=274.6min speed=112369K/sec
bitmap: 1/15 pages [4KB], 65536KB chunk
md1 : active raid1 sda[0] sdf[1]
234307584 blocks super 1.2 [2/2] [UU]
bitmap: 1/2 pages [4KB], 65536KB chunk
unused devices: <none>
Alles anzeigen
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
Code
# mdadm.conf
#
# Please refer to mdadm.conf(5) for information about this file.
#
# by default, scan all partitions (/proc/partitions) for MD superblocks.
# alternatively, specify devices to scan, using wildcards if desired.
# Note, if no DEVICE line is present, then "DEVICE partitions" is assumed.
# To avoid the auto-assembly of RAID devices a pattern that CAN'T match is
# used if no RAID devices are configured.
DEVICE partitions
# auto-create devices with Debian standard permissions
CREATE owner=root group=disk mode=0660 auto=yes
# automatically tag new arrays as belonging to the local system
HOMEHOST <system>
# definitions of existing MD arrays
ARRAY /dev/md0 metadata=1.2 spares=1 name=Homeserver:Diskstation UUID=2d562cb8:6c2336b2:7a0d7ee0:cb1d1aeb
ARRAY /dev/md1 metadata=1.2 name=openmediavault:vmssd UUID=2c8874e3:5655b13d:9d21b3a5:4577289d
# instruct the monitoring daemon where to send mail alerts
MAILADDR ****@****
MAILFROM root
Alles anzeigen
blkid
Code
/dev/sda: UUID="2c8874e3-5655-b13d-9d21-b3a54577289d" UUID_SUB="fa84b3f3-c794-42dc-72e5-a028bfbb26f2" LABEL="openmediavault:vmssd" TYPE="linux_raid_member"
/dev/sdc: UUID="2d562cb8-6c23-36b2-7a0d-7ee0cb1d1aeb" UUID_SUB="d507beb4-6e71-09cd-0d80-61cd958bcc6c" LABEL="Homeserver:Diskstation" TYPE="linux_raid_member"
/dev/sdd1: LABEL="Seagate2TB" UUID="739070cf-0853-45b8-ae5b-4f0e666aff5a" TYPE="ext4" PARTUUID="cf709073-5308-b845-ae5b-4f0e666aff5a"
/dev/sde1: LABEL="Movies" UUID="b1f0ba9e-ef9b-45d7-a8cc-b5892579472e" TYPE="ext4" PARTUUID="042712d3-d1e1-49d0-96f0-becf406d2b02"
/dev/sdb1: UUID="651de087-dc7d-4fdf-babc-68c9c28bc9e4" TYPE="ext4" PARTUUID="a314a7cd-01"
/dev/sdb5: UUID="222b616d-fcc1-460c-a574-3024eb12b7a0" TYPE="swap" PARTUUID="a314a7cd-05"
/dev/sdf: UUID="2c8874e3-5655-b13d-9d21-b3a54577289d" UUID_SUB="e74774ad-214d-d33a-cce2-27f7dfcbb7f8" LABEL="openmediavault:vmssd" TYPE="linux_raid_member"
/dev/md1: LABEL="vmssd" UUID="1ef45687-ce99-4fd6-84d4-a7ff461942cc" TYPE="ext4"
/dev/md0: LABEL="Diskstation" UUID="e5eb1b9f-9404-48ee-8a55-405298b60745" TYPE="ext4"
/dev/sdg1: PARTUUID="d9c0922c-e3fd-489a-9839-1a1f71233dad"
fdisk -l | grep "Disk "
Code
The primary GPT table is corrupt, but the backup appears OK, so that will be used.
Disk /dev/sda: 223,6 GiB, 240065183744 bytes, 468877312 sectors
Disk /dev/sdc: 1,8 TiB, 2000398934016 bytes, 3907029168 sectors
Disk /dev/sdd: 1,8 TiB, 2000398934016 bytes, 3907029168 sectors
Disk identifier: D626524B-B40E-964B-8767-0689F8D14FFB
Disk /dev/sde: 9,1 TiB, 10000831348736 bytes, 19532873728 sectors
Disk identifier: 8624BFC7-C523-4D26-9792-DE1FD0972D67
Disk /dev/sdb: 55,9 GiB, 60022480896 bytes, 117231408 sectors
Disk identifier: 0xa314a7cd
Disk /dev/sdf: 223,6 GiB, 240065183744 bytes, 468877312 sectors
Disk /dev/sdg: 3,7 TiB, 4000787030016 bytes, 7814037168 sectors
Disk identifier: DCEC76DF-A4C2-482E-B970-C5D7AC676ECA
Disk /dev/md1: 223,5 GiB, 239930966016 bytes, 468615168 sectors
Disk /dev/md0: 1,8 TiB, 2000264691712 bytes, 3906766976 sectors
Alles anzeigen
mdadm --detail --scan --verbose
Code
ARRAY /dev/md1 level=raid1 num-devices=2 metadata=1.2 name=openmediavault:vmssd UUID=2c8874e3:5655b13d:9d21b3a5:4577289d
devices=/dev/sda,/dev/sdf
ARRAY /dev/md0 level=raid1 num-devices=2 metadata=1.2 spares=1 name=Homeserver:Diskstation UUID=2d562cb8:6c2336b2:7a0d7ee0:cb1d1aeb
devices=/dev/sdc,/dev/sdg