Ken, you are my hero!
See comments below:

Am Freitag, den 24.11.2017, 01:35 +0000 schrieb Ken Moffat:
> On Thu, Nov 23, 2017 at 09:53:57PM +0100, Thomas Trepl wrote:
> > Hi all,
> > 
> > there is a problem as my raid device is read-only so
> > /etc/rc.d/init.d/checkfs fails.
> > 
> > The machine is built on the C236 chipset and I have enabled raid5.
> > There are 3 1TB disks combined to an raid-5 array.
> > The partiton type is gpt, grub+EFI installed on /boot. the
> > partition
> > layout is
> > 
> > /dev/md126p1 /boot
> > /dev/md126p2 swap
> > /dev/md126p3 /       (ArchLinux)
> > /dev/md126p4 /       (LFS-1)
> > /dev/md126p5 /       (LFS-2)
> > /dev/md126p6 /home
> > /dev/md126p7 /srv
> > /dev/md126p8 /data
> > 
> 
> I have no experience of RAID5, nor of making partitions within RAID
> devices, and I was initially surprised to see such as high-numbered
> device (126), but I suspect that is an Arch thing.  From what I've
> no written below, maybe DM Raid ?
Thats a raid thing, Arch as well as LFS uses this device names.

> But the usual question to ask when something stops working is: what
> has changed since it was last working ?  I'm assuming you've had
> this working in both Arch and LFS, but I start to think this might
> be a new setup ?
It's a brand new machine, there was nothing before on it. I've
installed Arch to "bootstrap".

> > Arch is booting quite well. I've taken Arch's kernel config, built
> > the
> > kernel for LFS with this config, created an initramfs using BLFS's
> > mkinitramfs script.
> 
> If you are able to get into LFS, e.g. from chroot, I would try
> rebuilding the kernel using 'Y' for any DM options, and for the
> required MD options.  I've only used RAID1 on LFS, and not for the
> /boot or / devices, so no idea if that setup works in current LFS.
Well, yes, that will be an option. The question i try to find an answer
to is: Whats the difference between Arch and LFS as both using same
kernel config, both booting using a initramfs. There must be something
in the LFS setup which makes the device RO which is not the case in
Arch.

> 
> > I found that the mkinitramfs script misses "readlink" and
> > "basename"
> > which are called somewhere within udev. A patch for that see below.
> > The
> > patch eliminates some error mesages in early boot stage, but
> > changed
> > nothing of the ro-issue.
> > 
> > I found systemd stuff in the udev rules dealing with mdraid.
> > Unfortunatly, I'm not used enough to udev rules to say whether this
> > may
> > be something to think about. ArchLinux does use systemd, I'm
> > building
> > stricktly non-systemd systems. Those udev rules are
> > 
> > ./lib/udev/rules.d/63-md-raid-arrays.rules  and
> > ./lib/udev/rules.d/64-md-raid-assembly.rules
> > 
> > Any ideas what could be the reason why devices are read-only?
> > 
> 
> From an Arch forum at https://bbs.archlinux.org/viewtopic.php?id=1370
> 58
> (summarised)
> 
> > mdadm --readwrite /dev/md126 reports no errors, but md126 remain
> > read only
> > 
> > However, after:
> > mdadm --stop /dev/md126
> > sudo mdadm --assemble --scan
> > It worked, and mountable for write
> > 
> > But after reboot it became r/o again
> 
> The only things I really got from that are:
> 
> · you might be using DM raid ?
> 
> · the initcpio needed /sbin/mdmon added to it
This seems to be the answer to the question above. In the BLFS
mkinitramfs script, only mdadm and udevd are copied. I added mdmon to
that list, rebooted and - tadadada - the device is mounted RW :-)
I'm pretty sure to have seen that archforum-thread also, but somehow
the mdmon thing didn't manage to get into my brain. Your explicit
question about mdmon did the trick ;-)

> 
> But maybe the things in that conversation will mean more to you than
> to me.  Beyond that, do you have the same /etc/mdadm.conf in Arch
> and LFS, and can you get any useful output from mdadm or mdmon (or
> dmesg) ?
Unfortunatly there is nothing. I tweaked checkfs in the way that it
will not halt the system to be able to have look to dmesg, but there is
nothing valuable in it for this case.

> ĸen
> -- 
> Truth, in front of her huge walk-in wardrobe, selected black leather
> boots with stiletto heels for such a barefaced truth.
>                                      - Unseen Academicals

Thanks Ken,  its often the small things which makes bigger things work.

I'll prepare a little patch for mkinitramfs and put it here again (or
better in a ticket) for further discussion before i update the book.

--
Thomas

-- 
http://lists.linuxfromscratch.org/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to