Linux挂载LVM分区的方法

#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
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值