Lvremove: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 12: | Line 12: | ||
<pre> | <pre> | ||
umount /dev/ | umount /dev/<volume-group-name>/<logical-volume-name> | ||
</pre> | </pre> | ||
Remove the logical volume | <pre> | ||
umount /dev/docker_vg/docker-pool | |||
</pre> | |||
Then Remove the logical volume: | |||
<pre> | |||
lvremove /dev/<volume-group-name>/<logical-volume-name> | |||
</pre> | |||
<pre> | |||
lvremove /dev/docker_vg/docker-pool | |||
</pre> | |||
The command has a "dry run mode" (-t): | The command has a "dry run mode" (-t): |
Revision as of 18:01, 23 May 2017
Internal
Overview
Removes a logical volume from a volume group.
Gather statistics on the free space before removing, and also on the size of the logical volume to be removed with vgs and lvs.
Unmount the volume if necessary (or shutdown the service that is using it, as it is the case with Docker):
umount /dev/<volume-group-name>/<logical-volume-name>
umount /dev/docker_vg/docker-pool
Then Remove the logical volume:
lvremove /dev/<volume-group-name>/<logical-volume-name>
lvremove /dev/docker_vg/docker-pool
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