关闭

Linux挂载LVM分区的方法

标签: linuxext
1687人阅读 评论(0) 收藏 举报
分类:

#fdisk -l
[root@localhost /]# fdisk -l
Disk /dev/sda: 36.7 GB, 36778545152 bytes
255 heads, 63 sectors/track, 4471 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot      Start         End      Blocks   Id System
/dev/sda1   *           1          13      104391   83 Linux
/dev/sda2              14        2463    19679625   83 Linux
/dev/sda3            2464        3949    11936295   83 Linux
/dev/sda4            3950        4471     4192965    5 Extended
/dev/sda5            3950        4471     4192933+ 82 Linux swap / Solaris
Disk /dev/sdb: 73.4 GB, 73407868928 bytes
255 heads, 63 sectors/track, 8924 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot      Start         End      Blocks   Id System
/dev/sdb1   *           1        8924    71681998+ 8e Linux LVM
Disk /dev/sdc: 36.7 GB, 36703934464 bytes
255 heads, 63 sectors/track, 4462 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot      Start         End      Blocks   Id System
/dev/sdc1   *           1          13      104391   83 Linux
/dev/sdc2              14        4462    35736592+ 8e Linux LVM
[root@localhost /]# pvs
PV         VG         Fmt Attr PSize PFree
/dev/sdb1             lvm2 --   68.36G 68.36G
/dev/sdc2 VolGroup00 lvm2 a-   34.06G 32.00M

sdc2就是我要挂接的
[root@localhost /]# vgscan
Reading all physical volumes. This may take a while...
Found volume group "VolGroup00" using metadata type lvm2

[root@localhost /]# lvscan
inactive            '/dev/VolGroup00/LogVol00' [32.09 GB] inherit
inactive           '/dev/VolGroup00/LogVol01' [1.94 GB] inherit
可以看到新修改的VolGroup00是inactive状态

[root@localhost /]# vgchange -a y
2 logical volume(s) in volume group "VolGroup00" now active
[root@localhost /]# lvscan
ACTIVE            '/dev/VolGroup00/LogVol00' [32.09 GB] inherit
ACTIVE            '/dev/VolGroup00/LogVol01' [1.94 GB] inherit
好了,现在可以挂载了

[root@localhost /]# mount -t ext3 /dev/VolGroup00/LogVol00 /d1

在创建LV时出现的错误
/proc/misc: No entry for device-mapper found Is device-mapper driver missing from kernel?Failure to communicate with kernel device-mapper driver.
解决:modprobe dm-mod


0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:721925次
    • 积分:10849
    • 等级:
    • 排名:第1487名
    • 原创:480篇
    • 转载:10篇
    • 译文:0篇
    • 评论:28条
    文章分类
    最新评论