solderdot
Posts: 51
Joined: Wed Oct 09, 2019 2:11 pm

MDADM damaged?

Wed Nov 06, 2019 10:47 am

Dear community,
I'm facing a strange issue with mdadm. I intend creating a RAID5 on 4 pendrives, which worked perfectly fine in the past. I use an image which is based on BusterLite plus SSH being enabled and a fixed IP address being configured, all this in a headless setup. To create the RAID array I do the following:

Code: Select all

sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install mdadm
sudo blkid
sudo mdadm --create --verbose /dev/md0 --level=5 --raid-devices=4 /dev/sda1 /dev/sdb1 /dev/sdc1 /dev/sdd1
With sudo blkid I check that the pendrives actually reside on sda1 to sdd1, which is the case.
The mdadm --create leads to an error message:

Code: Select all

modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/4.19.66-v7l+/modules.dep.bin'
modprobe: FATAL: Module md_mod not found in directory /lib/modules/4.19.66-v7l+
Indeed, the directory /lib/modules/4.19.66-v7l+ does not exist. Instead I see 4.19.75+. Apparently something newer is installed on my Raspi, bvut for some reason mdadam intends using an older version.
This is 100% reproducible on my system.
Here is the full output of mdadm --create:

Code: Select all

pi@raspberrypi:~ $ sudo mdadm --create --verbose /dev/md0 --level=5 --raid-devices=4 /dev/sda1 /dev/sdb1 /dev/sdc1 /dev/sdd1
mdadm: layout defaults to left-symmetric
mdadm: layout defaults to left-symmetric
mdadm: chunk size defaults to 512K
mdadm: partition table exists on /dev/sda1
mdadm: partition table exists on /dev/sda1 but will be lost or
       meaningless after creating array
mdadm: partition table exists on /dev/sdb1
mdadm: partition table exists on /dev/sdb1 but will be lost or
       meaningless after creating array
mdadm: partition table exists on /dev/sdc1
mdadm: partition table exists on /dev/sdc1 but will be lost or
       meaningless after creating array
mdadm: partition table exists on /dev/sdd1
mdadm: partition table exists on /dev/sdd1 but will be lost or
       meaningless after creating array
mdadm: size set to 30700544K
Continue creating array? y
modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/4.19.66-v7l+/modules.dep.bin'
modprobe: FATAL: Module md_mod not found in directory /lib/modules/4.19.66-v7l+
mdadm: Fail create md0 when using /sys/module/md_mod/parameters/new_array
mdadm: unexpected failure opening /dev/md0
Any ideas what might cause that phenomenon and how to overcome this?

jj_0
Posts: 113
Joined: Wed Jul 11, 2012 7:07 am

Re: MDADM damaged?

Wed Nov 06, 2019 10:54 am

Did you reboot after the dist-upgrade? If a new kernel is installed it won't be active until after reboot. After that it should look for modules in the 4.19.75+ modules directory.

solderdot
Posts: 51
Joined: Wed Oct 09, 2019 2:11 pm

Re: MDADM damaged?

Wed Nov 06, 2019 2:22 pm

Urgs! Yes, I missed that.
I guess, now this thread should be moved to the "Beginners" forum.
Sorry for having bothered you, but many thanks for bringing me back on track in virtually no time.
Best regards

Return to “Troubleshooting”