mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-04 09:18:36 +03:00
o Added section on the syntax of the config file, with an informal grammar.
This commit is contained in:
parent
470933a480
commit
ba57d1f89b
@ -7,7 +7,81 @@ lvm.conf \- Configuration file for LVM2
|
|||||||
lvm.conf is read during the initialisation phase of
|
lvm.conf is read during the initialisation phase of
|
||||||
\fBlvm\fP.
|
\fBlvm\fP.
|
||||||
.LP
|
.LP
|
||||||
Syntax \(em To be written
|
.SH SYNTAX
|
||||||
|
|
||||||
|
The configuration file uses a simple syntax which this sections
|
||||||
|
attempts to describe.
|
||||||
|
|
||||||
|
The first thing to note is that whitespace is not significant (except
|
||||||
|
within strings values). This means that you can format your config
|
||||||
|
file however you wish, eg, use whatever indentation style suits you,
|
||||||
|
or split arrays of values across seperate lines.
|
||||||
|
|
||||||
|
Comments are treated as whitespace, following the normal unix
|
||||||
|
convention they begin with a '#' and continue to the end of the
|
||||||
|
current line.
|
||||||
|
|
||||||
|
An informal grammar follows:
|
||||||
|
|
||||||
|
.IP
|
||||||
|
\fBfile = value*\fP
|
||||||
|
.br
|
||||||
|
A config file consists of a set of values.
|
||||||
|
|
||||||
|
.IP
|
||||||
|
\fBvalue = section | assignment\fP
|
||||||
|
.br
|
||||||
|
A value can either be a new section, or an assignment.
|
||||||
|
|
||||||
|
.IP
|
||||||
|
\fBsection = identifier '{' value* '}'\fP
|
||||||
|
.br
|
||||||
|
A section is used to group associated values together. It is denoted
|
||||||
|
by a name and some delimiting curly braces.
|
||||||
|
.br
|
||||||
|
eg,
|
||||||
|
.br
|
||||||
|
backups {
|
||||||
|
.br
|
||||||
|
...
|
||||||
|
.br
|
||||||
|
}
|
||||||
|
.IP
|
||||||
|
\fBassignment = identifier '=' (array | type)\fP
|
||||||
|
.br
|
||||||
|
An assignment is where a name and a type are associated.
|
||||||
|
.br
|
||||||
|
eg,
|
||||||
|
.br
|
||||||
|
max_backups = 42
|
||||||
|
.br
|
||||||
|
.IP
|
||||||
|
\fBarray = '[' (type ',')* type ']' | '[' ']'\fP
|
||||||
|
.br
|
||||||
|
Inhomogeneous arrays are supported, elements must be seperated by
|
||||||
|
commas. An empty array is acceptable.
|
||||||
|
.IP
|
||||||
|
\fBtype = integer | float | string\fP
|
||||||
|
.br
|
||||||
|
There are three basic types:
|
||||||
|
.br
|
||||||
|
.IP
|
||||||
|
\fBinteger = [0-9]*\fP
|
||||||
|
.br
|
||||||
|
Integers are denoted by a series of digits.
|
||||||
|
.IP
|
||||||
|
\fBfloat = [0-9]*\.[0-9]*\fP
|
||||||
|
.br
|
||||||
|
Floating point numbers are denoted by a series of digits, a decimal
|
||||||
|
point, and then more digits.
|
||||||
|
.IP
|
||||||
|
\fBstring = '"' .* '"'\fP
|
||||||
|
.br
|
||||||
|
Strings must be enclosed in double quotes.
|
||||||
|
.LP
|
||||||
|
See the example configurations at the end of this man page.
|
||||||
|
|
||||||
|
.SH SECTIONS
|
||||||
.LP
|
.LP
|
||||||
The sections that may be present in the file are:
|
The sections that may be present in the file are:
|
||||||
.TP
|
.TP
|
||||||
|
Loading…
Reference in New Issue
Block a user