我這裡有一個 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
這將使它們全部恢復活動狀態。