Flashnux

GNU/Linux man pages

Livre :
Expressions régulières,
Syntaxe et mise en oeuvre :

ISBN : 978-2-7460-9712-4
EAN : 9782746097124
(Editions ENI)

GNU/Linux

CentOS 5.5

lvm.conf(5)


LVM.CONF

LVM.CONF

NAME
SYNOPSIS
DESCRIPTION
SYNTAX
SECTIONS

NAME

lvm.conf − Configuration file for LVM2

SYNOPSIS

/etc/lvm/lvm.conf

DESCRIPTION

lvm.conf is loaded during the initialisation phase of lvm (8). This file can in turn lead to other files being loaded - settings read in later override earlier settings. File timestamps are checked between commands and if any have changed, all the files are reloaded.

Use lvm dumpconfig to check what settings are in use.

SYNTAX

This section describes the configuration file syntax.

Whitespace is not significant unless it is within quotes. This provides a wide choice of acceptable indentation styles. Comments begin with # and continue to the end of the line. They are treated as whitespace.

Here is an informal grammar:
file = value*

A configuration file consists of a set of values.

value = section | assignment

A value can either be a new section, or an assignment.

section = identifier ’{’ value* ’}’

A section is groups associated values together.
It is denoted by a name and delimited by curly brackets.

e.g.

backup {

...

}

assignment = identifier ’=’ (array | type)

An assignment associates a type with an identifier.

e.g.

max_archives = 42

array = ’[’ (type ’,’)* type ’]’ | ’[’ ’]’

Inhomogeneous arrays are supported.
Elements must be separated by commas.
An empty array is acceptable.

type = integer | float | string

integer = [0-9]*
float = [0-9]*.[0-9]*
string = ’"’ .* ’"’

Strings must be enclosed in double quotes.

SECTIONS

The sections that may be present in the file are:
devices
— Device settings

dir — Directory in which to create volume group device nodes. Defaults to "/dev". Commands also accept this as a prefix on volume group names.

scan — List of directories to scan recursively for LVM physical volumes. Devices in directories outside this hierarchy will be ignored. Defaults to "/dev".

preferred_names — List of patterns compared in turn against all the pathnames referencing the same device in in the scanned directories. The pathname that matches the earliest pattern in the list is the one used in any output. As an example, if device-mapper multipathing is used, the following will select multipath device names:
devices { preferred_names = [ "^/dev/mapper/mpath" ] }

filter — List of patterns to apply to devices found by a scan. Patterns are regular expressions delimited by any character and preceded by a (for accept) or r (for reject). The list is traversed in order, and the first regex that matches determines if the device will be accepted or rejected (ignored). Devices that don’t match any patterns are accepted. If you want to reject patterns that don’t match, end the list with "r/.*/". If there are several names for the same device (e.g. symbolic links in /dev), if any name matches any a pattern, the device is accepted; otherwise if any name matches any r pattern it is rejected; otherwise it is accepted. As an example, to ignore /dev/cdrom you could use:
devices { filter=["r|cdrom|"] }

cache_dir — Persistent filter cache file directory. Defaults to "/etc/lvm/cache".

write_cache_state — Set to 0 to disable the writing out of the persistent filter cache file when lvm exits. Defaults to 1.

types — List of pairs of additional acceptable block device types found in /proc/devices together with maximum (non-zero) number of partitions (normally 16). By default, LVM2 supports ide, sd, md, loop, dasd, dac960, nbd, ida, cciss, ubd, ataraid, drbd, power2, i2o_block and iseries/vd. Block devices with major numbers of different types are ignored by LVM2. Example: types = ["fd", 16]. To create physical volumes on device-mapper volumes created outside LVM2, perhaps encrypted ones from cryptsetup, you’ll need types = ["device-mapper", 16]. But if you do this, be careful to avoid recursion within LVM2. The figure for number of partitions is not currently used in LVM2 - and might never be.

sysfs_scan — If set to 1 and your kernel supports sysfs and it is mounted, sysfs will be used as a quick way of filtering out block devices that are not present.

md_component_detection — If set to 1, LVM2 will ignore devices used as components of software RAID (md) devices by looking for md superblocks. This doesn’t always work satisfactorily e.g. if a device has been reused without wiping the md superblocks first.

md_chunk_alignment — If set to 1, and a Physical Volume is placed directly upon an md device, LVM2 will align its data blocks with the md device’s stripe-width.

data_alignment_detection — If set to 1, and your kernel provides topology information in sysfs for the Physical Volume, the start of data area will be aligned on a multiple of the



lvm.conf(5)