Lvremove: Difference between revisions
Jump to navigation
Jump to search
(Created page with "=Internal= =Overview= Gather statistics on the free space before removing, and also on the size of the logical volume to be removed: <pre> vgs </pre> <pre> lvs </pre>...") |
No edit summary |
||
Line 1: | Line 1: | ||
=Internal= | =Internal= | ||
* [[Linux_Logical_Volume_Management_Operations#Logical_Volume_Management_Operations|Logical Volume Operations]] | |||
=Overview= | =Overview= | ||
Gather statistics on the free space before removing, and also on the size of the logical volume to be removed: | Gather statistics on the free space before removing, and also on the size of the logical volume to be removed: |
Revision as of 15:25, 23 May 2017
Internal
Overview
Gather statistics on the free space before removing, and also on the size of the logical volume to be removed:
vgs
lvs
Unmount the volume if necessary (or shutdown the service that is using it, as it is the case with Docker):
umount /dev/VolGroup00/MyLV1
Remove the logical volume with lvremove.
The command has a "dry run mode" (-t):
lvremove /dev/<VG_name>/<LV_name>
lvremove -t /dev/<VG_name>/<LV_name>
Example:
[root@rhel-test lvm]# lvremove -t /dev/rhel_rhel-test/docker-pool TEST MODE: Metadata will NOT be updated and volumes will not be (de)activated. Do you really want to remove active logical volume docker-pool? [y/n]: y Logical volume "docker-pool" successfully removed
This command actually removes it:
lvremove [-v] /dev/VolGroup00/MyLV1