Editing
Removing a disk from LVM
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
If the non-root LVM volume, Volume Group, and Physical Volume used for the LV are no longer required on the system, then it could be removed/deleted using following steps. If the LVM volume is containing any required data, then please make sure to take a backup of that data before proceeding with following steps: In this example, we will be deleting “testlv” from the volume group “datavg”. The LV is mounted on the mount point /data01. # df -hP | grep -i data01 /dev/mapper/datavg-testlv 976M 2.6M 907M 1% /data01 # lvs LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert root centos -wi-ao---- 17.47g swap centos -wi-ao---- 2.00g testlv datavg -wi-ao---- 1.00g Delete the entry of the mount point from the /etc/fstab : # cat /etc/fstab ... /dev/mapper/datavg-testlv /data01 ext4 defaults 0 0 ... Unmount the mount point : # umount /data01 Disable lvm : # lvchange -an /dev/datavg/testlv Delete lvm volume : # lvremove /dev/datavg/testlv Disable volume group : # vgchange -an datavg Delete volume group : # vgremove datavg Delete physical Volumes being used for the volume group “datavg” : # pvremove /dev/sdb /dev/sdc (taken mostly from https://www.thegeekdiary.com/centos-rhel-how-to-delete-lvm-volume/)
Summary:
Please note that all contributions to WilliamsNet Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
WilliamsNet Wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Navigation
Commons
Architecture
How-To
Systems
Hardware
SysAdmin
Kubernetes
OpenSearch
Special
Pages to create
All pages
Recent changes
Random page
Help about MediaWiki
Formatting Help
Tools
What links here
Related changes
Special pages
Page information