NVMe, software raid disappears after reboot

# Annoying…

mdadm --create /dev/md3 --level=1 --raid-disks=2  /dev/nvme0n1p3 /dev/nvme1n1p3
[root@db7 ~]# parted /dev/nvme0n1 p 
Model: Unknown (unknown)
Disk /dev/nvme0n1: 400GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name     Flags
 1      1049kB  40.0GB  40.0GB               primary  raid
 2      40.0GB  80.0GB  40.0GB               mysql    raid
 3      80.0GB  84.0GB  4000MB               xd       raid
reboot
# raid array disapeared
mdadm  --assemble --scan
# raid array apears
[root@db7 ~]# cat /etc/mdadm.conf 
MAILADDR root
DEV /dev/nvme[0-9]n[0-9]p[0-9]
ARRAY /dev/md3 metadata=1.2 name=db7.lan.psmm.pl:3 UUID=d308cda3:43619396:d7992342:360fe8b7
Added to 
vi /usr/lib/systemd/system/mdmonitor.service
ExecStartPre=-/bin/sudo /sbin/mdadm --assemble --scan --verbose
# Disgrace!
Sep  1 17:41:59 db7 sudo: mdadm: cannot open device /dev/nvme0n1p3: Permission denied
Sep  1 17:41:59 db7 sudo: mdadm: cannot open device /dev/nvme0n1p2: Permission denied

Solution:
SELINUX=disabled

https://bugzilla.redhat.com/show_bug.cgi?id=1230989

  1. No comments yet.

  1. No trackbacks yet.