Hello,
on my compute instance (Linux <hostname>.localdomain 4.1.12-61.1.28.el6uek.x86_64 #2 SMP Thu Feb 23 20:03:53 PST 2017 x86_64 x86_64 x86_64 GNU/Linux) I created a RAID 10 device as follows:
1. For four NVMe drives:
parted /dev/nvme[0-3]n1
mklabel gpt
mkpart primary 0% 1005
2. Created a RAID 10 device
mdadm --create /dev/md0 --level=10 --raid-devices=4 /dev/nvme[0-3]n1p1
3. Added configuration to mdadm.conf:
mdadm –-detail –-scan | sudo tee –a /etc/mdadm.conf >> /dev/null
4. Created a partion on /dev/md0
parted /dev/md0
mklabel gpt
mkpart primary 0% 100%
5. Created a filesystem
mkfs.ext4 /dev/md0p1
6. Mounted a filesystem to a known directory
mount /dev/md0p1 /u01
7. Added the filesystem and device to /etc/fstab
/dev/md0p1 /u01 ext4 defaults 1 2
I rebooted the machine to test it and /u01 wasn't mounted and /dev/md0 wasn't there either. I've found a device called /dev/md127 that is my RAID10 device. How would I use it without detroying data and why did this happen and finally how can I prevent it from happening again?
Thanks
Andy