RAIDs disappearing on reboot (Centos 7.5)
Clash Royale CLAN TAG#URR8PPP
up vote
4
down vote
favorite
I'm trying to create 4 RAID 0 disk arrays on my system running Centos 7.5 and have the RAIDs automount after a reboot. For some reason, only one of the RAIDs /dev/md0 is persistent between boots. The remaining three RAIDs (md1,md2,md3) all disappear after a reboot.
I build the RAIDs using:
$ sudo mdadm --create --chunk 4096 --verbose /dev/md0 --level=stripe
--raid-devices=2 /dev/nvme0n1 /dev/nvme1n1
$ sudo mdadm --create --chunk 4096 --verbose /dev/md1 --level=stripe
--raid-devices=2 /dev/nvme2n1 /dev/nvme3n1
$ sudo mdadm --create --chunk 4096 --verbose /dev/md2 --level=stripe
--raid-devices=2 /dev/nvme4n1 /dev/nvme5n1
$ sudo mdadm --create --chunk 4096 --verbose /dev/md3 --level=stripe
--raid-devices=2 /dev/nvme6n1 /dev/nvme7n1
Then I update the /etc/mdadm.conf
file using:
$ mdadm --detail --scan >> /etc/mdadm.conf
Finally after mounting the drives to their appropriate directory and adding them to /etc/fstab
I rebuilt the initramfs image using dracut
:
$ sudo dracut --force --mdadmconf
After running dracut
, I reboot the system and /dev/md0
is there but the other RAIDs are not, so I did some investigating and it seems like /etc/mdadm.conf
is not being included in the initramfs, so I repeated all of the previous steps, except for the dracut
command I manually added what seemed to be missing using:
$ sudo dracut --force --include /etc/mdadm.conf /etc/mdadm.conf
--add="mdraid" --mdadmconf`
After running the command, I see that /etc/mdadm.conf
and /usr/sbin/mdadm
are included in the initramfs using:
$ sudo lsinitrd /boot/initramfs-$(uname -r).img
What am I missing?
Edit 1
I've added mdadm --assemble --scan to /etc/rc.local and tried running it from the command line once the system has booted, but md1, md2, and md3 still are not found. As before, md0 is found at boot.
I have a separate OS disk, so I am not booting from md0
centos raid mdadm software-raid dracut
add a comment |Â
up vote
4
down vote
favorite
I'm trying to create 4 RAID 0 disk arrays on my system running Centos 7.5 and have the RAIDs automount after a reboot. For some reason, only one of the RAIDs /dev/md0 is persistent between boots. The remaining three RAIDs (md1,md2,md3) all disappear after a reboot.
I build the RAIDs using:
$ sudo mdadm --create --chunk 4096 --verbose /dev/md0 --level=stripe
--raid-devices=2 /dev/nvme0n1 /dev/nvme1n1
$ sudo mdadm --create --chunk 4096 --verbose /dev/md1 --level=stripe
--raid-devices=2 /dev/nvme2n1 /dev/nvme3n1
$ sudo mdadm --create --chunk 4096 --verbose /dev/md2 --level=stripe
--raid-devices=2 /dev/nvme4n1 /dev/nvme5n1
$ sudo mdadm --create --chunk 4096 --verbose /dev/md3 --level=stripe
--raid-devices=2 /dev/nvme6n1 /dev/nvme7n1
Then I update the /etc/mdadm.conf
file using:
$ mdadm --detail --scan >> /etc/mdadm.conf
Finally after mounting the drives to their appropriate directory and adding them to /etc/fstab
I rebuilt the initramfs image using dracut
:
$ sudo dracut --force --mdadmconf
After running dracut
, I reboot the system and /dev/md0
is there but the other RAIDs are not, so I did some investigating and it seems like /etc/mdadm.conf
is not being included in the initramfs, so I repeated all of the previous steps, except for the dracut
command I manually added what seemed to be missing using:
$ sudo dracut --force --include /etc/mdadm.conf /etc/mdadm.conf
--add="mdraid" --mdadmconf`
After running the command, I see that /etc/mdadm.conf
and /usr/sbin/mdadm
are included in the initramfs using:
$ sudo lsinitrd /boot/initramfs-$(uname -r).img
What am I missing?
Edit 1
I've added mdadm --assemble --scan to /etc/rc.local and tried running it from the command line once the system has booted, but md1, md2, and md3 still are not found. As before, md0 is found at boot.
I have a separate OS disk, so I am not booting from md0
centos raid mdadm software-raid dracut
Are the partitions marked linux raid? (type fd)
â wurtel
Aug 8 at 9:39
Looking at this it would seem to be the case that you're suppose to bring up the rest yourself - superuser.com/questions/801826/â¦. The A'er you received is basically telling you this, but not telling you how. You could putmdadm --assemble --scan
inrc.local
to see if it forces them to come up. I'd suspect you could put this into systemd as well.
â slmâ¦
Aug 8 at 11:04
See this thread - centos.org/forums/viewtopic.php?t=54901.
â slmâ¦
Aug 8 at 11:21
add a comment |Â
up vote
4
down vote
favorite
up vote
4
down vote
favorite
I'm trying to create 4 RAID 0 disk arrays on my system running Centos 7.5 and have the RAIDs automount after a reboot. For some reason, only one of the RAIDs /dev/md0 is persistent between boots. The remaining three RAIDs (md1,md2,md3) all disappear after a reboot.
I build the RAIDs using:
$ sudo mdadm --create --chunk 4096 --verbose /dev/md0 --level=stripe
--raid-devices=2 /dev/nvme0n1 /dev/nvme1n1
$ sudo mdadm --create --chunk 4096 --verbose /dev/md1 --level=stripe
--raid-devices=2 /dev/nvme2n1 /dev/nvme3n1
$ sudo mdadm --create --chunk 4096 --verbose /dev/md2 --level=stripe
--raid-devices=2 /dev/nvme4n1 /dev/nvme5n1
$ sudo mdadm --create --chunk 4096 --verbose /dev/md3 --level=stripe
--raid-devices=2 /dev/nvme6n1 /dev/nvme7n1
Then I update the /etc/mdadm.conf
file using:
$ mdadm --detail --scan >> /etc/mdadm.conf
Finally after mounting the drives to their appropriate directory and adding them to /etc/fstab
I rebuilt the initramfs image using dracut
:
$ sudo dracut --force --mdadmconf
After running dracut
, I reboot the system and /dev/md0
is there but the other RAIDs are not, so I did some investigating and it seems like /etc/mdadm.conf
is not being included in the initramfs, so I repeated all of the previous steps, except for the dracut
command I manually added what seemed to be missing using:
$ sudo dracut --force --include /etc/mdadm.conf /etc/mdadm.conf
--add="mdraid" --mdadmconf`
After running the command, I see that /etc/mdadm.conf
and /usr/sbin/mdadm
are included in the initramfs using:
$ sudo lsinitrd /boot/initramfs-$(uname -r).img
What am I missing?
Edit 1
I've added mdadm --assemble --scan to /etc/rc.local and tried running it from the command line once the system has booted, but md1, md2, and md3 still are not found. As before, md0 is found at boot.
I have a separate OS disk, so I am not booting from md0
centos raid mdadm software-raid dracut
I'm trying to create 4 RAID 0 disk arrays on my system running Centos 7.5 and have the RAIDs automount after a reboot. For some reason, only one of the RAIDs /dev/md0 is persistent between boots. The remaining three RAIDs (md1,md2,md3) all disappear after a reboot.
I build the RAIDs using:
$ sudo mdadm --create --chunk 4096 --verbose /dev/md0 --level=stripe
--raid-devices=2 /dev/nvme0n1 /dev/nvme1n1
$ sudo mdadm --create --chunk 4096 --verbose /dev/md1 --level=stripe
--raid-devices=2 /dev/nvme2n1 /dev/nvme3n1
$ sudo mdadm --create --chunk 4096 --verbose /dev/md2 --level=stripe
--raid-devices=2 /dev/nvme4n1 /dev/nvme5n1
$ sudo mdadm --create --chunk 4096 --verbose /dev/md3 --level=stripe
--raid-devices=2 /dev/nvme6n1 /dev/nvme7n1
Then I update the /etc/mdadm.conf
file using:
$ mdadm --detail --scan >> /etc/mdadm.conf
Finally after mounting the drives to their appropriate directory and adding them to /etc/fstab
I rebuilt the initramfs image using dracut
:
$ sudo dracut --force --mdadmconf
After running dracut
, I reboot the system and /dev/md0
is there but the other RAIDs are not, so I did some investigating and it seems like /etc/mdadm.conf
is not being included in the initramfs, so I repeated all of the previous steps, except for the dracut
command I manually added what seemed to be missing using:
$ sudo dracut --force --include /etc/mdadm.conf /etc/mdadm.conf
--add="mdraid" --mdadmconf`
After running the command, I see that /etc/mdadm.conf
and /usr/sbin/mdadm
are included in the initramfs using:
$ sudo lsinitrd /boot/initramfs-$(uname -r).img
What am I missing?
Edit 1
I've added mdadm --assemble --scan to /etc/rc.local and tried running it from the command line once the system has booted, but md1, md2, and md3 still are not found. As before, md0 is found at boot.
I have a separate OS disk, so I am not booting from md0
centos raid mdadm software-raid dracut
centos raid mdadm software-raid dracut
edited Aug 8 at 13:59
asked Aug 7 at 18:44
ks0ze
1212
1212
Are the partitions marked linux raid? (type fd)
â wurtel
Aug 8 at 9:39
Looking at this it would seem to be the case that you're suppose to bring up the rest yourself - superuser.com/questions/801826/â¦. The A'er you received is basically telling you this, but not telling you how. You could putmdadm --assemble --scan
inrc.local
to see if it forces them to come up. I'd suspect you could put this into systemd as well.
â slmâ¦
Aug 8 at 11:04
See this thread - centos.org/forums/viewtopic.php?t=54901.
â slmâ¦
Aug 8 at 11:21
add a comment |Â
Are the partitions marked linux raid? (type fd)
â wurtel
Aug 8 at 9:39
Looking at this it would seem to be the case that you're suppose to bring up the rest yourself - superuser.com/questions/801826/â¦. The A'er you received is basically telling you this, but not telling you how. You could putmdadm --assemble --scan
inrc.local
to see if it forces them to come up. I'd suspect you could put this into systemd as well.
â slmâ¦
Aug 8 at 11:04
See this thread - centos.org/forums/viewtopic.php?t=54901.
â slmâ¦
Aug 8 at 11:21
Are the partitions marked linux raid? (type fd)
â wurtel
Aug 8 at 9:39
Are the partitions marked linux raid? (type fd)
â wurtel
Aug 8 at 9:39
Looking at this it would seem to be the case that you're suppose to bring up the rest yourself - superuser.com/questions/801826/â¦. The A'er you received is basically telling you this, but not telling you how. You could put
mdadm --assemble --scan
in rc.local
to see if it forces them to come up. I'd suspect you could put this into systemd as well.â slmâ¦
Aug 8 at 11:04
Looking at this it would seem to be the case that you're suppose to bring up the rest yourself - superuser.com/questions/801826/â¦. The A'er you received is basically telling you this, but not telling you how. You could put
mdadm --assemble --scan
in rc.local
to see if it forces them to come up. I'd suspect you could put this into systemd as well.â slmâ¦
Aug 8 at 11:04
See this thread - centos.org/forums/viewtopic.php?t=54901.
â slmâ¦
Aug 8 at 11:21
See this thread - centos.org/forums/viewtopic.php?t=54901.
â slmâ¦
Aug 8 at 11:21
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
0
down vote
The initrd only creates the RAID array needed for root and swap. Run this from the main system (after initrd changes to the real root)
$ sudo mdadm --assemble --scan
Whoever downvoted, please give at least a reason. Regardingsudo
, I didn't mean to run it from the command line as an unprivileged user, but from a script that runs as root.
â RalfFriedl
Aug 8 at 6:14
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
The initrd only creates the RAID array needed for root and swap. Run this from the main system (after initrd changes to the real root)
$ sudo mdadm --assemble --scan
Whoever downvoted, please give at least a reason. Regardingsudo
, I didn't mean to run it from the command line as an unprivileged user, but from a script that runs as root.
â RalfFriedl
Aug 8 at 6:14
add a comment |Â
up vote
0
down vote
The initrd only creates the RAID array needed for root and swap. Run this from the main system (after initrd changes to the real root)
$ sudo mdadm --assemble --scan
Whoever downvoted, please give at least a reason. Regardingsudo
, I didn't mean to run it from the command line as an unprivileged user, but from a script that runs as root.
â RalfFriedl
Aug 8 at 6:14
add a comment |Â
up vote
0
down vote
up vote
0
down vote
The initrd only creates the RAID array needed for root and swap. Run this from the main system (after initrd changes to the real root)
$ sudo mdadm --assemble --scan
The initrd only creates the RAID array needed for root and swap. Run this from the main system (after initrd changes to the real root)
$ sudo mdadm --assemble --scan
edited Aug 8 at 4:50
slmâ¦
238k65491662
238k65491662
answered Aug 7 at 20:03
RalfFriedl
3,5601522
3,5601522
Whoever downvoted, please give at least a reason. Regardingsudo
, I didn't mean to run it from the command line as an unprivileged user, but from a script that runs as root.
â RalfFriedl
Aug 8 at 6:14
add a comment |Â
Whoever downvoted, please give at least a reason. Regardingsudo
, I didn't mean to run it from the command line as an unprivileged user, but from a script that runs as root.
â RalfFriedl
Aug 8 at 6:14
Whoever downvoted, please give at least a reason. Regarding
sudo
, I didn't mean to run it from the command line as an unprivileged user, but from a script that runs as root.â RalfFriedl
Aug 8 at 6:14
Whoever downvoted, please give at least a reason. Regarding
sudo
, I didn't mean to run it from the command line as an unprivileged user, but from a script that runs as root.â RalfFriedl
Aug 8 at 6:14
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f461142%2fraids-disappearing-on-reboot-centos-7-5%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Are the partitions marked linux raid? (type fd)
â wurtel
Aug 8 at 9:39
Looking at this it would seem to be the case that you're suppose to bring up the rest yourself - superuser.com/questions/801826/â¦. The A'er you received is basically telling you this, but not telling you how. You could put
mdadm --assemble --scan
inrc.local
to see if it forces them to come up. I'd suspect you could put this into systemd as well.â slmâ¦
Aug 8 at 11:04
See this thread - centos.org/forums/viewtopic.php?t=54901.
â slmâ¦
Aug 8 at 11:21