# How to pre-mount /usr when it's on a RAID?

## ExecutorElassus

So, I get this news item today:

```
udev-181 is being unmasked on 2012-03-19.

This news item is to inform you that once you upgrade to a version of udev >=181, if you have /usr on a separate partition, you must boot your system with an initramfs which pre-mounts /usr.
```

(etc. etc.)

Okay? The included instructions give genkernel and dracut as tools to do this. But I don't use either: I've always used 'make menuconfig' to do manual editing, and 'make oldconfig' for updates on existing .config files (which is most of the time). 

So, under the kernel menuconfig, what are the options that have to be enabled? I suspect a lot of people will want to be knowing that, so maybe it could be included in the news item? Incidentally, my /usr is on a RAID5 array using mdadm and lvm2, which probably complicates things.

Thanks for the help.

EE

----------

## Hu

As a short term fix, you can mask the affected versions of sys-fs/udev until someone fixes them.  If you need to use the affected version anyway, you may find Basic initramfs used to check and mount /usr useful.  I have not tried it, but I glanced through it and it looked like a reasonably sane workaround.

For complex cases, you need to have an initramfs that can assemble all the prerequisites and mount /usr.  With some care, you could arrange for it to use tools installed in / so that you do not need to copy everything into the initramfs.  If you need specific guidance, please describe your layout in more detail.  I expect you have a drive containing a partition, which contains an MD member.  Within the virtual device assembled via MD, you have an LVM physical volume.  Within the LVM, you have a logical volume on which the filesystem for /usr was created.  Is this correct?

----------

## gorkypl

There is no 'official' guide for now, see the discussion here:

https://forums.gentoo.org/viewtopic-t-914852-postdays-0-postorder-asc-start-0.html

And yes, a migration guide for users of LVM over RAID would be very, very appropriate (this is a very common configuration I think, we even have a separate short installation guide for such case).

----------

## greyspoke

I have a separate logical volume on top of raids as my /usr and had it assembled and mounted in an initramfs.

But it is quite a faff, requiring a big fat initramfs (specially if you want to run fsck on it).  I note your comments about using tools from / Hu.  But if you are going to do that, why not wait until the real init process?  

Well that's what I thought anyhow, so I now use an init script which I put in the sysinit runlevel to happen before the udev init script.  That activates the logical volumes, then fscks and mounts them.  It is linked to lines in /etc/fstab by setting the mount option "comment=early" (the comment option is not well documented, but it appears to work in that I don't get an "invalid option" error).  This is easier to change than with an initramfs.

----------

