要先裝 lvm2 套件
用 lvscan 或 lvdisplay 看一下有那些 VolGroup,
再用 vgchange 設為 active, 使 Kernel 看得到,
例如: vgchange VolGroup00 -a y
此步驟很重要, 指令下完才會有 VolGroup device node,
此時用 lvscan 就會看到 ACTIVE
最後就可以 mount 了
mount /dev/VolGroup00/LogVol00 /mnt
範例:
# fdisk -l /dev/sda
Disk /dev/sda: 9105 MB, 9105018880 bytes
255 heads, 63 sectors/track, 1106 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0a36d4a3
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 1106 8779522+ 8e Linux LVM
# lvscan
inactive '/dev/VolGroup00/LogVol00' [7.81 GB] inherit
inactive '/dev/VolGroup00/LogVol01' [512.00 MB] inherit
# lvdisplay
--- Logical volume ---
LV Name /dev/VolGroup00/LogVol00
VG Name VolGroup00
LV UUID IBkdFv-Jlwn-8fyj-3ys3-F9em-zowk-7gnRKr
LV Write Access read/write
LV Status NOT available
LV Size 7.81 GB
Current LE 250
Segments 1
Allocation inherit
Read ahead sectors 0
--- Logical volume ---
LV Name /dev/VolGroup00/LogVol01
VG Name VolGroup00
LV UUID 7V0Wv7-1WkV-H2cR-NPqm-jTQY-tZkV-cbq4JX
LV Write Access read/write
LV Status NOT available
LV Size 512.00 MB
Current LE 16
Segments 1
Allocation inherit
Read ahead sectors 0
# vgchange VolGroup00 -a y
2 logical volume(s) in volume group "VolGroup00" now active
# lvscan
ACTIVE '/dev/VolGroup00/LogVol00' [7.81 GB] inherit
ACTIVE '/dev/VolGroup00/LogVol01' [512.00 MB] inherit
# mount /dev/VolGroup00/LogVol00 /mnt
Leave a comment