我这里有一个 160GB 硬盘,其中有一个 LVM2 分区,其中包含两个我要挂载的 EXT3 分区。
但是,当我尝试在 LVM2 中挂载这两个分区中的任何一个时,出现错误:
mount: wrong fs type, bad option, bad superblock on /dev/loop0,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
另外,当我运行 fdisk 时,它显示两个分区不包含“有效的分区表”
Disk /dev/sdd: 160.0 GB, 16004188696 bytes
255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0002d815
Device Boot Start End Blocks Id System
/dev/sdd1 * 63 305234 152586 83 Linux
/dev/sdd2 305235 4498199 2096482+ 82 Linux swap / Solaris
/dev/sdd3 4498200 312576704 154039252+ 8e Linux LVM
Disk /dev/mapper/VolGroup00-lv_root: 21.5 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylindars, total 41943040
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/VolGroup00-lv_root doesn't contain a valid partition table
Disk /dev/mapper/VolGroup00-lv_usr2: 136.2 GB, 136197439488 bytes
255 heads, 63 sectors/track, 16558 cylindars, total 266010624 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/VolGroup00-lv_usr2 doesn't contain a valid partition table
以下是lvdisplay的内容:
--- Logical volume ---
LV Name /dev/VolGroup00/lv_root
VG Name VolGroup00
LV UUID jOeBez-2QxJ-Rwth-ufsK-kohE-dHrW-XwDeEi
LV Write Access read/write
LV Status available
# open 0
LV Size 20.00 GiB
Current LE 640
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 252:0
--- Logical volume ---
LV Name /dev/VolGroup00/lv_usr2
VG Name VolGroup00
LV UUID YvbvFJ-yq2t-gSoV-6CqL-Imby-qx6E-uNu3Iz
LV Write Access read/write
LV Status available
# open 0
LV Size 126.84 GiB
Current LE 4059
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 252:1
你们有什么建议吗?我确信它们是 ext3 分区..
答案1
根据我的经验,在处理 ext2/ext3 格式的逻辑卷时,您不需要提供要挂载的文件系统类型。
鉴于您的输出,lvdisplay
您应该安装 2 个逻辑卷之一,如下所示:
$ mount /dev/VolGroup00/lv_root /mnt
-or-
$ mount /dev/VolGroup00/lv_usr2 /mnt
如果其中任何一个出现问题,您可以使用该命令lvscan
来确保它们处于活动状态。
例子
$ lvscan
ACTIVE '/dev/VolGroup00/LogVol00' [228.53 GB] inherit
ACTIVE '/dev/VolGroup00/LogVol01' [1.94 GB] inherit
inactive '/dev/kodak_vg/lvm0' [149.00 GB] inherit
ACTIVE '/dev/lvm-raid2/lvm0' [2.73 TB] inherit
如果它未激活,您可以使用 进行设置vgchange
。
例子
$ vgchange -ay
2 logical volume(s) in volume group "VolGroup00" now active
1 logical volume(s) in volume group "kodak_vg" now active
1 logical volume(s) in volume group "lvm-raid2" now active
这将使它们全部恢复活动状态。