LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Gentoo (https://www.linuxquestions.org/questions/gentoo-87/)
-   -   Mdadm can't find array on boot, but mounts manually on login (https://www.linuxquestions.org/questions/gentoo-87/mdadm-can%27t-find-array-on-boot-but-mounts-manually-on-login-4175694079/)

nydas 04-22-2021 03:34 AM

Mdadm can't find array on boot, but mounts manually on login
 
Hi,

First post here, and I hope someone can help me.

I've got a fresh install of Gentoo on a 2TB disk - sda - and then 4x 4TB disks - sd{f,g,h,i} - on which I've used mdadm to build a RAID6 array. This array is listed in my fstab to mount as /home.

On boot, I get an error notification:

Code:

mdadm: No arrays found in config file or automatically
Checking local filesystems ...
/dev/sda3: clean, 363490/111599616 files, 9038029/446369814 blocks
fsck.ext4: Unable to resolve 'UUID=0534d246-53df-4bf5-b03e-47200d9557dd'

followed by:

Code:

mount: /home: can't find UUID=0534d246-53df-4bf5-b03e-47200d9557dd
Some local filesystem failed to mount

Once I login, I see that it's failed to mount. That said, if I run 'mount -a' then it will mount fine.

mdadm --detail --scan shows the following:
Code:

ARRAY /dev/md/livecd:NydasCoreRaid1 metadata=1.2 name=livecd:NydasCoreRaid1 UUID=63fa5173:12b79cb4:e75da233:4986f28d
blkid /dev/md127 shows the following;
Code:

/dev/md127: LABEL="NydasCoreRaid1" UUID="0534d246-53df-4bf5-b03e-47200d9557dd" BLOCK_SIZE="4096" TYPE="ext4"
I generated an initramfs using the following:

Code:

genkernel --install --mdadm initramfs
Followed by:
Code:

grub-mkconfig -o /boot/grub/grub.cfg
So I *think* mdadm is running. I just can't get it to see the array. Oh, my /etc/mdadm.conf is completely hashed (#) out. However it says in the first line of the comments that it should run successfully without the file.

Your assistance would be really appreciated. First time I've used mdadm and first time I've used Gentoo. Hoping I haven't bitten off more than I can chew :-/

Andy

smallpond 04-26-2021 09:31 AM

Did you create the RAID on partitions or whole disks? For gpt partitions you can set a RAID flag. For a whole disk, there is no label, so the RAID needs to be found by reading mdadm.conf on the root partition.


All times are GMT -5. The time now is 07:17 PM.