Preventing Allocation on a Physical Volume
19
The following command shows all physical devices found:
#
pvscan
PV /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 physical
volumes. 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 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
Section 4.3.5, “Removing Physical
Volumes from a Volume Group”
.
#
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.
Содержание CLUSTER SUITE 4.7 - CLUSTER LVM ADMINISTRATORS
Страница 1: ...Red Hat Cluster Suite 4 7 Cluster Logical Volume Manager LVM Administrator s Guide ...
Страница 6: ...vi ...
Страница 12: ...xii ...
Страница 24: ...12 ...
Страница 62: ...50 ...
Страница 72: ...60 ...
Страница 82: ...70 ...
Страница 84: ...72 ...
Страница 86: ...74 ...
Страница 96: ...84 ...
Страница 103: ...91 Appendix E Revision History Revision History Revision 1 0 ...
Страница 104: ...92 ...
Страница 108: ...96 ...