Pvremove

From NovaOrdis Knowledge Base
Revision as of 13:58, 23 May 2017 by Ovidiu (talk | contribs)
Jump to navigation Jump to search

Internal

Overview

Removes a physical volume by removing all LVM labels.

The association between volume groups and physical volumes can be obtained with with pvs or pvscan.

pvremove <physical-volume-path>

If the physical volume is used by a volume group, the association must be deleted with vgreduce, or --force should be used.

Example:

pvremove --force /dev/sdb1
  PV /dev/sdb1 is used by VG docker_vg so please use vgreduce first.
  (If you are certain you need pvremove, then confirm by using --force twice.)

pvremove --force  --force /dev/sdb1
  WARNING: PV /dev/sdb1 is used by VG docker_vg
Really WIPE LABELS from physical volume "/dev/sdb1" of volume group "docker_vg" [y/n]? y
  WARNING: Wiping physical volume label from /dev/sdb1 of volume group "docker_vg"
  Labels on physical volume "/dev/sdb1" successfully wiped.