LVM管理体系(四)删除逻辑卷(操作步骤)
2014-04-16 01:02
597 查看
一、离线逻辑卷
[root@instructor Desktop]# umount /dev/testvg/testlv
二、查看逻辑卷的状态并删除
[root@instructor Desktop]# lvdisplay /dev/testvg/testlv
--- Logical volume ---
LV Path /dev/testvg/testlv
LV Name testlv
VG Name testvg
LV UUID YT3Ccy-eh5I-23fv-g1K6-YWXY-PJrs-rHcNXv
LV Write Access read/write
LV Creation host, time instructor.example.com, 2014-04-15 23:15:37 +0800
LV Status available
# open 0
LV Size 40.00 GiB
Current LE 5120
Segments 3
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:2
[root@instructor Desktop]# lvremove /dev/testvg/testlv
Do you really want to remove active logical volume testlv? [y/n]: y
Logical volume "testlv" successfully removed
三、查看卷组的状态并删除
[root@instructor Desktop]# vgdisplay /dev/testvg
--- Volume group ---
VG Name testvg
System ID
Format lvm2
Metadata Areas 3
Metadata Sequence No 18
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 0
Open LV 0
Max PV 0
Cur PV 3
Act PV 3
VG Size 59.98 GiB
PE Size 8.00 MiB
Total PE 7677
Alloc PE / Size 0 / 0
Free PE / Size 7677 / 59.98 GiB
VG UUID ARmaCh-vFbx-dqxr-asWG-p11h-1Tzc-dv1OEi
[root@instructor Desktop]# vgremove /dev/testvg
Volume group "testvg" successfully removed
四、查看物理卷的状态并一一删除
[root@instructor Desktop]# pvdisplay /dev/sdb1 /dev/sdc1 /dev/sdd1
"/dev/sdb1" is a new physical volume of "20.00 GiB"
--- NEW Physical volume ---
PV Name /dev/sdb1
VG Name
PV Size 20.00 GiB
Allocatable NO
PE Size 0
Total PE 0
Free PE 0
Allocated PE 0
PV UUID OIO7pd-B6Ib-YGcr-w8sh-GYsA-zXZG-CsrD3O
"/dev/sdc1" is a new physical volume of "20.00 GiB"
--- NEW Physical volume ---
PV Name /dev/sdc1
VG Name
PV Size 20.00 GiB
Allocatable NO
PE Size 0
Total PE 0
Free PE 0
Allocated PE 0
PV UUID WXCfeV-8KYH-ammN-Gine-yjOQ-lbXK-ulEos1
"/dev/sdd1" is a new physical volume of "20.00 GiB"
--- NEW Physical volume ---
PV Name /dev/sdd1
VG Name
PV Size 20.00 GiB
Allocatable NO
PE Size 0
Total PE 0
Free PE 0
Allocated PE 0
PV UUID bdeEPp-L9Az-QVMg-f1O6-gaK0-vRcw-RvL1cF
[root@instructor Desktop]# pvremove /dev/sdb1 /dev/sdc1 /dev/sdd1
Labels on physical volume "/dev/sdb1" successfully wiped
Labels on physical volume "/dev/sdc1" successfully wiped
Labels on physical volume "/dev/sdd1" successfully wiped
[root@instructor Desktop]# pvdisplay
--- Physical volume ---
PV Name /dev/sda3
VG Name GLSguest
PV Size 19.53 GiB / not usable 32.00 MiB
Allocatable yes
PE Size 32.00 MiB
Total PE 624
Free PE 624
Allocated PE 0
PV UUID qK9igJ-bMKg-F2qg-qBsf-CJG9-gz9c-I8Rlcb
--- Physical volume ---
PV Name /dev/sda2
VG Name GLSvg
PV Size 31.25 GiB / not usable 32.00 MiB
Allocatable yes
PE Size 32.00 MiB
Total PE 999
Free PE 131
Allocated PE 868
PV UUID YOBheN-WgGO-wKHY-7Gdb-gdAz-aBui-R1IAHx
[root@instructor Desktop]#
[root@instructor Desktop]# umount /dev/testvg/testlv
二、查看逻辑卷的状态并删除
[root@instructor Desktop]# lvdisplay /dev/testvg/testlv
--- Logical volume ---
LV Path /dev/testvg/testlv
LV Name testlv
VG Name testvg
LV UUID YT3Ccy-eh5I-23fv-g1K6-YWXY-PJrs-rHcNXv
LV Write Access read/write
LV Creation host, time instructor.example.com, 2014-04-15 23:15:37 +0800
LV Status available
# open 0
LV Size 40.00 GiB
Current LE 5120
Segments 3
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:2
[root@instructor Desktop]# lvremove /dev/testvg/testlv
Do you really want to remove active logical volume testlv? [y/n]: y
Logical volume "testlv" successfully removed
三、查看卷组的状态并删除
[root@instructor Desktop]# vgdisplay /dev/testvg
--- Volume group ---
VG Name testvg
System ID
Format lvm2
Metadata Areas 3
Metadata Sequence No 18
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 0
Open LV 0
Max PV 0
Cur PV 3
Act PV 3
VG Size 59.98 GiB
PE Size 8.00 MiB
Total PE 7677
Alloc PE / Size 0 / 0
Free PE / Size 7677 / 59.98 GiB
VG UUID ARmaCh-vFbx-dqxr-asWG-p11h-1Tzc-dv1OEi
[root@instructor Desktop]# vgremove /dev/testvg
Volume group "testvg" successfully removed
四、查看物理卷的状态并一一删除
[root@instructor Desktop]# pvdisplay /dev/sdb1 /dev/sdc1 /dev/sdd1
"/dev/sdb1" is a new physical volume of "20.00 GiB"
--- NEW Physical volume ---
PV Name /dev/sdb1
VG Name
PV Size 20.00 GiB
Allocatable NO
PE Size 0
Total PE 0
Free PE 0
Allocated PE 0
PV UUID OIO7pd-B6Ib-YGcr-w8sh-GYsA-zXZG-CsrD3O
"/dev/sdc1" is a new physical volume of "20.00 GiB"
--- NEW Physical volume ---
PV Name /dev/sdc1
VG Name
PV Size 20.00 GiB
Allocatable NO
PE Size 0
Total PE 0
Free PE 0
Allocated PE 0
PV UUID WXCfeV-8KYH-ammN-Gine-yjOQ-lbXK-ulEos1
"/dev/sdd1" is a new physical volume of "20.00 GiB"
--- NEW Physical volume ---
PV Name /dev/sdd1
VG Name
PV Size 20.00 GiB
Allocatable NO
PE Size 0
Total PE 0
Free PE 0
Allocated PE 0
PV UUID bdeEPp-L9Az-QVMg-f1O6-gaK0-vRcw-RvL1cF
[root@instructor Desktop]# pvremove /dev/sdb1 /dev/sdc1 /dev/sdd1
Labels on physical volume "/dev/sdb1" successfully wiped
Labels on physical volume "/dev/sdc1" successfully wiped
Labels on physical volume "/dev/sdd1" successfully wiped
[root@instructor Desktop]# pvdisplay
--- Physical volume ---
PV Name /dev/sda3
VG Name GLSguest
PV Size 19.53 GiB / not usable 32.00 MiB
Allocatable yes
PE Size 32.00 MiB
Total PE 624
Free PE 624
Allocated PE 0
PV UUID qK9igJ-bMKg-F2qg-qBsf-CJG9-gz9c-I8Rlcb
--- Physical volume ---
PV Name /dev/sda2
VG Name GLSvg
PV Size 31.25 GiB / not usable 32.00 MiB
Allocatable yes
PE Size 32.00 MiB
Total PE 999
Free PE 131
Allocated PE 868
PV UUID YOBheN-WgGO-wKHY-7Gdb-gdAz-aBui-R1IAHx
[root@instructor Desktop]#
相关文章推荐
- LVM管理体系(二)通过扩展LV扩展逻辑卷(操作步骤)
- LVM管理体系(三)通过扩展VG扩展逻辑卷(操作步骤)
- LVM管理体系(四)缩小逻辑卷(操作步骤)
- LVM管理体系(一)创建含有两个物理分区的逻辑卷(操作步骤)
- linux服务器 磁盘和文件系统管理(二) LVM逻辑卷管理的基本操作
- GNU/Linux下LVM配置管理以及快照卷、物理卷、卷组、逻辑卷的创建和删除
- 基于CentOS 6 系统创建逻辑卷LVM,执行扩容,缩减,删除等操作 推荐
- LVM逻辑卷的添加、拉伸、缩小、删除、move操作
- linux服务器 磁盘和文件系统管理(二) LVM逻辑卷管理的基本操作
- 逻辑卷增加,扩容,缩小,删除操作步骤
- GNU/Linux下LVM配置管理以及快照卷、物理卷、卷组、逻辑卷的创建和删除
- LVM (逻辑卷)的增加、扩容、缩小、删除操作
- LVM逻辑卷管理测试——逻辑卷扩展、收缩、快照及删除
- Linux中逻辑卷(LVM)管理基本操作
- centos6下的lvm逻辑卷的管理
- RHEL6基础二十八之LVM逻辑卷管理(Logical Volume Manager) 推荐
- Linux LVM逻辑卷管理
- linux基础(22)--LVM逻辑卷管理--RJEL6.5
- LVM详解;Linux逻辑卷管理