CentOS – remove volume, group and disk
- March 8th, 2017
- Posted in Documentation
- Write comment
CentOS 7
VMware ESXi
I used the following method to remove a disk from a system. Note: In this case the volume group only had one volume on it.
Disk: /dev/sde
Volume Name: /dev/vg_name/lv_name
Volume Group Name: vg_name
Remove all volumes in a group:
# lvremove vg_name
Do you really want to remove active logical volume lv_name? [y/n]: y
Logical volume “lv_name” successfully removed
Remove the group:
# vgremove vg_name
Volume group “vg_name” successfully removed
Remove the volume:
# pvremove -v /dev/sde
Wiping cache of LVM-capable devices
Labels on physical volume “/dev/sde” successfully wiped
I deleted the disk from vSphere, and then rescan for the changes:
# echo “- – -” > /sys/class/scsi_host/host0/scan
Verify that the disk is no longer there:
# fdisk -l /dev/sde
No comments yet.