I just converted by lvm2 root filesystem from linear lvm2 (single HDD:sda) to lvm2 raid1 (using lvconvert -m1 --type raid1 /dev/ubuntu/root /dev/sdb5 command). But after this conversion I can't boot my ubuntu 12.10 (kernel 3.5.0-17-generic).

Initramfs says that it can't find root fs in /dev/mapper:

Begin: Running /scripts/init-premount ... done.
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
... (kernel messages)
Gave up waiting for root device.  Common problems:
 - Boot args (cat /proc/cmdline)
   - Check rootdelay= (did the system wait long enough?)
   - Check root= (did the system wait for the right device?)
 - Missing modules (cat /proc/modules; ls /dev)
ALERT!  /dev/mapper/ubuntu-root does not exist.  Dropping to a shell!

There is my list of modules and cmdline:

(initramfs) cat /proc/modules
(initramfs) cat /proc/cmdline
BOOT_IMAGE=/vmlinux-3.5.0-17-generic root=/dev/mapper/ubuntu-root ro
(initramfs) ls /dev/mapper
control     ubuntu-swap_1

There is output from lvm utility, which says that root LV is inactive / NOT available:

lvm> pvscan
  PV /dev/sda5    VG ubuntu   lvm2 [ 13.76 GiB / 408.00 MiB free]
  PV /dev/sdb5    VG ubuntu   lvm2 [ 13.76 GiB / 508.00 MiB free]
lvm> vgscan
  Reading all physical volumes. This may take a while...
  Found volume group "ubuntu" using metadata type lvm2
lvm> lvscan
  inactive        '/dev/ubuntu/root' [13.26 GiB] inherit
  ACTIVE          '/dev/ubuntu/swap_1' [100.00 MiB] inherit

lvm> lvdisplay ubuntu
  --- Logical volume ---
  LV Path                /dev/ubuntu/root
  LV Name                root
  VG Name                ubuntu
  LV UUID                xxxxxxxxxxxxxxx
  LV Write Access        read/write
  LV Creation host, time ubuntu, 2013-05-07
  LV Status              NOT available          <<<<< !!!!
  LV Size                13.26 GB
  Current LE             3394
  Mirrored volumes       2
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto

And lvchange -ay ubuntu fails from initrd in my case:

lvm>  lvchange -ay ubuntu
  /sbin/modprobe failed: 1
  Can't process LV root: raid1 target support missing from kernel?

Which module is missing in my initrd? Now I have full collection of modules from this kernel and can try any module.

  • did you recreate initrd after the conversion? – ptman May 7 '13 at 15:30
  • ptman, no, I didn't. Only waited for full resync. Do you think, that update-initramfs -u will include dm-raid into initrd? – osgx May 7 '13 at 15:58
  • update-initramfs didn't include dm-raid into image; I needed to manually add this module to /etc/initramfs-tools/modules file. – osgx May 8 '13 at 8:28

You need this:

modprobe dm_raid

{pv,vg,lv}scan have a look at the disk and see the LVs there. But as the kernel cannot provide access to them in the configured way they are not available for access.

  • insmod dm_raid helped but I still needed to do lvchange -ay ubuntu to boot. – osgx May 7 '13 at 16:25
  • @osgx Sure. The kernel module enables you to make the lvchange call. That was your problem, wasn't it? It doesn't replace the call. If it did, all VGs would always be (or at least start) active. – Hauke Laging May 7 '13 at 16:29
  • Hauke, my first problem was that I can't boot after lvconvert. Part of it - is that i have no dm-raid module in initramfs. – osgx May 7 '13 at 16:31
  • @osgx I meant "the problem you asked for" as you had already tracked the solution of your bigger problem down to a missing kernel module. – Hauke Laging May 7 '13 at 16:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.