Назад | Перейти на главную страницу

«Статус LV НЕ доступен» после преобразования root с lvm2 на lvm2 + raid1 (lvconvert --type raid1)

Я только что преобразовал корневую файловую систему lvm2 из линейного lvm2 (один жесткий диск: sda) в lvm2 raid1 (используя lvconvert -m1 --type raid1 /dev/ubuntu/root /dev/sdb5 команда). Но после этого преобразования я не могу загрузить свой ubuntu 12.10 (ядро 3.5.0-17-generic).

Initramfs сообщает, что не может найти корневую fs в / 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!

Вот мой список модулей и 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? Теперь у меня есть полная коллекция модулей из этого ядра, и я могу попробовать любой модуль.

Ты нуждаешься в этом:

modprobe dm_raid

{pv,vg,lv}scan посмотрите на диск и увидите там LV. Но поскольку ядро ​​не может предоставить к ним доступ настроенным образом, они недоступны для доступа.