Preventing Allocation on a Physical Volume21The following command shows all physical devices found:# pvscanPV /dev/sdb2 VG vg0 lvm2 [964.00 MB / 0 free]PV /dev/sdc1 VG vg0 lvm2 [964.00 MB / 428.00 MB free]PV /dev/sdc2 lvm2 [964.84 MB]Total: 3 [2.83 GB] / in use: 2 [1.88 GB] / in no VG: 1 [964.84 MB]You can define a filter in the lvm.conf so that this command will avoid scanning specific physicalvolumes. For information on using filters to control which devices are scanned, see Section 4.6,“Controlling LVM Device Scans with Filters”.4.2.3. Preventing Allocation on a Physical VolumeYou can prevent allocation of physical extents on the free space of one or more physical volumes withthe pvchange command. This may be necessary if there are disk errors, or if you will be removing thephysical volume.The following command disallows the allocation of physical extents on /dev/sdk1.pvchange -x n /dev/sdk1You can also use the -xy arguments of the pvchange command to allow allocation where it hadpreviously been disallowed.4.2.4. Resizing a Physical VolumeIf you need to change the size of an underlying block device for any reason, use the pvresizecommand to update LVM with the new size. You can execute this command while LVM is using thephysical volume.4.2.5. Removing Physical VolumesIf a device is no longer required for use by LVM, you can remove the LVM label with the pvremovecommand. Executing the pvremove command zeroes the LVM metadata on an empty physicalvolume.If the physical volume you want to remove is currently part of a volume group, you must remove it fromthe volume group with the vgreduce command, as described in Section 4.3.5, “Removing PhysicalVolumes from a Volume Group”.# pvremove /dev/ram15Labels on physical volume "/dev/ram15" successfully wiped4.3. Volume Group AdministrationThis section describes the commands that perform the various aspects of volume groupadministration.