Online Data Relocation
37
You can control which devices LVM scans by setting up filters in the
lvm.conf
configuration file. The
filters consist of a series of simple regular expressions that get applied to the device names in the
/
dev
directory to decide whether to accept or reject each block device found.
The following examples show the use of filters to control which devices LVM scans. Note that some of
these examples do not necessarily represent best practice, as the regular expressions are matched
freely against the complete pathname. For example,
a/loop/
is equivalent to
a/.*loop.*/
and
would match
/dev/solooperation/lvol1
.
The following filter adds all discovered devices, which is the default behavior as there is no filter
configured in the configuration file:
filter = [ "a/.*/" ]
The following filter removes the cdrom device in order to avoid delays if the drive contains no media:
filter = [ "r|/dev/cdrom|" ]
The following filter adds all loop and removes all other block devices:
filter = [ "a/loop.*/", "r/.*/" ]
The following filter adds all loop and IDE and removes all other block devices:
filter =[ "a|loop.*|", "a|/dev/hd.*|", "r|.*|" ]
The following filter adds just partition 8 on the first IDE drive and removes all other block devices:
filter = [ "a|^/dev/hda8$|", "r/.*/" ]
For more information on the
lvm.conf
file, see
Appendix B, The LVM Configuration Files
and the
lvm.conf
(5) man page.
4.7. Online Data Relocation
You can move data while the system is in use with the
pvmove
command.
The
pvmove
command breaks up the data to be moved into sections and creates a temporary mirror
to move each section. For more information on the operation of the
pvmove
command, see the
pvmove
(8) man page.
Because the
pvmove
command uses mirroring, it is not cluster-aware and needs exclusive access
to a volume. For information on activating logical volumes on individual nodes in a cluster, see
Section 4.8, “Activating Logical Volumes on Individual Nodes in a Cluster”
.
The following command moves all allocated space off the physical volume
/dev/sdc1
to other free
physical volumes in the volume group:
Содержание 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 ...