Preventing Allocation On A Physical Volume; Resizing A Physical Volume; Removing Physical Volumes; Volume Group Administration - Red Hat ENTERPRISE LINUX 5 - LOGICAL VOLUME MANAGER ADMINISTRATION Manual

Hide thumbs Also See for ENTERPRISE LINUX 5 - LOGICAL VOLUME MANAGER ADMINISTRATION:
Table of Contents

Advertisement

The following command shows all physical devices found:
# pvscan
PV /dev/sdb2
VG vg0
PV /dev/sdc1
VG vg0
PV /dev/sdc2
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 physical
volumes. For information on using filters to control which devices are scanned, see
"Controlling LVM Device Scans with

4.2.3. Preventing Allocation on a Physical Volume

You can prevent allocation of physical extents on the free space of one or more physical volumes with
the pvchange command. This may be necessary if there are disk errors, or if you will be removing the
physical volume.
The following command disallows the allocation of physical extents on /dev/sdk1.
pvchange -x n /dev/sdk1
You can also use the -xy arguments of the pvchange command to allow allocation where it had
previously been disallowed.

4.2.4. Resizing a Physical Volume

If you need to change the size of an underlying block device for any reason, use the pvresize
command to update LVM with the new size. You can execute this command while LVM is using the
physical volume.

4.2.5. Removing Physical Volumes

If a device is no longer required for use by LVM, you can remove the LVM label with the pvremove
command. Executing the pvremove command zeroes the LVM metadata on an empty physical
volume.
If the physical volume you want to remove is currently part of a volume group, you must remove it from
the volume group with the vgreduce command, as described in
Volumes from a Volume
# pvremove /dev/ram15
Labels on physical volume "/dev/ram15" successfully wiped

4.3. Volume Group Administration

This section describes the commands that perform the various aspects of volume group
administration.
lvm2 [964.00 MB / 0
lvm2 [964.00 MB / 428.00 MB free]
lvm2 [964.84 MB]
Filters".
Group".
Preventing Allocation on a Physical Volume
free]
Section 4.3.6, "Removing Physical
Section 4.6,
23

Advertisement

Table of Contents
loading

Table of Contents