I have 2 disk with the next structure:
lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 3,7T 0 disk
├─sda1 8:1 0 2,7T 0 part
└─sda2 8:2 0 931,5G 0 part
sdb 8:16 0 2,7T 0 disk
└─sdb1 8:17 0 2,7T 0 part
sda1 and sdb1 are part of md0 if I execute
mdadm --misc --detail /dev/md0
return
mdadm: cannot open /dev/md0: No such file or directory
My mdadm.conf is:
# mdadm.conf
#
# Please refer to mdadm.conf(5) for information about this file.
#
# by default (built-in), scan all partitions (/proc/partitions) and all
# containers for MD superblocks. alternatively, specify devices to scan, using
# wildcards if desired.
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>
# instruct the monitoring daemon where to send mail alerts
MAILADDR root
# definitions of existing MD arrays
# This configuration was auto-generated on Thu, 03 Mar 2016 21:53:00 +0100 by mkconf
ARRAY /dev/md/0 metadata=1.2 UUID=6ca17528:517621d3:e1c460a2:529955dd name=rp3-0:0
If I execute
sudo mdadm -A /dev/md0
or
sudo mdadm --assemble --scan
return
mdadm: /dev/md/0 has been started with 2 drives.
and the new disk structure is:
sda 8:0 0 3,7T 0 disk
├─sda1 8:1 0 2,7T 0 part
│ └─md0 9:0 0 5,5T 0 raid0
└─sda2 8:2 0 931,5G 0 part
sdb 8:16 0 2,7T 0 disk
└─sdb1 8:17 0 2,7T 0 part
└─md0 9:0 0 5,5T 0 raid0
The fstab line for raid is
/dev/md0 /mnt/ext ext4 defaults,nobootwait,nofail 0 0
nobootwait and nofail is for not crash systemd at boot.
When I reboot the system the raid0 disapear. How I can do for persist the raid after each reboot?
Thanks.