You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mdadm now requires kernel module md_mod to be loaded before mounting a RAID pool
I have an mdadm raid pool mounted at boot in /etc/fstab, and I used the attribute nofail to not block boot in case of mount failure.
In my case I have Docker services with Volume Mounts to locations in my mdadm RAID pool, and when Docker started at boot it created a set of folders for every volume mount file or folder. Then some Docker services automatically started and wrote a bunch of default files within some of those locations.
lsblk should be missing any mention of md### UUID-from-/etc/fstab and have a blank value for MOUNTPOINT, even though sda/sdb/sdc/sdd/... devices are present
lsblk -o NAME,UUID,MOUNTPOINT,LABEL --fs
Preparation
Before solving the problem, you must make sure to clear out any files/folders created at your mdadm mountpoint that you have set in /etc/fstab
Stop docker if it created files/folders inside the mountpoint sudo systemctl stop docker
Feel free to back up the files with sudo cp -a /mnt/raidpoolname ~/justincase
Then delete contents with sudo find /mnt/raidpoolname -mindepth 1 -delete
Load RAID Pool Manually
sudo modprobe md_mod
sudo mdadm --assemble --scan
sudo mount -a
You should then be able to see your files at /mnt/raidpoolname
Restore mdadm mount at boot
mdadm 4.5 needs md_mod mounted before attempting to mount in my case, so using sudo edit /etc/mkinitcpio.conf and add md_mod to MODULES eg MODULES=(amdgpu md_mod) followed by a regeneration of initramfs with sudo mkinitcpio -P
Extra steps
That should be enough, but just to be safe you can take additional steps to avoid similar problems in the future
Make sure md_mod is required by mdadm, regardless of your /etc/mkinitcpio.conf echo "md_mod" | sudo tee /etc/modules-load.d/md_mod.conf
Make sure docker does not start without your raid pool being successfully mounted first sudo systemctl edit docker.service
read the instructions and add the following in the space between the comments at the top of the systemd service /etc/systemd/system/docker.service.d/override.conf
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
mdadm now requires kernel module
md_modto be loaded before mounting a RAID poolI have an mdadm raid pool mounted at boot in /etc/fstab, and I used the attribute nofail to not block boot in case of mount failure.
In my case I have Docker services with Volume Mounts to locations in my mdadm RAID pool, and when Docker started at boot it created a set of folders for every volume mount file or folder. Then some Docker services automatically started and wrote a bunch of default files within some of those locations.
This might be your problem if you run
Confirm diagnosis
lsblk should be missing any mention of
md### UUID-from-/etc/fstaband have a blank value for MOUNTPOINT, even though sda/sdb/sdc/sdd/... devices are presentPreparation
Before solving the problem, you must make sure to clear out any files/folders created at your mdadm mountpoint that you have set in /etc/fstab
Stop docker if it created files/folders inside the mountpoint
sudo systemctl stop dockerFeel free to back up the files with
sudo cp -a /mnt/raidpoolname ~/justincaseThen delete contents with
sudo find /mnt/raidpoolname -mindepth 1 -deleteLoad RAID Pool Manually
You should then be able to see your files at
/mnt/raidpoolnameRestore mdadm mount at boot
mdadm 4.5 needs md_mod mounted before attempting to mount in my case, so using sudo edit /etc/mkinitcpio.conf and add md_mod to MODULES eg
MODULES=(amdgpu md_mod)followed by a regeneration of initramfs withsudo mkinitcpio -PExtra steps
That should be enough, but just to be safe you can take additional steps to avoid similar problems in the future
Make sure md_mod is required by mdadm, regardless of your /etc/mkinitcpio.conf
echo "md_mod" | sudo tee /etc/modules-load.d/md_mod.confMake sure docker does not start without your raid pool being successfully mounted first
sudo systemctl edit docker.serviceread the instructions and add the following in the space between the comments at the top of the systemd service
/etc/systemd/system/docker.service.d/override.confFinal steps
Restart docker if necessary
sudo systemctl restart dockerReboot the computer to make sure mdadm can load at boot
Note: This issue was directly addressed in mdadm pull request md-raid-utilities/mdadm#228 and was committed on January 13.
The fix is now available as package version 4.5-2 (Arch discussion) currently in the Arch Core-Testing repo
All reactions