从lvm2转换为lvm2 + raid1(lvconvert – type raid1)之后的“LV状态不可用”

我刚从线性lvm2(单个HDD:sda)转换为lvm2根文件系统到lvm2 raid1(使用lvconvert -m1 --type raid1 /dev/ubuntu/root /dev/sdb5命令)。 但在这个转换后,我无法启动我的Ubuntu 12.10(内核3.5.0-17 – 通用)。

initramfs说它在/ dev / mapper中找不到root fs:

 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! 

有我的模块和cmdline列表:

 (initramfs) cat /proc/modules hid_generic usbhid hid e1000 raid10 raid456 async_pq async_xor xor async_memcpy async_raid6_recov raid6_pq async_tx raid1 raid0 multipath linear (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 

有从lvm实用程序的输出,它说,根LV是不活动/不可用:

 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 

lvchange -ay ubuntu从我的情况initrd失败:

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

initrd中缺less哪个模块? 现在我有这个内核的完整模块集合,可以尝试任何模块。

你需要这个:

 modprobe dm_raid 

{pv,vg,lv}scan看看磁盘,并在那里看到LV。 但是由于内核不能以configuration的方式提供对它们的访问,所以它们不可用于访问。