LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1222|回复: 3

LVM问题,PV如何删除?

[复制链接]
发表于 2006-6-14 16:41:00 | 显示全部楼层 |阅读模式
[root@test dev]# pvscan
  PV /dev/hdb    VG web          lvm2 [8.00 GB / 8.00 GB free]
  PV /dev/hda2   VG VolGroup00   lvm2 [7.88 GB / 32.00 MB free]
  Total: 2 [15.87 GB] / in use: 2 [15.87 GB] / in no VG: 0 [0   ]
[root@test dev]# lvscan
  ACTIVE            '/dev/VolGroup00/LogVol00' [7.34 GB] inherit
  ACTIVE            '/dev/VolGroup00/LogVol01' [512.00 MB] inherit
[root@test dev]#

[root@test dev]# pvdisplay
  --- Physical volume ---
  PV Name               /dev/hdb
  VG Name               web
  PV Size               8.00 GB / not usable 0   
  Allocatable           yes
  PE Size (KByte)       4096
  Total PE              2047
  Free PE               2047
  Allocated PE          0
  PV UUID               2ujaTo-yjQZ-ZY0I-ELdk-ts0W-VB42-fgKfgC
   
  --- Physical volume ---
  PV Name               /dev/hda2
  VG Name               VolGroup00
  PV Size               7.88 GB / not usable 0   
  Allocatable           yes
  PE Size (KByte)       32768
  Total PE              252
  Free PE               1
  Allocated PE          251
  PV UUID               RlMeUQ-XH5k-oWHn-MChq-MsXM-RtOJ-I96Bwm
   
[root@test dev]#


pvremove /dev/web
pvremove /dev/hdb
pvremove hdb
pvremove web
都试了,就是删不掉PV_web,我是第一天学LVM,谁要是知道告诉我呀,谢谢。

找到办法了。是我没搞懂PV,VG的区别。
用命令[root@test dev]# vgremove /dev/web,就删掉了。OK。
发表于 2006-6-14 23:43:07 | 显示全部楼层
looks like there are only two PVs. hdb and hda2. Where is PV_web? PV is the way LVM manages the low level physical disk. It initializes the disk and writes the metadata to the disk header. LVM uses PE to count how many units are allocatable. VG is built on top of the PV layer. Try
  1. pvremove -ff /dev/hdb /dev/hda2
复制代码
回复 支持 反对

使用道具 举报

发表于 2006-6-15 11:15:27 | 显示全部楼层
应该先删除lv  --〉vg --〉pv吧
有个顺序问题
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-6-15 12:36:44 | 显示全部楼层
是的,谢谢各位。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表