85
Appendix C. LVM Object Tags
An LVM tag is a word that can be used to group LVM2 objects of the same type together. Tags can
be attached to objects such as physical volumes, volume groups, and logical volumes. Tags can be
attached to hosts in a cluster configuration. Snapshots cannot be tagged.
Tags can be given on the command line in place of PV, VG or LV arguments. Tags should be prefixed
with @ to avoid ambiguity. Each tag is expanded by replacing it with all objects possessing that tag
which are of the type expected by its position on the command line.
LVM tags are strings using [A-Za-z0-9_+.-] of up to 128 characters. They cannot start with a hyphen.
Only objects in a volume group can be tagged. Physical volumes lose their tags if they are removed
from a volume group; this is because tags are stored as part of the volume group metadata and that is
deleted when a physical volume is removed. Snapshots cannot be tagged.
The following command lists all the logical volumes with the
database
tag.
lvs @database
C.1. Adding and Removing Object Tags
To add or delete tags from physical volumes, use the
--addtag
or
--deltag
option of the
pvchange
command.
To add or delete tags from volume groups, use the
--addtag
or
--deltag
option of the
vgchange
or
vgcreate
commands.
To add or delete tags from logical volumes, use the
--addtag
or
--deltag
option of the
lvchange
or
lvcreate
commands.
C.2. Host Tags
In a cluster configuration, you can define host tags in the configuration files. If you set
hosttags = 1
in the
tags
section, a host tag is automatically defined using the machine's hostname. This allow you
to use a common configuration file which can be replicated on all your machines so they hold identical
copies of the file, but the behavior can differ between machines according to the hostname.
For information on the configuration files, see
Appendix B, The LVM Configuration Files
.
For each host tag, an extra configuration file is read if it exists: lvm_
hosttag.
conf. If that file defines
new tags, then further configuration files will be appended to the list of files to read in.
For example, the following entry in the configuration file always defines
tag1
, and defines
tag2
if the
hostname is
host1
.
tags { tag1 { } tag2 { host_list = ["host1"] } }
Содержание 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 ...