此内容没有您所选择的语言版本。

B.3. LVM Profiles


An LVM profile is a set of selected customizable configuration settings that can be used to achieve certain characteristics in various environments or uses. Normally, the name of the profile should reflect that environment or use. An LVM profile overrides existing configuration.
There are two groups of LVM profiles that LVM recognizes: command profiles and metadata profiles.
  • A command profile is used to override selected configuration settings at the global LVM command level. The profile is applied at the beginning of LVM command execution and it is used throughout the time of the LVM command execution. You apply a command profile by specifying the --commandprofile ProfileName option when executing an LVM command.
  • A metadata profile is used to override selected configuration settings at the volume group/logical volume level. It is applied independently for each volume group/logical volume that is being processed. As such, each volume group/logical volume can store the profile name used in its metadata so that next time the volume group/logical volume is processed, the profile is applied automatically. If the volume group and any of its logical volumes have different profiles defined, the profile defined for the logical volume is preferred.
    • You can attach a metadata profile to a volume group or logical volume by specifying the --metadataprofile ProfileName option when you create the volume group or logical volume with the vgcreate or lvcreate command.
    • You can attach or detach a metadata profile to an existing volume group or logical volume by specifying the --metadataprofile ProfileName or the --detachprofile option of the lvchange or vgchange command.
    • You can specify the -o vg_profile and -o lv_profile output options of the vgs and lvs commands to display the metadata profile currently attached to a volume group or a logical volume.
The set of options allowed for command profiles and the set of options allowed for metadata profiles are mutually exclusive. The settings that belong to either of these two sets cannot be mixed together and the LVM tools will reject such profiles.
LVM provides a few predefined configuration profiles. The LVM profiles are stored in the /etc/lvm/profile directory by default. This location can be changed by using the profile_dir setting in the /etc/lvm/lvm.conf file. Each profile configuration is stored in ProfileName.profile file in the profile directory. When referencing the profile in an LVM command, the .profile suffix is omitted.
You can create additional profiles with different values. For this purpose, LVM provides the command_profile_template.profile file (for command profiles) and the metadata_profile_template.profile file (for metadata profiles) which contain all settings that are customizable by profiles of each type. You can copy these template profiles and edit them as needed.
Alternatively, you can use the lvmconfig command to generate a new profile for a given section of the profile file for either profile type. The following command creates a new command profile named ProfileName.profile consisting of the settings in section.
lvmconfig --file ProfileName.profile --type profilable-command section
The following command creates a new metadata profile named ProfileName.profile consisting of the settings in section.
lvmconfig --file ProfileName.profile --type profilable-metadata section
If the section is not specified, all profilable settings are reported.
Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

© 2024 Red Hat, Inc.