AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 505685
Accepted
osgx
osgx
Asked: 2013-05-08 07:26:36 +0800 CST2013-05-08 07:26:36 +0800 CST 2013-05-08 07:26:36 +0800 CST

将 root 从 lvm2 转换为 lvm2+raid1 (lvconvert --type raid1) 后出现“LV 状态不可用”

  • 772

我刚刚通过 lvm2 根文件系统从线性 lvm2(单个硬盘:sda)转换为 lvm2 raid1(使用lvconvert -m1 --type raid1 /dev/ubuntu/root /dev/sdb5命令)。但是在这次转换之后我无法启动我的 ubuntu 12.10 (kernel 3.5.0-17-generic)。

Initramfs 说它在 /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 中缺少哪个模块?现在我有了这个内核的完整模块集合,可以尝试任何模块。

raid
  • 1 1 个回答
  • 1634 Views

1 个回答

  • Voted
  1. Best Answer
    Hauke Laging
    2013-05-08T07:33:27+08:002013-05-08T07:33:27+08:00

    你需要这个:

    modprobe dm_raid
    

    {pv,vg,lv}scan查看磁盘并查看那里的 LV。但是由于内核无法以配置的方式提供对它们的访问,因此无法访问它们。

    • 1

相关问题

  • Windows 文件服务器性能调优

  • SSD TRIM 的硬件 RAID 控制器支持

  • 了解磁盘队列长度

  • 使用混合磁盘突袭 0?

  • Windows Server 2008 Hyper-V 虚拟化服务器的最佳 RAID 配置?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve