Can't find RAID1 after reboot

1

I have Debian8 with Open Media Vault on it.

I'm tring to build a RAID1 with two Seagate Ironwolf 6TB. I can build the RAID1, create an ext4 partition on it and use it without a problem.

The problem is that every time that I reboot the RAID disappear.

If I look with gparted both hard drives has no partion, like I never created an ext4 partion on them, but if I look with testdisk I can find every file. Also if I try to rebuild the RAID the files will still be there, so I'm not losing my data.

After the reboot I tried to see if I could find md0 but this is the result:

mdadm --detail --scan

ARRAY /dev/md127 metadata=1.2 name=NAS:Data UUID=ed696fd2:96feba4f:ab44fb72:b800fb01

No md0, only 127! I also tried with this command:

root@Delibird:~# mdadm -Es
ARRAY /dev/md/Data  metadata=1.2 UUID=ed696fd2:96feba4f:ab44fb72:b800fb01 name=NAS:Data

and still no result.

This is the conf file (/etc/mdadm/mdadm.conf)

# 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/md127 metadata=1.2 name=NAS:Data UUID=ed696fd2:96feba4f:ab44fb72:b800fb01
ARRAY /dev/md0 metadata=1.2 name=Delibird:Telefilm UUID=4de2d990:37fa60cf:b34e2c9e:63b4d0ca

I tried to update the conf for the boot with

update-initramfs -u

But even after that, the RAID1 is still missing after the reboot :(

How should I do? I really don't know how to solve my problem!

Ansem

Posted 2017-11-02T18:54:37.467

Reputation: 21

You need to create a boot script that runs the Mdadm commands and mounts the drives. Put the script in /etc/init.d/ to run on startup – Eric F – 2017-11-02T19:11:45.333

which mdaadm command ? – Ansem – 2017-11-02T21:38:25.560

Put mdadm --assemble --scan in the file as well as the mounting commands – Eric F – 2017-11-03T12:29:26.473

Answers

0

You have not advised the distro you are using- most do it automatically, or when you start mdadm as a service, but the bit you are missing is the mdadm command to reassemble the drives.

.Normally this can be done with the command

mdadm --reassemble --scan

Otherwise you can reassemble the disks manually if your mdadm conf is unavailable or corrupt.

davidgo

Posted 2017-11-02T18:54:37.467

Reputation: 49 152

I tried but it give error: mdadm: unrecognized option '--reassemble' – Ansem – 2017-11-02T20:09:17.827

Try mdadm --assemble --scan (Also, try Google next time if you have a solution which does not quite work - the idea of this forum is to provide knowledge and help, but we do also expect you to do your own homework) – davidgo – 2017-11-02T20:22:06.810

the command worked, but it did nothing :( – Ansem – 2017-11-02T21:39:27.437