pax_global_header 0000666 0000000 0000000 00000000064 14516463774 0014533 g ustar 00root root 0000000 0000000 52 comment=a77ed66dd63f3f3ab8c9594a566ac44b2233ac0b
kiwi-boxed-plugin-0.2.31/ 0000775 0000000 0000000 00000000000 14516463774 0015154 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/.bumpversion.cfg 0000664 0000000 0000000 00000000231 14516463774 0020260 0 ustar 00root root 0000000 0000000 [bumpversion]
current_version = 0.2.31
commit = True
tag = True
[bumpversion:file:kiwi_boxed_plugin/version.py]
[bumpversion:file:doc/source/conf.py]
kiwi-boxed-plugin-0.2.31/.github/ 0000775 0000000 0000000 00000000000 14516463774 0016514 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/.github/workflows/ 0000775 0000000 0000000 00000000000 14516463774 0020551 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/.github/workflows/ci-publish-to-pypi.yml 0000664 0000000 0000000 00000001315 14516463774 0024732 0 ustar 00root root 0000000 0000000 name: PublishToPyPI
on:
push:
tags:
- '*'
jobs:
release:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: ["3.10"]
environment:
name: pypi
url: https://pypi.org/p/kiwi-boxed-plugin
permissions:
id-token: write
steps:
- uses: actions/checkout@v3
- name: Python${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install
run: |
python -m pip install --upgrade pip
python -m pip install tox
- name: Prepare
run: |
tox -e doc,release
- name: Publish
uses: pypa/gh-action-pypi-publish@release/v1
kiwi-boxed-plugin-0.2.31/.github/workflows/ci-testing.yml 0000664 0000000 0000000 00000001026 14516463774 0023341 0 ustar 00root root 0000000 0000000 name: CILint
on:
push:
branches:
- "master"
pull_request:
jobs:
unit_tests:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: ["3.10", "3.11"]
steps:
- uses: actions/checkout@v3
- name: Python${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install
run: |
python -m pip install --upgrade pip
python -m pip install tox
- name: Tox
run: |
tox
kiwi-boxed-plugin-0.2.31/.gitignore 0000664 0000000 0000000 00000002005 14516463774 0017141 0 ustar 00root root 0000000 0000000 # completion
completion/kiwi-ng.sh
# Schema formats
kiwi/schema/kiwi.xsd
kiwi/schema/xsi.xsd
kiwi/schema/kiwi.revision
doc/source/development/schema/xsdDocHtml.css
# C tool binaries
tools/dcounter
tools/driveready
tools/isconsole
tools/setctsid
tools/startshell
tools/utimer
# Byte-compiled / optimized / DLL files
.pytest_cache/
__pycache__/
*.py[cod]
# Backup files
*~
*.kate-swp
*.~
# C extensions
*.so
# Distribution / packaging
.Python
env/
.env/
.env2/
.env3/
build/
develop-eggs/
dist/
downloads/
eggs/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.cache
nosetests.xml
coverage.xml
# Translations
*.mo
# Django stuff:
*.log
# Sphinx documentation
docs/_build/
doc/xml/
# man pages
*.1.gz
# VSC
.vscode/
kiwi-boxed-plugin-0.2.31/.virtualenv.dev-requirements.txt 0000664 0000000 0000000 00000001124 14516463774 0023466 0 ustar 00root root 0000000 0000000 #
# Requirement files for Python Virtual Environments
#
-r .virtualenv.requirements.txt
# setuptools for pypi upload
setuptools
# virtualenv-based automation of test activities
tox
# python unit testing framework
pytest
pytest-cov
pytest-xdist
# Rolling backport of unittest.mock for all Pythons
mock
# Version-bump your software with a single command!
bumpversion
# A built-package format for Python
wheel
# Python style guide checker
flake8
mypy
types-pkg_resources
types-requests
types-PyYAML
types-mock
# for building documentation
sphinx>=5.0.0
sphinx_rtd_theme
# for release
twine
kiwi-boxed-plugin-0.2.31/.virtualenv.requirements.txt 0000664 0000000 0000000 00000000457 14516463774 0022722 0 ustar 00root root 0000000 0000000 #
# Requirement files for Python Virtual Environments
#
# Shell interface for docopt, the command-line interface description language
docopt
# Network request/response library
requests
# YAML file parsing
PyYAML
# config file schema
cerberus
# kiwi
kiwi
# download with progress info
progressbar2
kiwi-boxed-plugin-0.2.31/LICENSE 0000664 0000000 0000000 00000104515 14516463774 0016167 0 ustar 00root root 0000000 0000000 GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc.
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
Copyright (C)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
Copyright (C)
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
.
kiwi-boxed-plugin-0.2.31/MANIFEST.in 0000664 0000000 0000000 00000000641 14516463774 0016713 0 ustar 00root root 0000000 0000000 # Manifest describing source package contents
graft kiwi_boxed_plugin/tasks
graft kiwi_boxed_plugin/utils
graft kiwi_boxed_plugin/config
graft package
include Makefile
include README.rst
include LICENSE
include tox.ini
include .bumpversion.cfg
include .virtualenv.requirements.txt
include .virtualenv.dev-requirements.txt
include .coverage*
recursive-include doc/build/man *
global-exclude *.py[cod] __pycache__
kiwi-boxed-plugin-0.2.31/Makefile 0000664 0000000 0000000 00000003675 14516463774 0016627 0 ustar 00root root 0000000 0000000 buildroot = /
python_version = 3
python_lookup_name = python$(python_version)
python = $(shell which $(python_lookup_name))
docdir = /usr/share/doc/packages
version := $(shell \
$(python) -c \
'from kiwi_boxed_plugin.version import __version__; print(__version__)'\
)
tox:
tox
install:
# install plugin manual page and license/readme
# NOTE: this file is not handled through pip because on system level
install -d -m 755 ${buildroot}usr/share/man/man8
gzip -f doc/build/man/kiwi::system::boxbuild.8
install -m 644 doc/build/man/kiwi::system::boxbuild.8.gz \
${buildroot}usr/share/man/man8
install -d -m 755 ${buildroot}${docdir}/python-kiwi_boxed_plugin
install -m 644 LICENSE \
${buildroot}${docdir}/python-kiwi_boxed_plugin/LICENSE
install -m 644 README.rst \
${buildroot}${docdir}/python-kiwi_boxed_plugin/README
build: clean tox
# create setup.py variant for rpm build.
# delete module versions from setup.py for building an rpm
# the dependencies to the python module rpm packages is
# managed in the spec file
sed -ie "s@>=[0-9.]*'@'@g" setup.py
# build the sdist source tarball
$(python) setup.py sdist
# restore original setup.py backed up from sed
mv setup.pye setup.py
# provide rpm source tarball
mv dist/kiwi_boxed_plugin-${version}.tar.gz \
dist/python-kiwi-boxed-plugin.tar.gz
# update rpm changelog using reference file
helper/update_changelog.py \
--since package/python-kiwi_boxed_plugin.changes \
> dist/python-kiwi_boxed_plugin.changes
helper/update_changelog.py \
--file package/python-kiwi_boxed_plugin.changes \
>> dist/python-kiwi_boxed_plugin.changes
# update package version in spec file
cat package/python-kiwi_boxed_plugin-spec-template |\
sed -e s'@%%VERSION@${version}@' \
> dist/python-kiwi_boxed_plugin.spec
# provide rpm rpmlintrc
cp package/python-kiwi_boxed_plugin-rpmlintrc dist
pypi: clean tox
$(python) setup.py sdist upload
clean:
$(python) setup.py clean
rm -rf doc/build
rm -rf dist/*
kiwi-boxed-plugin-0.2.31/README.rst 0000664 0000000 0000000 00000000655 14516463774 0016651 0 ustar 00root root 0000000 0000000 KIWI - Boxed Build Plugin
=========================
.. |GitHub CI Action| image:: https://github.com/OSInside/kiwi-boxed-plugin/workflows/CILint/badge.svg
:target: https://github.com/OSInside/kiwi-boxed-plugin/actions
|GitHub CI Action|
KIWI plugin to provide self contained build support. For further
details see:
`Building in a Self-Contained Environment `__
kiwi-boxed-plugin-0.2.31/boxes/ 0000775 0000000 0000000 00000000000 14516463774 0016274 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/box-key-unsafe.tgz 0000664 0000000 0000000 00000005554 14516463774 0021670 0 ustar 00root root 0000000 0000000 ٮHO7S0]tlps<1OU]ʬnUNfn>)Z+l! `iO WűO(@`8%Q?f쇠{Ϙ!8:%q
'Qoc H|
>o84x(@^Ʒvq +O^??zq&|-87?Jp@1 Hĉ?HE+> |
%77"߮^ԫ|n3'ApG!?IpYQ߃5ȫR ^ONdnrl+k U݅8Wwm
h绷!.N"ofFd{TmFX6Dͯ߿ lV]KJ=Xkă-\-wE4L"zDEXQxt|{Q
]jcMx);W\YկsbtO XyTNXD(qiPDhgw% ϴX+<$z|Ȇ!T5ʸ$0={͂4s찳OsaPC̓WZ]C2ǂșjR9\gOIe0
FXsca+#51-47xN*N-J#eAZ
bYujo dϵ=[ZϩdۚL
~)Ӝ]?4]'e 'G*M]dy(dWA!~$o۽'ı*6ڣ`en| #yMbuΐrbX Or4J}X0뢋0patT&1`E !!b19\+an}Qӵ
)e{z/gwnD=$.$ 3Z;elQ0q\\+
],Id'{ֿ㛓 'į֫c4uIŮmmǐ`{=ixE9sU0%&~K֥9.˦jُ =Ń>F*!Mr+/㦑:uGg_az7]*BsCBڜE;,;Rz>r&FVÏVQJs_>҂Ån8v'ŇX ϹչR,N*6_OpE'k+{)Ǚ Fm\(ꑋW:b7OwЎ.JTBRoE'؝!zCrF˅(ms.6M֘5H(S5UMUuƾ\,ZƹN/߶@d6^9Ͼ 29yB%_Hu':0*ݥ"yt8ly̒;ވsi**|RfEiaT"M
ĥU,-;s(@_R(ɫ֣1w d~_>4aRf&: P kiwi-boxed-plugin-0.2.31/boxes/fedora/ 0000775 0000000 0000000 00000000000 14516463774 0017534 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/fedora/appliance.kiwi 0000664 0000000 0000000 00000006247 14516463774 0022366 0 ustar 00root root 0000000 0000000
Marcus Schäferms@suse.comFedora VM for kiwi boxed build1.37.1dnfen_USusUTCtruefalsefalse50
kiwi-boxed-plugin-0.2.31/boxes/fedora/config.sh 0000664 0000000 0000000 00000001473 14516463774 0021342 0 ustar 00root root 0000000 0000000 #!/bin/bash
set -ex
test -f /.kconfig && . /.kconfig
test -f /.profile && . /.profile
#======================================
# Setup default target, multi-user
#--------------------------------------
baseSetRunlevel 3
#==================================
# Disable services
#----------------------------------
systemctl mask systemd-logind.service
systemctl mask systemd-update-utmp.service
systemctl mask auditd.service
systemctl mask systemd-update-utmp-runlevel.service
systemctl mask systemd-user-sessions.service
#======================================
# Activate kiwi service
#--------------------------------------
baseInsertService sshd
baseInsertService kiwi
#======================================
# Fedora uses systemd-resolved for DNS
#--------------------------------------
systemctl enable systemd-resolved
kiwi-boxed-plugin-0.2.31/boxes/fedora/root/ 0000775 0000000 0000000 00000000000 14516463774 0020517 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/fedora/root/etc/ 0000775 0000000 0000000 00000000000 14516463774 0021272 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/fedora/root/etc/fstab.script 0000775 0000000 0000000 00000000077 14516463774 0023626 0 ustar 00root root 0000000 0000000 #!/bin/bash
echo "/dev/vda1 / ext2 defaults 0 0" > /etc/fstab
kiwi-boxed-plugin-0.2.31/boxes/fedora/root/etc/lvm/ 0000775 0000000 0000000 00000000000 14516463774 0022070 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/fedora/root/etc/lvm/lvm.conf 0000664 0000000 0000000 00000270545 14516463774 0023552 0 ustar 00root root 0000000 0000000 # This is an example configuration file for the LVM2 system.
# It contains the default settings that would be used if there was no
# /etc/lvm/lvm.conf file.
#
# Refer to 'man lvm.conf' for further information including the file layout.
#
# Refer to 'man lvm.conf' for information about how settings configured in
# this file are combined with built-in values and command line options to
# arrive at the final values used by LVM.
#
# Refer to 'man lvmconfig' for information about displaying the built-in
# and configured values used by LVM.
#
# If a default value is set in this file (not commented out), then a
# new version of LVM using this file will continue using that value,
# even if the new version of LVM changes the built-in default value.
#
# To put this file in a different directory and override /etc/lvm set
# the environment variable LVM_SYSTEM_DIR before running the tools.
#
# N.B. Take care that each setting only appears once if uncommenting
# example settings in this file.
#hello
# Configuration section config.
# How LVM configuration settings are handled.
config {
# Configuration option config/checks.
# If enabled, any LVM configuration mismatch is reported.
# This implies checking that the configuration key is understood by
# LVM and that the value of the key is the proper type. If disabled,
# any configuration mismatch is ignored and the default value is used
# without any warning (a message about the configuration key not being
# found is issued in verbose mode only).
checks = 1
# Configuration option config/abort_on_errors.
# Abort the LVM process if a configuration mismatch is found.
abort_on_errors = 0
# Configuration option config/profile_dir.
# Directory where LVM looks for configuration profiles.
profile_dir = "/etc/lvm/profile"
}
# Configuration section devices.
# How LVM uses block devices.
devices {
# Configuration option devices/dir.
# Directory in which to create volume group device nodes.
# Commands also accept this as a prefix on volume group names.
# This configuration option is advanced.
dir = "/dev"
# Configuration option devices/scan.
# Directories containing device nodes to use with LVM.
# This configuration option is advanced.
scan = [ "/dev" ]
# Configuration option devices/obtain_device_list_from_udev.
# Obtain the list of available devices from udev.
# This avoids opening or using any inapplicable non-block devices or
# subdirectories found in the udev directory. Any device node or
# symlink not managed by udev in the udev directory is ignored. This
# setting applies only to the udev-managed device directory; other
# directories will be scanned fully. LVM needs to be compiled with
# udev support for this setting to apply.
obtain_device_list_from_udev = 1
# Configuration option devices/external_device_info_source.
# Select an external device information source.
# Some information may already be available in the system and LVM can
# use this information to determine the exact type or use of devices it
# processes. Using an existing external device information source can
# speed up device processing as LVM does not need to run its own native
# routines to acquire this information. For example, this information
# is used to drive LVM filtering like MD component detection, multipath
# component detection, partition detection and others.
#
# Accepted values:
# none
# No external device information source is used.
# udev
# Reuse existing udev database records. Applicable only if LVM is
# compiled with udev support.
#
external_device_info_source = "none"
# Configuration option devices/preferred_names.
# Select which path name to display for a block device.
# If multiple path names exist for a block device, and LVM needs to
# display a name for the device, the path names are matched against
# each item in this list of regular expressions. The first match is
# used. Try to avoid using undescriptive /dev/dm-N names, if present.
# If no preferred name matches, or if preferred_names are not defined,
# the following built-in preferences are applied in order until one
# produces a preferred name:
# Prefer names with path prefixes in the order of:
# /dev/mapper, /dev/disk, /dev/dm-*, /dev/block.
# Prefer the name with the least number of slashes.
# Prefer a name that is a symlink.
# Prefer the path with least value in lexicographical order.
#
# Example
# preferred_names = [ "^/dev/mpath/", "^/dev/mapper/mpath", "^/dev/[hs]d" ]
#
preferred_names = [ "^/dev/mpath/", "^/dev/mapper/mpath", "^/dev/[hs]d" ]
# Configuration option devices/filter.
# Limit the block devices that are used by LVM commands.
# This is a list of regular expressions used to accept or reject block
# device path names. Each regex is delimited by a vertical bar '|'
# (or any character) and is preceded by 'a' to accept the path, or
# by 'r' to reject the path. The first regex in the list to match the
# path is used, producing the 'a' or 'r' result for the device.
# When multiple path names exist for a block device, if any path name
# matches an 'a' pattern before an 'r' pattern, then the device is
# accepted. If all the path names match an 'r' pattern first, then the
# device is rejected. Unmatching path names do not affect the accept
# or reject decision. If no path names for a device match a pattern,
# then the device is accepted. Be careful mixing 'a' and 'r' patterns,
# as the combination might produce unexpected results (test changes.)
# Run vgscan after changing the filter to regenerate the cache.
# See the use_lvmetad comment for a special case regarding filters.
#
# Example
# Accept every block device:
# filter = [ "a|.*/|" ]
# Reject the cdrom drive:
# filter = [ "r|/dev/cdrom|" ]
# Work with just loopback devices, e.g. for testing:
# filter = [ "a|loop|", "r|.*|" ]
# Accept all loop devices and ide drives except hdc:
# filter = [ "a|loop|", "r|/dev/hdc|", "a|/dev/ide|", "r|.*|" ]
# Use anchors to be very specific:
# filter = [ "a|^/dev/hda8$|", "r|.*/|" ]
#
# This configuration option has an automatic default value.
# filter = [ "a|.*/|" ]
filter = [ "r|/dev/.*/by-path/.*|", "r|/dev/.*/by-id/.*|", "r|/dev/fd.*|", "r|/dev/cdrom|", "a/.*/" ]
# Configuration option devices/global_filter.
# Limit the block devices that are used by LVM system components.
# Because devices/filter may be overridden from the command line, it is
# not suitable for system-wide device filtering, e.g. udev and lvmetad.
# Use global_filter to hide devices from these LVM system components.
# The syntax is the same as devices/filter. Devices rejected by
# global_filter are not opened by LVM.
# This configuration option has an automatic default value.
# global_filter = [ "a|.*/|" ]
# Configuration option devices/cache_dir.
# Directory in which to store the device cache file.
# The results of filtering are cached on disk to avoid rescanning dud
# devices (which can take a very long time). By default this cache is
# stored in a file named .cache. It is safe to delete this file; the
# tools regenerate it. If obtain_device_list_from_udev is enabled, the
# list of devices is obtained from udev and any existing .cache file
# is removed.
cache_dir = "/etc/lvm/cache"
# Configuration option devices/cache_file_prefix.
# A prefix used before the .cache file name. See devices/cache_dir.
cache_file_prefix = ""
# Configuration option devices/write_cache_state.
# Enable/disable writing the cache file. See devices/cache_dir.
write_cache_state = 1
# Configuration option devices/types.
# List of additional acceptable block device types.
# These are of device type names from /proc/devices, followed by the
# maximum number of partitions.
#
# Example
# types = [ "fd", 16 ]
#
# This configuration option is advanced.
# This configuration option does not have a default value defined.
# Configuration option devices/sysfs_scan.
# Restrict device scanning to block devices appearing in sysfs.
# This is a quick way of filtering out block devices that are not
# present on the system. sysfs must be part of the kernel and mounted.)
sysfs_scan = 1
# Configuration option devices/multipath_component_detection.
# Ignore devices that are components of DM multipath devices.
multipath_component_detection = 1
# Configuration option devices/md_component_detection.
# Ignore devices that are components of software RAID (md) devices.
md_component_detection = 1
# Configuration option devices/fw_raid_component_detection.
# Ignore devices that are components of firmware RAID devices.
# LVM must use an external_device_info_source other than none for this
# detection to execute.
fw_raid_component_detection = 0
# Configuration option devices/md_chunk_alignment.
# Align PV data blocks with md device's stripe-width.
# This applies if a PV is placed directly on an md device.
md_chunk_alignment = 1
# Configuration option devices/default_data_alignment.
# Default alignment of the start of a PV data area in MB.
# If set to 0, a value of 64KiB will be used.
# Set to 1 for 1MiB, 2 for 2MiB, etc.
# This configuration option has an automatic default value.
# default_data_alignment = 1
# Configuration option devices/data_alignment_detection.
# Detect PV data alignment based on sysfs device information.
# The start of a PV data area will be a multiple of minimum_io_size or
# optimal_io_size exposed in sysfs. minimum_io_size is the smallest
# request the device can perform without incurring a read-modify-write
# penalty, e.g. MD chunk size. optimal_io_size is the device's
# preferred unit of receiving I/O, e.g. MD stripe width.
# minimum_io_size is used if optimal_io_size is undefined (0).
# If md_chunk_alignment is enabled, that detects the optimal_io_size.
# This setting takes precedence over md_chunk_alignment.
data_alignment_detection = 1
# Configuration option devices/data_alignment.
# Alignment of the start of a PV data area in KiB.
# If a PV is placed directly on an md device and md_chunk_alignment or
# data_alignment_detection are enabled, then this setting is ignored.
# Otherwise, md_chunk_alignment and data_alignment_detection are
# disabled if this is set. Set to 0 to use the default alignment or the
# page size, if larger.
data_alignment = 0
# Configuration option devices/data_alignment_offset_detection.
# Detect PV data alignment offset based on sysfs device information.
# The start of a PV aligned data area will be shifted by the
# alignment_offset exposed in sysfs. This offset is often 0, but may
# be non-zero. Certain 4KiB sector drives that compensate for windows
# partitioning will have an alignment_offset of 3584 bytes (sector 7
# is the lowest aligned logical block, the 4KiB sectors start at
# LBA -1, and consequently sector 63 is aligned on a 4KiB boundary).
# pvcreate --dataalignmentoffset will skip this detection.
data_alignment_offset_detection = 1
# Configuration option devices/ignore_suspended_devices.
# Ignore DM devices that have I/O suspended while scanning devices.
# Otherwise, LVM waits for a suspended device to become accessible.
# This should only be needed in recovery situations.
ignore_suspended_devices = 0
# Configuration option devices/ignore_lvm_mirrors.
# Do not scan 'mirror' LVs to avoid possible deadlocks.
# This avoids possible deadlocks when using the 'mirror' segment type.
# This setting determines whether LVs using the 'mirror' segment type
# are scanned for LVM labels. This affects the ability of mirrors to
# be used as physical volumes. If this setting is enabled, it is
# impossible to create VGs on top of mirror LVs, i.e. to stack VGs on
# mirror LVs. If this setting is disabled, allowing mirror LVs to be
# scanned, it may cause LVM processes and I/O to the mirror to become
# blocked. This is due to the way that the mirror segment type handles
# failures. In order for the hang to occur, an LVM command must be run
# just after a failure and before the automatic LVM repair process
# takes place, or there must be failures in multiple mirrors in the
# same VG at the same time with write failures occurring moments before
# a scan of the mirror's labels. The 'mirror' scanning problems do not
# apply to LVM RAID types like 'raid1' which handle failures in a
# different way, making them a better choice for VG stacking.
ignore_lvm_mirrors = 1
# Configuration option devices/disable_after_error_count.
# Number of I/O errors after which a device is skipped.
# During each LVM operation, errors received from each device are
# counted. If the counter of a device exceeds the limit set here,
# no further I/O is sent to that device for the remainder of the
# operation. Setting this to 0 disables the counters altogether.
disable_after_error_count = 0
# Configuration option devices/require_restorefile_with_uuid.
# Allow use of pvcreate --uuid without requiring --restorefile.
require_restorefile_with_uuid = 1
# Configuration option devices/pv_min_size.
# Minimum size in KiB of block devices which can be used as PVs.
# In a clustered environment all nodes must use the same value.
# Any value smaller than 512KiB is ignored. The previous built-in
# value was 512.
pv_min_size = 2048
# Configuration option devices/issue_discards.
# Issue discards to PVs that are no longer used by an LV.
# Discards are sent to an LV's underlying physical volumes when the LV
# is no longer using the physical volumes' space, e.g. lvremove,
# lvreduce. Discards inform the storage that a region is no longer
# used. Storage that supports discards advertise the protocol-specific
# way discards should be issued by the kernel (TRIM, UNMAP, or
# WRITE SAME with UNMAP bit set). Not all storage will support or
# benefit from discards, but SSDs and thinly provisioned LUNs
# generally do. If enabled, discards will only be issued if both the
# storage and kernel provide support.
issue_discards = 0
# Configuration option devices/allow_changes_with_duplicate_pvs.
# Allow VG modification while a PV appears on multiple devices.
# When a PV appears on multiple devices, LVM attempts to choose the
# best device to use for the PV. If the devices represent the same
# underlying storage, the choice has minimal consequence. If the
# devices represent different underlying storage, the wrong choice
# can result in data loss if the VG is modified. Disabling this
# setting is the safest option because it prevents modifying a VG
# or activating LVs in it while a PV appears on multiple devices.
# Enabling this setting allows the VG to be used as usual even with
# uncertain devices.
allow_changes_with_duplicate_pvs = 0
}
# Configuration section allocation.
# How LVM selects space and applies properties to LVs.
allocation {
# Configuration option allocation/cling_tag_list.
# Advise LVM which PVs to use when searching for new space.
# When searching for free space to extend an LV, the 'cling' allocation
# policy will choose space on the same PVs as the last segment of the
# existing LV. If there is insufficient space and a list of tags is
# defined here, it will check whether any of them are attached to the
# PVs concerned and then seek to match those PV tags between existing
# extents and new extents.
#
# Example
# Use the special tag "@*" as a wildcard to match any PV tag:
# cling_tag_list = [ "@*" ]
# LVs are mirrored between two sites within a single VG, and
# PVs are tagged with either @site1 or @site2 to indicate where
# they are situated:
# cling_tag_list = [ "@site1", "@site2" ]
#
# This configuration option does not have a default value defined.
# Configuration option allocation/maximise_cling.
# Use a previous allocation algorithm.
# Changes made in version 2.02.85 extended the reach of the 'cling'
# policies to detect more situations where data can be grouped onto
# the same disks. This setting can be used to disable the changes
# and revert to the previous algorithm.
maximise_cling = 1
# Configuration option allocation/use_blkid_wiping.
# Use blkid to detect existing signatures on new PVs and LVs.
# The blkid library can detect more signatures than the native LVM
# detection code, but may take longer. LVM needs to be compiled with
# blkid wiping support for this setting to apply. LVM native detection
# code is currently able to recognize: MD device signatures,
# swap signature, and LUKS signatures. To see the list of signatures
# recognized by blkid, check the output of the 'blkid -k' command.
use_blkid_wiping = 1
# Configuration option allocation/wipe_signatures_when_zeroing_new_lvs.
# Look for and erase any signatures while zeroing a new LV.
# The --wipesignatures option overrides this setting.
# Zeroing is controlled by the -Z/--zero option, and if not specified,
# zeroing is used by default if possible. Zeroing simply overwrites the
# first 4KiB of a new LV with zeroes and does no signature detection or
# wiping. Signature wiping goes beyond zeroing and detects exact types
# and positions of signatures within the whole LV. It provides a
# cleaner LV after creation as all known signatures are wiped. The LV
# is not claimed incorrectly by other tools because of old signatures
# from previous use. The number of signatures that LVM can detect
# depends on the detection code that is selected (see
# use_blkid_wiping.) Wiping each detected signature must be confirmed.
# When this setting is disabled, signatures on new LVs are not detected
# or erased unless the --wipesignatures option is used directly.
wipe_signatures_when_zeroing_new_lvs = 1
# Configuration option allocation/mirror_logs_require_separate_pvs.
# Mirror logs and images will always use different PVs.
# The default setting changed in version 2.02.85.
mirror_logs_require_separate_pvs = 0
# Configuration option allocation/raid_stripe_all_devices.
# Stripe across all PVs when RAID stripes are not specified.
# If enabled, all PVs in the VG or on the command line are used for
# raid0/4/5/6/10 when the command does not specify the number of
# stripes to use.
# This was the default behaviour until release 2.02.162.
# This configuration option has an automatic default value.
# raid_stripe_all_devices = 0
# Configuration option allocation/cache_pool_metadata_require_separate_pvs.
# Cache pool metadata and data will always use different PVs.
cache_pool_metadata_require_separate_pvs = 0
# Configuration option allocation/cache_metadata_format.
# Sets default metadata format for new cache.
#
# Accepted values:
# 0 Automatically detected best available format
# 1 Original format
# 2 Improved 2nd. generation format
#
# This configuration option has an automatic default value.
# cache_metadata_format = 0
# Configuration option allocation/cache_mode.
# The default cache mode used for new cache.
#
# Accepted values:
# writethrough
# Data blocks are immediately written from the cache to disk.
# writeback
# Data blocks are written from the cache back to disk after some
# delay to improve performance.
#
# This setting replaces allocation/cache_pool_cachemode.
# This configuration option has an automatic default value.
# cache_mode = "writethrough"
# Configuration option allocation/cache_policy.
# The default cache policy used for new cache volume.
# Since kernel 4.2 the default policy is smq (Stochastic multiqueue),
# otherwise the older mq (Multiqueue) policy is selected.
# This configuration option does not have a default value defined.
# Configuration section allocation/cache_settings.
# Settings for the cache policy.
# See documentation for individual cache policies for more info.
# This configuration section has an automatic default value.
# cache_settings {
# }
# Configuration option allocation/cache_pool_chunk_size.
# The minimal chunk size in KiB for cache pool volumes.
# Using a chunk_size that is too large can result in wasteful use of
# the cache, where small reads and writes can cause large sections of
# an LV to be mapped into the cache. However, choosing a chunk_size
# that is too small can result in more overhead trying to manage the
# numerous chunks that become mapped into the cache. The former is
# more of a problem than the latter in most cases, so the default is
# on the smaller end of the spectrum. Supported values range from
# 32KiB to 1GiB in multiples of 32.
# This configuration option does not have a default value defined.
# Configuration option allocation/cache_pool_max_chunks.
# The maximum number of chunks in a cache pool.
# For cache target v1.9 the recommended maximumm is 1000000 chunks.
# Using cache pool with more chunks may degrade cache performance.
# This configuration option does not have a default value defined.
# Configuration option allocation/thin_pool_metadata_require_separate_pvs.
# Thin pool metdata and data will always use different PVs.
thin_pool_metadata_require_separate_pvs = 0
# Configuration option allocation/thin_pool_zero.
# Thin pool data chunks are zeroed before they are first used.
# Zeroing with a larger thin pool chunk size reduces performance.
# This configuration option has an automatic default value.
# thin_pool_zero = 1
# Configuration option allocation/thin_pool_discards.
# The discards behaviour of thin pool volumes.
#
# Accepted values:
# ignore
# nopassdown
# passdown
#
# This configuration option has an automatic default value.
# thin_pool_discards = "passdown"
# Configuration option allocation/thin_pool_chunk_size_policy.
# The chunk size calculation policy for thin pool volumes.
#
# Accepted values:
# generic
# If thin_pool_chunk_size is defined, use it. Otherwise, calculate
# the chunk size based on estimation and device hints exposed in
# sysfs - the minimum_io_size. The chunk size is always at least
# 64KiB.
# performance
# If thin_pool_chunk_size is defined, use it. Otherwise, calculate
# the chunk size for performance based on device hints exposed in
# sysfs - the optimal_io_size. The chunk size is always at least
# 512KiB.
#
# This configuration option has an automatic default value.
# thin_pool_chunk_size_policy = "generic"
# Configuration option allocation/thin_pool_chunk_size.
# The minimal chunk size in KiB for thin pool volumes.
# Larger chunk sizes may improve performance for plain thin volumes,
# however using them for snapshot volumes is less efficient, as it
# consumes more space and takes extra time for copying. When unset,
# lvm tries to estimate chunk size starting from 64KiB. Supported
# values are in the range 64KiB to 1GiB.
# This configuration option does not have a default value defined.
# Configuration option allocation/physical_extent_size.
# Default physical extent size in KiB to use for new VGs.
# This configuration option has an automatic default value.
# physical_extent_size = 4096
}
# Configuration section log.
# How LVM log information is reported.
log {
# Configuration option log/report_command_log.
# Enable or disable LVM log reporting.
# If enabled, LVM will collect a log of operations, messages,
# per-object return codes with object identification and associated
# error numbers (errnos) during LVM command processing. Then the
# log is either reported solely or in addition to any existing
# reports, depending on LVM command used. If it is a reporting command
# (e.g. pvs, vgs, lvs, lvm fullreport), then the log is reported in
# addition to any existing reports. Otherwise, there's only log report
# on output. For all applicable LVM commands, you can request that
# the output has only log report by using --logonly command line
# option. Use log/command_log_cols and log/command_log_sort settings
# to define fields to display and sort fields for the log report.
# You can also use log/command_log_selection to define selection
# criteria used each time the log is reported.
# This configuration option has an automatic default value.
# report_command_log = 0
# Configuration option log/command_log_sort.
# List of columns to sort by when reporting command log.
# See --logonly --configreport log -o help
# for the list of possible fields.
# This configuration option has an automatic default value.
# command_log_sort = "log_seq_num"
# Configuration option log/command_log_cols.
# List of columns to report when reporting command log.
# See --logonly --configreport log -o help
# for the list of possible fields.
# This configuration option has an automatic default value.
# command_log_cols = "log_seq_num,log_type,log_context,log_object_type,log_object_name,log_object_id,log_object_group,log_object_group_id,log_message,log_errno,log_ret_code"
# Configuration option log/command_log_selection.
# Selection criteria used when reporting command log.
# You can define selection criteria that are applied each
# time log is reported. This way, it is possible to control the
# amount of log that is displayed on output and you can select
# only parts of the log that are important for you. To define
# selection criteria, use fields from log report. See also
# --logonly --configreport log -S help for the
# list of possible fields and selection operators. You can also
# define selection criteria for log report on command line directly
# using --configreport log -S
# which has precedence over log/command_log_selection setting.
# For more information about selection criteria in general, see
# lvm(8) man page.
# This configuration option has an automatic default value.
# command_log_selection = "!(log_type=status && message=success)"
# Configuration option log/verbose.
# Controls the messages sent to stdout or stderr.
verbose = 0
# Configuration option log/silent.
# Suppress all non-essential messages from stdout.
# This has the same effect as -qq. When enabled, the following commands
# still produce output: dumpconfig, lvdisplay, lvmdiskscan, lvs, pvck,
# pvdisplay, pvs, version, vgcfgrestore -l, vgdisplay, vgs.
# Non-essential messages are shifted from log level 4 to log level 5
# for syslog and lvm2_log_fn purposes.
# Any 'yes' or 'no' questions not overridden by other arguments are
# suppressed and default to 'no'.
silent = 0
# Configuration option log/syslog.
# Send log messages through syslog.
syslog = 1
# Configuration option log/file.
# Write error and debug log messages to a file specified here.
# This configuration option does not have a default value defined.
# file = "/var/log/lvm2.log"
# Configuration option log/overwrite.
# Overwrite the log file each time the program is run.
overwrite = 0
# Configuration option log/level.
# The level of log messages that are sent to the log file or syslog.
# There are 6 syslog-like log levels currently in use: 2 to 7 inclusive.
# 7 is the most verbose (LOG_DEBUG).
level = 0
# Configuration option log/indent.
# Indent messages according to their severity.
indent = 1
# Configuration option log/command_names.
# Display the command name on each line of output.
command_names = 0
# Configuration option log/prefix.
# A prefix to use before the log message text.
# (After the command name, if selected).
# Two spaces allows you to see/grep the severity of each message.
# To make the messages look similar to the original LVM tools use:
# indent = 0, command_names = 1, prefix = " -- "
prefix = " "
# Configuration option log/activation.
# Log messages during activation.
# Don't use this in low memory situations (can deadlock).
activation = 0
# Configuration option log/debug_classes.
# Select log messages by class.
# Some debugging messages are assigned to a class and only appear in
# debug output if the class is listed here. Classes currently
# available: memory, devices, activation, allocation, lvmetad,
# metadata, cache, locking, lvmpolld. Use "all" to see everything.
debug_classes = [ "memory", "devices", "activation", "allocation", "lvmetad", "metadata", "cache", "locking", "lvmpolld", "dbus" ]
}
# Configuration section backup.
# How LVM metadata is backed up and archived.
# In LVM, a 'backup' is a copy of the metadata for the current system,
# and an 'archive' contains old metadata configurations. They are
# stored in a human readable text format.
backup {
# Configuration option backup/backup.
# Maintain a backup of the current metadata configuration.
# Think very hard before turning this off!
backup = 1
# Configuration option backup/backup_dir.
# Location of the metadata backup files.
# Remember to back up this directory regularly!
backup_dir = "/etc/lvm/backup"
# Configuration option backup/archive.
# Maintain an archive of old metadata configurations.
# Think very hard before turning this off.
archive = 1
# Configuration option backup/archive_dir.
# Location of the metdata archive files.
# Remember to back up this directory regularly!
archive_dir = "/etc/lvm/archive"
# Configuration option backup/retain_min.
# Minimum number of archives to keep.
retain_min = 10
# Configuration option backup/retain_days.
# Minimum number of days to keep archive files.
retain_days = 30
}
# Configuration section shell.
# Settings for running LVM in shell (readline) mode.
shell {
# Configuration option shell/history_size.
# Number of lines of history to store in ~/.lvm_history.
history_size = 100
}
# Configuration section global.
# Miscellaneous global LVM settings.
global {
# Configuration option global/umask.
# The file creation mask for any files and directories created.
# Interpreted as octal if the first digit is zero.
umask = 077
# Configuration option global/test.
# No on-disk metadata changes will be made in test mode.
# Equivalent to having the -t option on every command.
test = 0
# Configuration option global/units.
# Default value for --units argument.
units = "h"
# Configuration option global/si_unit_consistency.
# Distinguish between powers of 1024 and 1000 bytes.
# The LVM commands distinguish between powers of 1024 bytes,
# e.g. KiB, MiB, GiB, and powers of 1000 bytes, e.g. KB, MB, GB.
# If scripts depend on the old behaviour, disable this setting
# temporarily until they are updated.
si_unit_consistency = 1
# Configuration option global/suffix.
# Display unit suffix for sizes.
# This setting has no effect if the units are in human-readable form
# (global/units = "h") in which case the suffix is always displayed.
suffix = 1
# Configuration option global/activation.
# Enable/disable communication with the kernel device-mapper.
# Disable to use the tools to manipulate LVM metadata without
# activating any logical volumes. If the device-mapper driver
# is not present in the kernel, disabling this should suppress
# the error messages.
activation = 1
# Configuration option global/fallback_to_lvm1.
# Try running LVM1 tools if LVM cannot communicate with DM.
# This option only applies to 2.4 kernels and is provided to help
# switch between device-mapper kernels and LVM1 kernels. The LVM1
# tools need to be installed with .lvm1 suffices, e.g. vgscan.lvm1.
# They will stop working once the lvm2 on-disk metadata format is used.
# This configuration option has an automatic default value.
# fallback_to_lvm1 = 1
# Configuration option global/format.
# The default metadata format that commands should use.
# The -M 1|2 option overrides this setting.
#
# Accepted values:
# lvm1
# lvm2
#
# This configuration option has an automatic default value.
# format = "lvm2"
# Configuration option global/format_libraries.
# Shared libraries that process different metadata formats.
# If support for LVM1 metadata was compiled as a shared library use
# format_libraries = "liblvm2format1.so"
# This configuration option does not have a default value defined.
# Configuration option global/segment_libraries.
# This configuration option does not have a default value defined.
# Configuration option global/proc.
# Location of proc filesystem.
# This configuration option is advanced.
proc = "/proc"
# Configuration option global/etc.
# Location of /etc system configuration directory.
etc = "/etc"
# Configuration option global/locking_type.
# Type of locking to use.
#
# Accepted values:
# 0
# Turns off locking. Warning: this risks metadata corruption if
# commands run concurrently.
# 1
# LVM uses local file-based locking, the standard mode.
# 2
# LVM uses the external shared library locking_library.
# 3
# LVM uses built-in clustered locking with clvmd.
# This is incompatible with lvmetad. If use_lvmetad is enabled,
# LVM prints a warning and disables lvmetad use.
# 4
# LVM uses read-only locking which forbids any operations that
# might change metadata.
# 5
# Offers dummy locking for tools that do not need any locks.
# You should not need to set this directly; the tools will select
# when to use it instead of the configured locking_type.
# Do not use lvmetad or the kernel device-mapper driver with this
# locking type. It is used by the --readonly option that offers
# read-only access to Volume Group metadata that cannot be locked
# safely because it belongs to an inaccessible domain and might be
# in use, for example a virtual machine image or a disk that is
# shared by a clustered machine.
#
locking_type = 1
# Configuration option global/wait_for_locks.
# When disabled, fail if a lock request would block.
wait_for_locks = 1
# Configuration option global/fallback_to_clustered_locking.
# Attempt to use built-in cluster locking if locking_type 2 fails.
# If using external locking (type 2) and initialisation fails, with
# this enabled, an attempt will be made to use the built-in clustered
# locking. Disable this if using a customised locking_library.
fallback_to_clustered_locking = 1
# Configuration option global/fallback_to_local_locking.
# Use locking_type 1 (local) if locking_type 2 or 3 fail.
# If an attempt to initialise type 2 or type 3 locking failed, perhaps
# because cluster components such as clvmd are not running, with this
# enabled, an attempt will be made to use local file-based locking
# (type 1). If this succeeds, only commands against local VGs will
# proceed. VGs marked as clustered will be ignored.
fallback_to_local_locking = 1
# Configuration option global/locking_dir.
# Directory to use for LVM command file locks.
# Local non-LV directory that holds file-based locks while commands are
# in progress. A directory like /tmp that may get wiped on reboot is OK.
locking_dir = "/run/lock/lvm"
# Configuration option global/prioritise_write_locks.
# Allow quicker VG write access during high volume read access.
# When there are competing read-only and read-write access requests for
# a volume group's metadata, instead of always granting the read-only
# requests immediately, delay them to allow the read-write requests to
# be serviced. Without this setting, write access may be stalled by a
# high volume of read-only requests. This option only affects
# locking_type 1 viz. local file-based locking.
prioritise_write_locks = 1
# Configuration option global/library_dir.
# Search this directory first for shared libraries.
# This configuration option does not have a default value defined.
# Configuration option global/locking_library.
# The external locking library to use for locking_type 2.
# This configuration option has an automatic default value.
# locking_library = "liblvm2clusterlock.so"
# Configuration option global/abort_on_internal_errors.
# Abort a command that encounters an internal error.
# Treat any internal errors as fatal errors, aborting the process that
# encountered the internal error. Please only enable for debugging.
abort_on_internal_errors = 0
# Configuration option global/detect_internal_vg_cache_corruption.
# Internal verification of VG structures.
# Check if CRC matches when a parsed VG is used multiple times. This
# is useful to catch unexpected changes to cached VG structures.
# Please only enable for debugging.
detect_internal_vg_cache_corruption = 0
# Configuration option global/metadata_read_only.
# No operations that change on-disk metadata are permitted.
# Additionally, read-only commands that encounter metadata in need of
# repair will still be allowed to proceed exactly as if the repair had
# been performed (except for the unchanged vg_seqno). Inappropriate
# use could mess up your system, so seek advice first!
metadata_read_only = 0
# Configuration option global/mirror_segtype_default.
# The segment type used by the short mirroring option -m.
# The --type mirror|raid1 option overrides this setting.
#
# Accepted values:
# mirror
# The original RAID1 implementation from LVM/DM. It is
# characterized by a flexible log solution (core, disk, mirrored),
# and by the necessity to block I/O while handling a failure.
# There is an inherent race in the dmeventd failure handling logic
# with snapshots of devices using this type of RAID1 that in the
# worst case could cause a deadlock. (Also see
# devices/ignore_lvm_mirrors.)
# raid1
# This is a newer RAID1 implementation using the MD RAID1
# personality through device-mapper. It is characterized by a
# lack of log options. (A log is always allocated for every
# device and they are placed on the same device as the image,
# so no separate devices are required.) This mirror
# implementation does not require I/O to be blocked while
# handling a failure. This mirror implementation is not
# cluster-aware and cannot be used in a shared (active/active)
# fashion in a cluster.
#
mirror_segtype_default = "raid1"
# Configuration option global/raid10_segtype_default.
# The segment type used by the -i -m combination.
# The --type raid10|mirror option overrides this setting.
# The --stripes/-i and --mirrors/-m options can both be specified
# during the creation of a logical volume to use both striping and
# mirroring for the LV. There are two different implementations.
#
# Accepted values:
# raid10
# LVM uses MD's RAID10 personality through DM. This is the
# preferred option.
# mirror
# LVM layers the 'mirror' and 'stripe' segment types. The layering
# is done by creating a mirror LV on top of striped sub-LVs,
# effectively creating a RAID 0+1 array. The layering is suboptimal
# in terms of providing redundancy and performance.
#
raid10_segtype_default = "raid10"
# Configuration option global/sparse_segtype_default.
# The segment type used by the -V -L combination.
# The --type snapshot|thin option overrides this setting.
# The combination of -V and -L options creates a sparse LV. There are
# two different implementations.
#
# Accepted values:
# snapshot
# The original snapshot implementation from LVM/DM. It uses an old
# snapshot that mixes data and metadata within a single COW
# storage volume and performs poorly when the size of stored data
# passes hundreds of MB.
# thin
# A newer implementation that uses thin provisioning. It has a
# bigger minimal chunk size (64KiB) and uses a separate volume for
# metadata. It has better performance, especially when more data
# is used. It also supports full snapshots.
#
sparse_segtype_default = "thin"
# Configuration option global/lvdisplay_shows_full_device_path.
# Enable this to reinstate the previous lvdisplay name format.
# The default format for displaying LV names in lvdisplay was changed
# in version 2.02.89 to show the LV name and path separately.
# Previously this was always shown as /dev/vgname/lvname even when that
# was never a valid path in the /dev filesystem.
# This configuration option has an automatic default value.
# lvdisplay_shows_full_device_path = 0
# Configuration option global/use_lvmetad.
# Use lvmetad to cache metadata and reduce disk scanning.
# When enabled (and running), lvmetad provides LVM commands with VG
# metadata and PV state. LVM commands then avoid reading this
# information from disks which can be slow. When disabled (or not
# running), LVM commands fall back to scanning disks to obtain VG
# metadata. lvmetad is kept updated via udev rules which must be set
# up for LVM to work correctly. (The udev rules should be installed
# by default.) Without a proper udev setup, changes in the system's
# block device configuration will be unknown to LVM, and ignored
# until a manual 'pvscan --cache' is run. If lvmetad was running
# while use_lvmetad was disabled, it must be stopped, use_lvmetad
# enabled, and then started. When using lvmetad, LV activation is
# switched to an automatic, event-based mode. In this mode, LVs are
# activated based on incoming udev events that inform lvmetad when
# PVs appear on the system. When a VG is complete (all PVs present),
# it is auto-activated. The auto_activation_volume_list setting
# controls which LVs are auto-activated (all by default.)
# When lvmetad is updated (automatically by udev events, or directly
# by pvscan --cache), devices/filter is ignored and all devices are
# scanned by default. lvmetad always keeps unfiltered information
# which is provided to LVM commands. Each LVM command then filters
# based on devices/filter. This does not apply to other, non-regexp,
# filtering settings: component filters such as multipath and MD
# are checked during pvscan --cache. To filter a device and prevent
# scanning from the LVM system entirely, including lvmetad, use
# devices/global_filter.
use_lvmetad = 0
# Configuration option global/lvmetad_update_wait_time.
# Number of seconds a command will wait for lvmetad update to finish.
# After waiting for this period, a command will not use lvmetad, and
# will revert to disk scanning.
# This configuration option has an automatic default value.
# lvmetad_update_wait_time = 10
# Configuration option global/use_lvmlockd.
# Use lvmlockd for locking among hosts using LVM on shared storage.
# Applicable only if LVM is compiled with lockd support in which
# case there is also lvmlockd(8) man page available for more
# information.
use_lvmlockd = 0
# Configuration option global/lvmlockd_lock_retries.
# Retry lvmlockd lock requests this many times.
# Applicable only if LVM is compiled with lockd support
# This configuration option has an automatic default value.
# lvmlockd_lock_retries = 3
# Configuration option global/sanlock_lv_extend.
# Size in MiB to extend the internal LV holding sanlock locks.
# The internal LV holds locks for each LV in the VG, and after enough
# LVs have been created, the internal LV needs to be extended. lvcreate
# will automatically extend the internal LV when needed by the amount
# specified here. Setting this to 0 disables the automatic extension
# and can cause lvcreate to fail. Applicable only if LVM is compiled
# with lockd support
# This configuration option has an automatic default value.
# sanlock_lv_extend = 256
# Configuration option global/thin_check_executable.
# The full path to the thin_check command.
# LVM uses this command to check that a thin metadata device is in a
# usable state. When a thin pool is activated and after it is
# deactivated, this command is run. Activation will only proceed if
# the command has an exit status of 0. Set to "" to skip this check.
# (Not recommended.) Also see thin_check_options.
# (See package device-mapper-persistent-data or thin-provisioning-tools)
# This configuration option has an automatic default value.
# thin_check_executable = "/usr/sbin/thin_check"
# Configuration option global/thin_dump_executable.
# The full path to the thin_dump command.
# LVM uses this command to dump thin pool metadata.
# (See package device-mapper-persistent-data or thin-provisioning-tools)
# This configuration option has an automatic default value.
# thin_dump_executable = "/usr/sbin/thin_dump"
# Configuration option global/thin_repair_executable.
# The full path to the thin_repair command.
# LVM uses this command to repair a thin metadata device if it is in
# an unusable state. Also see thin_repair_options.
# (See package device-mapper-persistent-data or thin-provisioning-tools)
# This configuration option has an automatic default value.
# thin_repair_executable = "/usr/sbin/thin_repair"
# Configuration option global/thin_check_options.
# List of options passed to the thin_check command.
# With thin_check version 2.1 or newer you can add the option
# --ignore-non-fatal-errors to let it pass through ignorable errors
# and fix them later. With thin_check version 3.2 or newer you should
# include the option --clear-needs-check-flag.
# This configuration option has an automatic default value.
# thin_check_options = [ "-q", "--clear-needs-check-flag" ]
# Configuration option global/thin_repair_options.
# List of options passed to the thin_repair command.
# This configuration option has an automatic default value.
# thin_repair_options = [ "" ]
# Configuration option global/thin_disabled_features.
# Features to not use in the thin driver.
# This can be helpful for testing, or to avoid using a feature that is
# causing problems. Features include: block_size, discards,
# discards_non_power_2, external_origin, metadata_resize,
# external_origin_extend, error_if_no_space.
#
# Example
# thin_disabled_features = [ "discards", "block_size" ]
#
# This configuration option does not have a default value defined.
# Configuration option global/cache_disabled_features.
# Features to not use in the cache driver.
# This can be helpful for testing, or to avoid using a feature that is
# causing problems. Features include: policy_mq, policy_smq, metadata2.
#
# Example
# cache_disabled_features = [ "policy_smq" ]
#
# This configuration option does not have a default value defined.
# Configuration option global/cache_check_executable.
# The full path to the cache_check command.
# LVM uses this command to check that a cache metadata device is in a
# usable state. When a cached LV is activated and after it is
# deactivated, this command is run. Activation will only proceed if the
# command has an exit status of 0. Set to "" to skip this check.
# (Not recommended.) Also see cache_check_options.
# (See package device-mapper-persistent-data or thin-provisioning-tools)
# This configuration option has an automatic default value.
# cache_check_executable = "/usr/sbin/cache_check"
# Configuration option global/cache_dump_executable.
# The full path to the cache_dump command.
# LVM uses this command to dump cache pool metadata.
# (See package device-mapper-persistent-data or thin-provisioning-tools)
# This configuration option has an automatic default value.
# cache_dump_executable = "/usr/sbin/cache_dump"
# Configuration option global/cache_repair_executable.
# The full path to the cache_repair command.
# LVM uses this command to repair a cache metadata device if it is in
# an unusable state. Also see cache_repair_options.
# (See package device-mapper-persistent-data or thin-provisioning-tools)
# This configuration option has an automatic default value.
# cache_repair_executable = "/usr/sbin/cache_repair"
# Configuration option global/cache_check_options.
# List of options passed to the cache_check command.
# With cache_check version 5.0 or newer you should include the option
# --clear-needs-check-flag.
# This configuration option has an automatic default value.
# cache_check_options = [ "-q", "--clear-needs-check-flag" ]
# Configuration option global/cache_repair_options.
# List of options passed to the cache_repair command.
# This configuration option has an automatic default value.
# cache_repair_options = [ "" ]
# Configuration option global/fsadm_executable.
# The full path to the fsadm command.
# LVM uses this command to help with lvresize -r operations.
# This configuration option has an automatic default value.
# fsadm_executable = "/usr/sbin/fsadm"
# Configuration option global/system_id_source.
# The method LVM uses to set the local system ID.
# Volume Groups can also be given a system ID (by vgcreate, vgchange,
# or vgimport.) A VG on shared storage devices is accessible only to
# the host with a matching system ID. See 'man lvmsystemid' for
# information on limitations and correct usage.
#
# Accepted values:
# none
# The host has no system ID.
# lvmlocal
# Obtain the system ID from the system_id setting in the 'local'
# section of an lvm configuration file, e.g. lvmlocal.conf.
# uname
# Set the system ID from the hostname (uname) of the system.
# System IDs beginning localhost are not permitted.
# machineid
# Use the contents of the machine-id file to set the system ID.
# Some systems create this file at installation time.
# See 'man machine-id' and global/etc.
# file
# Use the contents of another file (system_id_file) to set the
# system ID.
#
system_id_source = "none"
# Configuration option global/system_id_file.
# The full path to the file containing a system ID.
# This is used when system_id_source is set to 'file'.
# Comments starting with the character # are ignored.
# This configuration option does not have a default value defined.
# Configuration option global/use_lvmpolld.
# Use lvmpolld to supervise long running LVM commands.
# When enabled, control of long running LVM commands is transferred
# from the original LVM command to the lvmpolld daemon. This allows
# the operation to continue independent of the original LVM command.
# After lvmpolld takes over, the LVM command displays the progress
# of the ongoing operation. lvmpolld itself runs LVM commands to
# manage the progress of ongoing operations. lvmpolld can be used as
# a native systemd service, which allows it to be started on demand,
# and to use its own control group. When this option is disabled, LVM
# commands will supervise long running operations by forking themselves.
# Applicable only if LVM is compiled with lvmpolld support.
use_lvmpolld = 1
# Configuration option global/notify_dbus.
# Enable D-Bus notification from LVM commands.
# When enabled, an LVM command that changes PVs, changes VG metadata,
# or changes the activation state of an LV will send a notification.
notify_dbus = 1
}
# Configuration section activation.
activation {
# Configuration option activation/checks.
# Perform internal checks of libdevmapper operations.
# Useful for debugging problems with activation. Some of the checks may
# be expensive, so it's best to use this only when there seems to be a
# problem.
checks = 0
# Configuration option activation/udev_sync.
# Use udev notifications to synchronize udev and LVM.
# The --nodevsync option overrides this setting.
# When disabled, LVM commands will not wait for notifications from
# udev, but continue irrespective of any possible udev processing in
# the background. Only use this if udev is not running or has rules
# that ignore the devices LVM creates. If enabled when udev is not
# running, and LVM processes are waiting for udev, run the command
# 'dmsetup udevcomplete_all' to wake them up.
udev_sync = 1
# Configuration option activation/udev_rules.
# Use udev rules to manage LV device nodes and symlinks.
# When disabled, LVM will manage the device nodes and symlinks for
# active LVs itself. Manual intervention may be required if this
# setting is changed while LVs are active.
udev_rules = 1
# Configuration option activation/verify_udev_operations.
# Use extra checks in LVM to verify udev operations.
# This enables additional checks (and if necessary, repairs) on entries
# in the device directory after udev has completed processing its
# events. Useful for diagnosing problems with LVM/udev interactions.
verify_udev_operations = 0
# Configuration option activation/retry_deactivation.
# Retry failed LV deactivation.
# If LV deactivation fails, LVM will retry for a few seconds before
# failing. This may happen because a process run from a quick udev rule
# temporarily opened the device.
retry_deactivation = 1
# Configuration option activation/missing_stripe_filler.
# Method to fill missing stripes when activating an incomplete LV.
# Using 'error' will make inaccessible parts of the device return I/O
# errors on access. Using 'zero' will return success (and zero) on I/O
# You can instead use a device path, in which case,
# that device will be used in place of missing stripes. Using anything
# other than 'error' with mirrored or snapshotted volumes is likely to
# result in data corruption.
# This configuration option is advanced.
missing_stripe_filler = "error"
# Configuration option activation/use_linear_target.
# Use the linear target to optimize single stripe LVs.
# When disabled, the striped target is used. The linear target is an
# optimised version of the striped target that only handles a single
# stripe.
use_linear_target = 1
# Configuration option activation/reserved_stack.
# Stack size in KiB to reserve for use while devices are suspended.
# Insufficent reserve risks I/O deadlock during device suspension.
reserved_stack = 64
# Configuration option activation/reserved_memory.
# Memory size in KiB to reserve for use while devices are suspended.
# Insufficent reserve risks I/O deadlock during device suspension.
reserved_memory = 8192
# Configuration option activation/process_priority.
# Nice value used while devices are suspended.
# Use a high priority so that LVs are suspended
# for the shortest possible time.
process_priority = -18
# Configuration option activation/volume_list.
# Only LVs selected by this list are activated.
# If this list is defined, an LV is only activated if it matches an
# entry in this list. If this list is undefined, it imposes no limits
# on LV activation (all are allowed).
#
# Accepted values:
# vgname
# The VG name is matched exactly and selects all LVs in the VG.
# vgname/lvname
# The VG name and LV name are matched exactly and selects the LV.
# @tag
# Selects an LV if the specified tag matches a tag set on the LV
# or VG.
# @*
# Selects an LV if a tag defined on the host is also set on the LV
# or VG. See tags/hosttags. If any host tags exist but volume_list
# is not defined, a default single-entry list containing '@*'
# is assumed.
#
# Example
# volume_list = [ "vg1", "vg2/lvol1", "@tag1", "@*" ]
#
# This configuration option does not have a default value defined.
# Configuration option activation/auto_activation_volume_list.
# Only LVs selected by this list are auto-activated.
# This list works like volume_list, but it is used only by
# auto-activation commands. It does not apply to direct activation
# commands. If this list is defined, an LV is only auto-activated
# if it matches an entry in this list. If this list is undefined, it
# imposes no limits on LV auto-activation (all are allowed.) If this
# list is defined and empty, i.e. "[]", then no LVs are selected for
# auto-activation. An LV that is selected by this list for
# auto-activation, must also be selected by volume_list (if defined)
# before it is activated. Auto-activation is an activation command that
# includes the 'a' argument: --activate ay or -a ay. The 'a' (auto)
# argument for auto-activation is meant to be used by activation
# commands that are run automatically by the system, as opposed to LVM
# commands run directly by a user. A user may also use the 'a' flag
# directly to perform auto-activation. Also see pvscan(8) for more
# information about auto-activation.
#
# Accepted values:
# vgname
# The VG name is matched exactly and selects all LVs in the VG.
# vgname/lvname
# The VG name and LV name are matched exactly and selects the LV.
# @tag
# Selects an LV if the specified tag matches a tag set on the LV
# or VG.
# @*
# Selects an LV if a tag defined on the host is also set on the LV
# or VG. See tags/hosttags. If any host tags exist but volume_list
# is not defined, a default single-entry list containing '@*'
# is assumed.
#
# Example
# auto_activation_volume_list = [ "vg1", "vg2/lvol1", "@tag1", "@*" ]
#
# This configuration option does not have a default value defined.
# Configuration option activation/read_only_volume_list.
# LVs in this list are activated in read-only mode.
# If this list is defined, each LV that is to be activated is checked
# against this list, and if it matches, it is activated in read-only
# mode. This overrides the permission setting stored in the metadata,
# e.g. from --permission rw.
#
# Accepted values:
# vgname
# The VG name is matched exactly and selects all LVs in the VG.
# vgname/lvname
# The VG name and LV name are matched exactly and selects the LV.
# @tag
# Selects an LV if the specified tag matches a tag set on the LV
# or VG.
# @*
# Selects an LV if a tag defined on the host is also set on the LV
# or VG. See tags/hosttags. If any host tags exist but volume_list
# is not defined, a default single-entry list containing '@*'
# is assumed.
#
# Example
# read_only_volume_list = [ "vg1", "vg2/lvol1", "@tag1", "@*" ]
#
# This configuration option does not have a default value defined.
# Configuration option activation/raid_region_size.
# Size in KiB of each raid or mirror synchronization region.
# The clean/dirty state of data is tracked for each region.
# The value is rounded down to a power of two if necessary, and
# is ignored if it is not a multiple of the machine memory page size.
raid_region_size = 2048
# Configuration option activation/error_when_full.
# Return errors if a thin pool runs out of space.
# The --errorwhenfull option overrides this setting.
# When enabled, writes to thin LVs immediately return an error if the
# thin pool is out of data space. When disabled, writes to thin LVs
# are queued if the thin pool is out of space, and processed when the
# thin pool data space is extended. New thin pools are assigned the
# behavior defined here.
# This configuration option has an automatic default value.
# error_when_full = 0
# Configuration option activation/readahead.
# Setting to use when there is no readahead setting in metadata.
#
# Accepted values:
# none
# Disable readahead.
# auto
# Use default value chosen by kernel.
#
readahead = "auto"
# Configuration option activation/raid_fault_policy.
# Defines how a device failure in a RAID LV is handled.
# This includes LVs that have the following segment types:
# raid1, raid4, raid5*, and raid6*.
# If a device in the LV fails, the policy determines the steps
# performed by dmeventd automatically, and the steps perfomed by the
# manual command lvconvert --repair --use-policies.
# Automatic handling requires dmeventd to be monitoring the LV.
#
# Accepted values:
# warn
# Use the system log to warn the user that a device in the RAID LV
# has failed. It is left to the user to run lvconvert --repair
# manually to remove or replace the failed device. As long as the
# number of failed devices does not exceed the redundancy of the LV
# (1 device for raid4/5, 2 for raid6), the LV will remain usable.
# allocate
# Attempt to use any extra physical volumes in the VG as spares and
# replace faulty devices.
#
raid_fault_policy = "warn"
# Configuration option activation/mirror_image_fault_policy.
# Defines how a device failure in a 'mirror' LV is handled.
# An LV with the 'mirror' segment type is composed of mirror images
# (copies) and a mirror log. A disk log ensures that a mirror LV does
# not need to be re-synced (all copies made the same) every time a
# machine reboots or crashes. If a device in the LV fails, this policy
# determines the steps perfomed by dmeventd automatically, and the steps
# performed by the manual command lvconvert --repair --use-policies.
# Automatic handling requires dmeventd to be monitoring the LV.
#
# Accepted values:
# remove
# Simply remove the faulty device and run without it. If the log
# device fails, the mirror would convert to using an in-memory log.
# This means the mirror will not remember its sync status across
# crashes/reboots and the entire mirror will be re-synced. If a
# mirror image fails, the mirror will convert to a non-mirrored
# device if there is only one remaining good copy.
# allocate
# Remove the faulty device and try to allocate space on a new
# device to be a replacement for the failed device. Using this
# policy for the log is fast and maintains the ability to remember
# sync state through crashes/reboots. Using this policy for a
# mirror device is slow, as it requires the mirror to resynchronize
# the devices, but it will preserve the mirror characteristic of
# the device. This policy acts like 'remove' if no suitable device
# and space can be allocated for the replacement.
# allocate_anywhere
# Not yet implemented. Useful to place the log device temporarily
# on the same physical volume as one of the mirror images. This
# policy is not recommended for mirror devices since it would break
# the redundant nature of the mirror. This policy acts like
# 'remove' if no suitable device and space can be allocated for the
# replacement.
#
mirror_image_fault_policy = "remove"
# Configuration option activation/mirror_log_fault_policy.
# Defines how a device failure in a 'mirror' log LV is handled.
# The mirror_image_fault_policy description for mirrored LVs also
# applies to mirrored log LVs.
mirror_log_fault_policy = "allocate"
# Configuration option activation/snapshot_autoextend_threshold.
# Auto-extend a snapshot when its usage exceeds this percent.
# Setting this to 100 disables automatic extension.
# The minimum value is 50 (a smaller value is treated as 50.)
# Also see snapshot_autoextend_percent.
# Automatic extension requires dmeventd to be monitoring the LV.
#
# Example
# Using 70% autoextend threshold and 20% autoextend size, when a 1G
# snapshot exceeds 700M, it is extended to 1.2G, and when it exceeds
# 840M, it is extended to 1.44G:
# snapshot_autoextend_threshold = 70
#
snapshot_autoextend_threshold = 100
# Configuration option activation/snapshot_autoextend_percent.
# Auto-extending a snapshot adds this percent extra space.
# The amount of additional space added to a snapshot is this
# percent of its current size.
#
# Example
# Using 70% autoextend threshold and 20% autoextend size, when a 1G
# snapshot exceeds 700M, it is extended to 1.2G, and when it exceeds
# 840M, it is extended to 1.44G:
# snapshot_autoextend_percent = 20
#
snapshot_autoextend_percent = 20
# Configuration option activation/thin_pool_autoextend_threshold.
# Auto-extend a thin pool when its usage exceeds this percent.
# Setting this to 100 disables automatic extension.
# The minimum value is 50 (a smaller value is treated as 50.)
# Also see thin_pool_autoextend_percent.
# Automatic extension requires dmeventd to be monitoring the LV.
#
# Example
# Using 70% autoextend threshold and 20% autoextend size, when a 1G
# thin pool exceeds 700M, it is extended to 1.2G, and when it exceeds
# 840M, it is extended to 1.44G:
# thin_pool_autoextend_threshold = 70
#
thin_pool_autoextend_threshold = 100
# Configuration option activation/thin_pool_autoextend_percent.
# Auto-extending a thin pool adds this percent extra space.
# The amount of additional space added to a thin pool is this
# percent of its current size.
#
# Example
# Using 70% autoextend threshold and 20% autoextend size, when a 1G
# thin pool exceeds 700M, it is extended to 1.2G, and when it exceeds
# 840M, it is extended to 1.44G:
# thin_pool_autoextend_percent = 20
#
thin_pool_autoextend_percent = 20
# Configuration option activation/mlock_filter.
# Do not mlock these memory areas.
# While activating devices, I/O to devices being (re)configured is
# suspended. As a precaution against deadlocks, LVM pins memory it is
# using so it is not paged out, and will not require I/O to reread.
# Groups of pages that are known not to be accessed during activation
# do not need to be pinned into memory. Each string listed in this
# setting is compared against each line in /proc/self/maps, and the
# pages corresponding to lines that match are not pinned. On some
# systems, locale-archive was found to make up over 80% of the memory
# used by the process.
#
# Example
# mlock_filter = [ "locale/locale-archive", "gconv/gconv-modules.cache" ]
#
# This configuration option is advanced.
# This configuration option does not have a default value defined.
# Configuration option activation/use_mlockall.
# Use the old behavior of mlockall to pin all memory.
# Prior to version 2.02.62, LVM used mlockall() to pin the whole
# process's memory while activating devices.
use_mlockall = 0
# Configuration option activation/monitoring.
# Monitor LVs that are activated.
# The --ignoremonitoring option overrides this setting.
# When enabled, LVM will ask dmeventd to monitor activated LVs.
monitoring = 1
# Configuration option activation/polling_interval.
# Check pvmove or lvconvert progress at this interval (seconds).
# When pvmove or lvconvert must wait for the kernel to finish
# synchronising or merging data, they check and report progress at
# intervals of this number of seconds. If this is set to 0 and there
# is only one thing to wait for, there are no progress reports, but
# the process is awoken immediately once the operation is complete.
polling_interval = 15
# Configuration option activation/auto_set_activation_skip.
# Set the activation skip flag on new thin snapshot LVs.
# The --setactivationskip option overrides this setting.
# An LV can have a persistent 'activation skip' flag. The flag causes
# the LV to be skipped during normal activation. The lvchange/vgchange
# -K option is required to activate LVs that have the activation skip
# flag set. When this setting is enabled, the activation skip flag is
# set on new thin snapshot LVs.
# This configuration option has an automatic default value.
# auto_set_activation_skip = 1
# Configuration option activation/activation_mode.
# How LVs with missing devices are activated.
# The --activationmode option overrides this setting.
#
# Accepted values:
# complete
# Only allow activation of an LV if all of the Physical Volumes it
# uses are present. Other PVs in the Volume Group may be missing.
# degraded
# Like complete, but additionally RAID LVs of segment type raid1,
# raid4, raid5, radid6 and raid10 will be activated if there is no
# data loss, i.e. they have sufficient redundancy to present the
# entire addressable range of the Logical Volume.
# partial
# Allows the activation of any LV even if a missing or failed PV
# could cause data loss with a portion of the LV inaccessible.
# This setting should not normally be used, but may sometimes
# assist with data recovery.
#
activation_mode = "degraded"
# Configuration option activation/lock_start_list.
# Locking is started only for VGs selected by this list.
# The rules are the same as those for volume_list.
# This configuration option does not have a default value defined.
# Configuration option activation/auto_lock_start_list.
# Locking is auto-started only for VGs selected by this list.
# The rules are the same as those for auto_activation_volume_list.
# This configuration option does not have a default value defined.
}
# Configuration section metadata.
# This configuration section has an automatic default value.
# metadata {
# Configuration option metadata/check_pv_device_sizes.
# Check device sizes are not smaller than corresponding PV sizes.
# If device size is less than corresponding PV size found in metadata,
# there is always a risk of data loss. If this option is set, then LVM
# issues a warning message each time it finds that the device size is
# less than corresponding PV size. You should not disable this unless
# you are absolutely sure about what you are doing!
# This configuration option is advanced.
# This configuration option has an automatic default value.
# check_pv_device_sizes = 1
# Configuration option metadata/record_lvs_history.
# When enabled, LVM keeps history records about removed LVs in
# metadata. The information that is recorded in metadata for
# historical LVs is reduced when compared to original
# information kept in metadata for live LVs. Currently, this
# feature is supported for thin and thin snapshot LVs only.
# This configuration option has an automatic default value.
# record_lvs_history = 0
# Configuration option metadata/lvs_history_retention_time.
# Retention time in seconds after which a record about individual
# historical logical volume is automatically destroyed.
# A value of 0 disables this feature.
# This configuration option has an automatic default value.
# lvs_history_retention_time = 0
# Configuration option metadata/pvmetadatacopies.
# Number of copies of metadata to store on each PV.
# The --pvmetadatacopies option overrides this setting.
#
# Accepted values:
# 2
# Two copies of the VG metadata are stored on the PV, one at the
# front of the PV, and one at the end.
# 1
# One copy of VG metadata is stored at the front of the PV.
# 0
# No copies of VG metadata are stored on the PV. This may be
# useful for VGs containing large numbers of PVs.
#
# This configuration option is advanced.
# This configuration option has an automatic default value.
# pvmetadatacopies = 1
# Configuration option metadata/vgmetadatacopies.
# Number of copies of metadata to maintain for each VG.
# The --vgmetadatacopies option overrides this setting.
# If set to a non-zero value, LVM automatically chooses which of the
# available metadata areas to use to achieve the requested number of
# copies of the VG metadata. If you set a value larger than the the
# total number of metadata areas available, then metadata is stored in
# them all. The value 0 (unmanaged) disables this automatic management
# and allows you to control which metadata areas are used at the
# individual PV level using pvchange --metadataignore y|n.
# This configuration option has an automatic default value.
# vgmetadatacopies = 0
# Configuration option metadata/pvmetadatasize.
# Approximate number of sectors to use for each metadata copy.
# VGs with large numbers of PVs or LVs, or VGs containing complex LV
# structures, may need additional space for VG metadata. The metadata
# areas are treated as circular buffers, so unused space becomes filled
# with an archive of the most recent previous versions of the metadata.
# This configuration option has an automatic default value.
# pvmetadatasize = 255
# Configuration option metadata/pvmetadataignore.
# Ignore metadata areas on a new PV.
# The --metadataignore option overrides this setting.
# If metadata areas on a PV are ignored, LVM will not store metadata
# in them.
# This configuration option is advanced.
# This configuration option has an automatic default value.
# pvmetadataignore = 0
# Configuration option metadata/stripesize.
# This configuration option is advanced.
# This configuration option has an automatic default value.
# stripesize = 64
# Configuration option metadata/dirs.
# Directories holding live copies of text format metadata.
# These directories must not be on logical volumes!
# It's possible to use LVM with a couple of directories here,
# preferably on different (non-LV) filesystems, and with no other
# on-disk metadata (pvmetadatacopies = 0). Or this can be in addition
# to on-disk metadata areas. The feature was originally added to
# simplify testing and is not supported under low memory situations -
# the machine could lock up. Never edit any files in these directories
# by hand unless you are absolutely sure you know what you are doing!
# Use the supplied toolset to make changes (e.g. vgcfgrestore).
#
# Example
# dirs = [ "/etc/lvm/metadata", "/mnt/disk2/lvm/metadata2" ]
#
# This configuration option is advanced.
# This configuration option does not have a default value defined.
# }
# Configuration section report.
# LVM report command output formatting.
# This configuration section has an automatic default value.
# report {
# Configuration option report/output_format.
# Format of LVM command's report output.
# If there is more than one report per command, then the format
# is applied for all reports. You can also change output format
# directly on command line using --reportformat option which
# has precedence over log/output_format setting.
# Accepted values:
# basic
# Original format with columns and rows. If there is more than
# one report per command, each report is prefixed with report's
# name for identification.
# json
# JSON format.
# This configuration option has an automatic default value.
# output_format = "basic"
# Configuration option report/compact_output.
# Do not print empty values for all report fields.
# If enabled, all fields that don't have a value set for any of the
# rows reported are skipped and not printed. Compact output is
# applicable only if report/buffered is enabled. If you need to
# compact only specified fields, use compact_output=0 and define
# report/compact_output_cols configuration setting instead.
# This configuration option has an automatic default value.
# compact_output = 0
# Configuration option report/compact_output_cols.
# Do not print empty values for specified report fields.
# If defined, specified fields that don't have a value set for any
# of the rows reported are skipped and not printed. Compact output
# is applicable only if report/buffered is enabled. If you need to
# compact all fields, use compact_output=1 instead in which case
# the compact_output_cols setting is then ignored.
# This configuration option has an automatic default value.
# compact_output_cols = ""
# Configuration option report/aligned.
# Align columns in report output.
# This configuration option has an automatic default value.
# aligned = 1
# Configuration option report/buffered.
# Buffer report output.
# When buffered reporting is used, the report's content is appended
# incrementally to include each object being reported until the report
# is flushed to output which normally happens at the end of command
# execution. Otherwise, if buffering is not used, each object is
# reported as soon as its processing is finished.
# This configuration option has an automatic default value.
# buffered = 1
# Configuration option report/headings.
# Show headings for columns on report.
# This configuration option has an automatic default value.
# headings = 1
# Configuration option report/separator.
# A separator to use on report after each field.
# This configuration option has an automatic default value.
# separator = " "
# Configuration option report/list_item_separator.
# A separator to use for list items when reported.
# This configuration option has an automatic default value.
# list_item_separator = ","
# Configuration option report/prefixes.
# Use a field name prefix for each field reported.
# This configuration option has an automatic default value.
# prefixes = 0
# Configuration option report/quoted.
# Quote field values when using field name prefixes.
# This configuration option has an automatic default value.
# quoted = 1
# Configuration option report/columns_as_rows.
# Output each column as a row.
# If set, this also implies report/prefixes=1.
# This configuration option has an automatic default value.
# columns_as_rows = 0
# Configuration option report/binary_values_as_numeric.
# Use binary values 0 or 1 instead of descriptive literal values.
# For columns that have exactly two valid values to report
# (not counting the 'unknown' value which denotes that the
# value could not be determined).
# This configuration option has an automatic default value.
# binary_values_as_numeric = 0
# Configuration option report/time_format.
# Set time format for fields reporting time values.
# Format specification is a string which may contain special character
# sequences and ordinary character sequences. Ordinary character
# sequences are copied verbatim. Each special character sequence is
# introduced by the '%' character and such sequence is then
# substituted with a value as described below.
#
# Accepted values:
# %a
# The abbreviated name of the day of the week according to the
# current locale.
# %A
# The full name of the day of the week according to the current
# locale.
# %b
# The abbreviated month name according to the current locale.
# %B
# The full month name according to the current locale.
# %c
# The preferred date and time representation for the current
# locale (alt E)
# %C
# The century number (year/100) as a 2-digit integer. (alt E)
# %d
# The day of the month as a decimal number (range 01 to 31).
# (alt O)
# %D
# Equivalent to %m/%d/%y. (For Americans only. Americans should
# note that in other countries%d/%m/%y is rather common. This
# means that in international context this format is ambiguous and
# should not be used.
# %e
# Like %d, the day of the month as a decimal number, but a leading
# zero is replaced by a space. (alt O)
# %E
# Modifier: use alternative local-dependent representation if
# available.
# %F
# Equivalent to %Y-%m-%d (the ISO 8601 date format).
# %G
# The ISO 8601 week-based year with century as adecimal number.
# The 4-digit year corresponding to the ISO week number (see %V).
# This has the same format and value as %Y, except that if the
# ISO week number belongs to the previous or next year, that year
# is used instead.
# %g
# Like %G, but without century, that is, with a 2-digit year
# (00-99).
# %h
# Equivalent to %b.
# %H
# The hour as a decimal number using a 24-hour clock
# (range 00 to 23). (alt O)
# %I
# The hour as a decimal number using a 12-hour clock
# (range 01 to 12). (alt O)
# %j
# The day of the year as a decimal number (range 001 to 366).
# %k
# The hour (24-hour clock) as a decimal number (range 0 to 23);
# single digits are preceded by a blank. (See also %H.)
# %l
# The hour (12-hour clock) as a decimal number (range 1 to 12);
# single digits are preceded by a blank. (See also %I.)
# %m
# The month as a decimal number (range 01 to 12). (alt O)
# %M
# The minute as a decimal number (range 00 to 59). (alt O)
# %O
# Modifier: use alternative numeric symbols.
# %p
# Either "AM" or "PM" according to the given time value,
# or the corresponding strings for the current locale. Noon is
# treated as "PM" and midnight as "AM".
# %P
# Like %p but in lowercase: "am" or "pm" or a corresponding
# string for the current locale.
# %r
# The time in a.m. or p.m. notation. In the POSIX locale this is
# equivalent to %I:%M:%S %p.
# %R
# The time in 24-hour notation (%H:%M). For a version including
# the seconds, see %T below.
# %s
# The number of seconds since the Epoch,
# 1970-01-01 00:00:00 +0000 (UTC)
# %S
# The second as a decimal number (range 00 to 60). (The range is
# up to 60 to allow for occasional leap seconds.) (alt O)
# %t
# A tab character.
# %T
# The time in 24-hour notation (%H:%M:%S).
# %u
# The day of the week as a decimal, range 1 to 7, Monday being 1.
# See also %w. (alt O)
# %U
# The week number of the current year as a decimal number,
# range 00 to 53, starting with the first Sunday as the first
# day of week 01. See also %V and %W. (alt O)
# %V
# The ISO 8601 week number of the current year as a decimal number,
# range 01 to 53, where week 1 is the first week that has at least
# 4 days in the new year. See also %U and %W. (alt O)
# %w
# The day of the week as a decimal, range 0 to 6, Sunday being 0.
# See also %u. (alt O)
# %W
# The week number of the current year as a decimal number,
# range 00 to 53, starting with the first Monday as the first day
# of week 01. (alt O)
# %x
# The preferred date representation for the current locale without
# the time. (alt E)
# %X
# The preferred time representation for the current locale without
# the date. (alt E)
# %y
# The year as a decimal number without a century (range 00 to 99).
# (alt E, alt O)
# %Y
# The year as a decimal number including the century. (alt E)
# %z
# The +hhmm or -hhmm numeric timezone (that is, the hour and minute
# offset from UTC).
# %Z
# The timezone name or abbreviation.
# %%
# A literal '%' character.
#
# This configuration option has an automatic default value.
# time_format = "%Y-%m-%d %T %z"
# Configuration option report/devtypes_sort.
# List of columns to sort by when reporting 'lvm devtypes' command.
# See 'lvm devtypes -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# devtypes_sort = "devtype_name"
# Configuration option report/devtypes_cols.
# List of columns to report for 'lvm devtypes' command.
# See 'lvm devtypes -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# devtypes_cols = "devtype_name,devtype_max_partitions,devtype_description"
# Configuration option report/devtypes_cols_verbose.
# List of columns to report for 'lvm devtypes' command in verbose mode.
# See 'lvm devtypes -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# devtypes_cols_verbose = "devtype_name,devtype_max_partitions,devtype_description"
# Configuration option report/lvs_sort.
# List of columns to sort by when reporting 'lvs' command.
# See 'lvs -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# lvs_sort = "vg_name,lv_name"
# Configuration option report/lvs_cols.
# List of columns to report for 'lvs' command.
# See 'lvs -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# lvs_cols = "lv_name,vg_name,lv_attr,lv_size,pool_lv,origin,data_percent,metadata_percent,move_pv,mirror_log,copy_percent,convert_lv"
# Configuration option report/lvs_cols_verbose.
# List of columns to report for 'lvs' command in verbose mode.
# See 'lvs -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# lvs_cols_verbose = "lv_name,vg_name,seg_count,lv_attr,lv_size,lv_major,lv_minor,lv_kernel_major,lv_kernel_minor,pool_lv,origin,data_percent,metadata_percent,move_pv,copy_percent,mirror_log,convert_lv,lv_uuid,lv_profile"
# Configuration option report/vgs_sort.
# List of columns to sort by when reporting 'vgs' command.
# See 'vgs -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# vgs_sort = "vg_name"
# Configuration option report/vgs_cols.
# List of columns to report for 'vgs' command.
# See 'vgs -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# vgs_cols = "vg_name,pv_count,lv_count,snap_count,vg_attr,vg_size,vg_free"
# Configuration option report/vgs_cols_verbose.
# List of columns to report for 'vgs' command in verbose mode.
# See 'vgs -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# vgs_cols_verbose = "vg_name,vg_attr,vg_extent_size,pv_count,lv_count,snap_count,vg_size,vg_free,vg_uuid,vg_profile"
# Configuration option report/pvs_sort.
# List of columns to sort by when reporting 'pvs' command.
# See 'pvs -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# pvs_sort = "pv_name"
# Configuration option report/pvs_cols.
# List of columns to report for 'pvs' command.
# See 'pvs -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# pvs_cols = "pv_name,vg_name,pv_fmt,pv_attr,pv_size,pv_free"
# Configuration option report/pvs_cols_verbose.
# List of columns to report for 'pvs' command in verbose mode.
# See 'pvs -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# pvs_cols_verbose = "pv_name,vg_name,pv_fmt,pv_attr,pv_size,pv_free,dev_size,pv_uuid"
# Configuration option report/segs_sort.
# List of columns to sort by when reporting 'lvs --segments' command.
# See 'lvs --segments -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# segs_sort = "vg_name,lv_name,seg_start"
# Configuration option report/segs_cols.
# List of columns to report for 'lvs --segments' command.
# See 'lvs --segments -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# segs_cols = "lv_name,vg_name,lv_attr,stripes,segtype,seg_size"
# Configuration option report/segs_cols_verbose.
# List of columns to report for 'lvs --segments' command in verbose mode.
# See 'lvs --segments -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# segs_cols_verbose = "lv_name,vg_name,lv_attr,seg_start,seg_size,stripes,segtype,stripesize,chunksize"
# Configuration option report/pvsegs_sort.
# List of columns to sort by when reporting 'pvs --segments' command.
# See 'pvs --segments -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# pvsegs_sort = "pv_name,pvseg_start"
# Configuration option report/pvsegs_cols.
# List of columns to sort by when reporting 'pvs --segments' command.
# See 'pvs --segments -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# pvsegs_cols = "pv_name,vg_name,pv_fmt,pv_attr,pv_size,pv_free,pvseg_start,pvseg_size"
# Configuration option report/pvsegs_cols_verbose.
# List of columns to sort by when reporting 'pvs --segments' command in verbose mode.
# See 'pvs --segments -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# pvsegs_cols_verbose = "pv_name,vg_name,pv_fmt,pv_attr,pv_size,pv_free,pvseg_start,pvseg_size,lv_name,seg_start_pe,segtype,seg_pe_ranges"
# Configuration option report/vgs_cols_full.
# List of columns to report for lvm fullreport's 'vgs' subreport.
# See 'vgs -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# vgs_cols_full = "vg_all"
# Configuration option report/pvs_cols_full.
# List of columns to report for lvm fullreport's 'vgs' subreport.
# See 'pvs -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# pvs_cols_full = "pv_all"
# Configuration option report/lvs_cols_full.
# List of columns to report for lvm fullreport's 'lvs' subreport.
# See 'lvs -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# lvs_cols_full = "lv_all"
# Configuration option report/pvsegs_cols_full.
# List of columns to report for lvm fullreport's 'pvseg' subreport.
# See 'pvs --segments -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# pvsegs_cols_full = "pvseg_all,pv_uuid,lv_uuid"
# Configuration option report/segs_cols_full.
# List of columns to report for lvm fullreport's 'seg' subreport.
# See 'lvs --segments -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# segs_cols_full = "seg_all,lv_uuid"
# Configuration option report/vgs_sort_full.
# List of columns to sort by when reporting lvm fullreport's 'vgs' subreport.
# See 'vgs -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# vgs_sort_full = "vg_name"
# Configuration option report/pvs_sort_full.
# List of columns to sort by when reporting lvm fullreport's 'vgs' subreport.
# See 'pvs -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# pvs_sort_full = "pv_name"
# Configuration option report/lvs_sort_full.
# List of columns to sort by when reporting lvm fullreport's 'lvs' subreport.
# See 'lvs -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# lvs_sort_full = "vg_name,lv_name"
# Configuration option report/pvsegs_sort_full.
# List of columns to sort by when reporting for lvm fullreport's 'pvseg' subreport.
# See 'pvs --segments -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# pvsegs_sort_full = "pv_uuid,pvseg_start"
# Configuration option report/segs_sort_full.
# List of columns to sort by when reporting lvm fullreport's 'seg' subreport.
# See 'lvs --segments -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# segs_sort_full = "lv_uuid,seg_start"
# Configuration option report/mark_hidden_devices.
# Use brackets [] to mark hidden devices.
# This configuration option has an automatic default value.
# mark_hidden_devices = 1
# Configuration option report/two_word_unknown_device.
# Use the two words 'unknown device' in place of '[unknown]'.
# This is displayed when the device for a PV is not known.
# This configuration option has an automatic default value.
# two_word_unknown_device = 0
# }
# Configuration section dmeventd.
# Settings for the LVM event daemon.
dmeventd {
# Configuration option dmeventd/mirror_library.
# The library dmeventd uses when monitoring a mirror device.
# libdevmapper-event-lvm2mirror.so attempts to recover from
# failures. It removes failed devices from a volume group and
# reconfigures a mirror as necessary. If no mirror library is
# provided, mirrors are not monitored through dmeventd.
mirror_library = "libdevmapper-event-lvm2mirror.so"
# Configuration option dmeventd/raid_library.
# This configuration option has an automatic default value.
# raid_library = "libdevmapper-event-lvm2raid.so"
# Configuration option dmeventd/snapshot_library.
# The library dmeventd uses when monitoring a snapshot device.
# libdevmapper-event-lvm2snapshot.so monitors the filling of snapshots
# and emits a warning through syslog when the usage exceeds 80%. The
# warning is repeated when 85%, 90% and 95% of the snapshot is filled.
snapshot_library = "libdevmapper-event-lvm2snapshot.so"
# Configuration option dmeventd/thin_library.
# The library dmeventd uses when monitoring a thin device.
# libdevmapper-event-lvm2thin.so monitors the filling of a pool
# and emits a warning through syslog when the usage exceeds 80%. The
# warning is repeated when 85%, 90% and 95% of the pool is filled.
thin_library = "libdevmapper-event-lvm2thin.so"
# Configuration option dmeventd/thin_command.
# The plugin runs command with each 5% increment when thin-pool data volume
# or metadata volume gets above 50%.
# Command which starts with 'lvm ' prefix is internal lvm command.
# You can write your own handler to customise behaviour in more details.
# User handler is specified with the full path starting with '/'.
# This configuration option has an automatic default value.
# thin_command = "lvm lvextend --use-policies"
# Configuration option dmeventd/executable.
# The full path to the dmeventd binary.
# This configuration option has an automatic default value.
# executable = "/usr/sbin/dmeventd"
}
# Configuration section tags.
# Host tag settings.
# This configuration section has an automatic default value.
# tags {
# Configuration option tags/hosttags.
# Create a host tag using the machine name.
# The machine name is nodename returned by uname(2).
# This configuration option has an automatic default value.
# hosttags = 0
# Configuration section tags/.
# Replace this subsection name with a custom tag name.
# Multiple subsections like this can be created. The '@' prefix for
# tags is optional. This subsection can contain host_list, which is a
# list of machine names. If the name of the local machine is found in
# host_list, then the name of this subsection is used as a tag and is
# applied to the local machine as a 'host tag'. If this subsection is
# empty (has no host_list), then the subsection name is always applied
# as a 'host tag'.
#
# Example
# The host tag foo is given to all hosts, and the host tag
# bar is given to the hosts named machine1 and machine2.
# tags { foo { } bar { host_list = [ "machine1", "machine2" ] } }
#
# This configuration section has variable name.
# This configuration section has an automatic default value.
# tag {
# Configuration option tags//host_list.
# A list of machine names.
# These machine names are compared to the nodename returned
# by uname(2). If the local machine name matches an entry in
# this list, the name of the subsection is applied to the
# machine as a 'host tag'.
# This configuration option does not have a default value defined.
# }
# }
kiwi-boxed-plugin-0.2.31/boxes/fedora/root/etc/selinux/ 0000775 0000000 0000000 00000000000 14516463774 0022761 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/fedora/root/etc/selinux/config 0000664 0000000 0000000 00000000046 14516463774 0024151 0 ustar 00root root 0000000 0000000 SELINUX=disabled
SELINUXTYPE=targeted
kiwi-boxed-plugin-0.2.31/boxes/fedora/root/etc/sysconfig/ 0000775 0000000 0000000 00000000000 14516463774 0023276 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/fedora/root/etc/sysconfig/network-scripts/ 0000775 0000000 0000000 00000000000 14516463774 0026454 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/fedora/root/etc/sysconfig/network-scripts/ifcfg-lan0 0000664 0000000 0000000 00000000126 14516463774 0030304 0 ustar 00root root 0000000 0000000 DEVICE="lan0"
BOOTPROTO="dhcp"
ONBOOT="yes"
TYPE="Ethernet"
PERSISTENT_DHCLIENT="yes"
kiwi-boxed-plugin-0.2.31/boxes/fedora/root/etc/systemd/ 0000775 0000000 0000000 00000000000 14516463774 0022762 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/fedora/root/etc/systemd/system/ 0000775 0000000 0000000 00000000000 14516463774 0024306 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/fedora/root/etc/systemd/system/serial-getty@hvc0.service.d/ 0000775 0000000 0000000 00000000000 14516463774 0031461 5 ustar 00root root 0000000 0000000 override.conf 0000664 0000000 0000000 00000000161 14516463774 0034066 0 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/fedora/root/etc/systemd/system/serial-getty@hvc0.service.d [Service]
ExecStart=
ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud 115200,38400,9600 hvc0 $TERM
kiwi-boxed-plugin-0.2.31/boxes/fedora/root/etc/systemd/system/serial-getty@ttyS0.service.d/ 0000775 0000000 0000000 00000000000 14516463774 0031644 5 ustar 00root root 0000000 0000000 override.conf 0000664 0000000 0000000 00000000162 14516463774 0034252 0 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/fedora/root/etc/systemd/system/serial-getty@ttyS0.service.d [Service]
ExecStart=
ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud 115200,38400,9600 ttyS0 $TERM
kiwi-boxed-plugin-0.2.31/boxes/fedora/root/etc/udev/ 0000775 0000000 0000000 00000000000 14516463774 0022235 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/fedora/root/etc/udev/rules.d/ 0000775 0000000 0000000 00000000000 14516463774 0023611 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/fedora/root/etc/udev/rules.d/70-persistent-net.rules 0000664 0000000 0000000 00000000205 14516463774 0030072 0 ustar 00root root 0000000 0000000 SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="?*", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="?*", NAME="lan0"
kiwi-boxed-plugin-0.2.31/boxes/fedora/root/usr/ 0000775 0000000 0000000 00000000000 14516463774 0021330 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/fedora/root/usr/lib/ 0000775 0000000 0000000 00000000000 14516463774 0022076 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/fedora/root/usr/lib/systemd/ 0000775 0000000 0000000 00000000000 14516463774 0023566 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/fedora/root/usr/lib/systemd/system/ 0000775 0000000 0000000 00000000000 14516463774 0025112 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/fedora/root/usr/lib/systemd/system/kiwi.service 0000664 0000000 0000000 00000000263 14516463774 0027440 0 ustar 00root root 0000000 0000000 [Unit]
Description=Start kiwi build process
After=network.target
Requires=network-online.target
[Service]
ExecStart=/usr/local/bin/run_kiwi
[Install]
WantedBy=multi-user.target
kiwi-boxed-plugin-0.2.31/boxes/fedora/root/usr/local/ 0000775 0000000 0000000 00000000000 14516463774 0022422 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/fedora/root/usr/local/bin/ 0000775 0000000 0000000 00000000000 14516463774 0023172 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/fedora/root/usr/local/bin/gfxboot 0000775 0000000 0000000 00000000024 14516463774 0024564 0 ustar 00root root 0000000 0000000 #!/bin/bash
exit 0
kiwi-boxed-plugin-0.2.31/boxes/images.sh 0000775 0000000 0000000 00000012472 14516463774 0020106 0 ustar 00root root 0000000 0000000 #!/bin/bash
run_kiwi=/usr/local/bin/run_kiwi
tail -n +9 "$0" >"${run_kiwi}" && chmod 755 "${run_kiwi}"
exit $?
# The code of interest starts here
#!/bin/bash
set -x
exec &>/dev/console
function run_build {
# """
# Run kiwi and the bundler
# """
local options
local logfile=/bundle/result.log
local exit_code_file=/bundle/result.code
if type setenforce &>/dev/null; then
# for SELinux managed systems the enforcing rule
# set does not allow to e.g create a new rpm database.
# Also other restrictions drives us crazy when building
# images. Therefore in the boxes we don't need this
# sort of security
setenforce 0
fi
echo 1 > "${exit_code_file}"
rm -rf /result
options=$(cut -f2 -d\" /proc/cmdline)
options="${options} --description /description --target-dir /result"
if kiwi-ng --logfile "${logfile}" ${options}; then
kiwi-ng result bundle --id 0 --target-dir /result --bundle-dir /bundle
fi
echo $? > "${exit_code_file}"
}
function wait_network {
# """
# even though this program is called in a systemd unit that
# requires the network-online target there could be a delay
# in the network online status between the host and the guest.
# This means the guest could be online while the host/guest
# network negotiation is still not done.
# """
local sleep_timeout=2
local retry_count=5
local check=0
echo "Waiting for link up on lan0..."
while true;do
if ip link ls lan0 | grep -qi "state UP"; then
# interface link is up
break
fi
if [ "${check}" -eq "${retry_count}" ];then
# interface link did not came up
exit 1
fi
echo "Waiting for link up on lan0..."
check=$((check + 1))
sleep "${sleep_timeout}"
done
}
function mount_shared_path {
# """
# mount shared host path identified by given mount tag
# """
local path=$1
local tag=$2
local ssh_host_path
declare sharing_backend=${sharing_backend}
declare host_kiwidescription=${host_kiwidescription}
declare host_kiwibundle=${host_kiwibundle}
declare host_custompath=${host_custompath}
if mountpoint -q "${path}"; then
return
fi
mkdir -p "${path}"
if [ "${sharing_backend}" = "virtiofs" ];then
mount -t virtiofs "${tag}" "${path}"
elif [ "${sharing_backend}" = "sshfs" ];then
# The kiwi boxbuild code forwards the host ssh port
# here to port HOST_SSH_PORT_FORWARDED_TO_BOX(10000)
if waitport 10000; then
if [ "${tag}" = "kiwidescription" ];then
ssh_host_path=${host_kiwidescription}
fi
if [ "${tag}" = "kiwibundle" ];then
ssh_host_path=${host_kiwibundle}
fi
if [ "${tag}" = "custompath" ];then
ssh_host_path=${host_custompath}
fi
# Without the box pubkey added to the authorized_keys
# file on the host, the following call will be
# interactively asking for credentials.
while ! sshfs -p 10000 \
-o "idmap=user" \
-o "StrictHostKeyChecking=accept-new" \
"${ssh_host_path}" "${path}"; do
sleep 2
done
fi
else
mount -t 9p -o "trans=virtio,version=9p2000.L" "${tag}" "${path}"
fi
}
function import_box_overlay_files {
# """
# Import optional boxroot overlay tree into box system
# Also make sure there is .gnupg directory for the root
# user created
# """
if [ -d /description/boxroot ];then
rsync -zav /description/boxroot/ /
fi
# make sure it's possible to create a GPG keyring
# used for apt repo keys as an example
mkdir -p /root/.gnupg
chmod 700 /root/.gnupg
}
function import_box_environment {
# """
# Import optional etc/boxprofile into runtime environment
# """
if [ -e /etc/boxprofile ];then
source /etc/boxprofile
fi
}
function import_box_variables {
# """
# Box variables are those which uses the =_*_ notation
# """
# shellcheck disable=SC2002,SC2046
eval export $(
cat /proc/cmdline | \
tr " " "\n" | grep "=_" | sed -e "s@=_@=@" | sed -e "s@_\$@@"
)
}
function import_ssh_pub_key {
declare ssh_key=${ssh_key}
declare ssh_key_type=${ssh_key_type}
if [ -n "${ssh_key}" ];then
mkdir -p /root/.ssh
echo "${ssh_key_type} ${ssh_key}" >> /root/.ssh/authorized_keys
chmod 600 /root/.ssh/authorized_keys
fi
}
function waitport {
while ! nc -z localhost $1 ; do sleep 1 ; done
}
function finish {
if ! grep -q kiwi-no-halt /proc/cmdline; then
halt -p
fi
}
# main
declare custom_mount=${custom_mount}
declare kiwi_version=${kiwi_version}
trap finish EXIT
import_box_variables
import_ssh_pub_key
wait_network
if ! mount_shared_path "/description" "kiwidescription"; then
exit 1
fi
if ! mount_shared_path "/bundle" "kiwibundle"; then
exit 1
fi
if [ -n "${custom_mount}" ]; then
if ! mount_shared_path "${custom_mount}" "custompath"; then
exit 1
fi
fi
import_box_overlay_files
import_box_environment
if [ -n "${kiwi_version}" ]; then
if ! pip3 install kiwi=="${kiwi_version}"; then
exit 1
fi
fi
run_build
kiwi-boxed-plugin-0.2.31/boxes/leap/ 0000775 0000000 0000000 00000000000 14516463774 0017215 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/leap/appliance.kiwi 0000664 0000000 0000000 00000006704 14516463774 0022045 0 ustar 00root root 0000000 0000000
Marcus Schäferms@suse.comSUSE Leap VM for kiwi boxed build1.15.4zypperen_USusUTCtruefalsefalse50
kiwi-boxed-plugin-0.2.31/boxes/leap/config.sh 0000664 0000000 0000000 00000002017 14516463774 0021016 0 ustar 00root root 0000000 0000000 #!/bin/bash
test -f /.kconfig && . /.kconfig
test -f /.profile && . /.profile
#======================================
# Setup baseproduct link
#--------------------------------------
suseSetupProduct
#======================================
# Setup default target, multi-user
#--------------------------------------
baseSetRunlevel 3
#==================================
# Disable services
#----------------------------------
systemctl mask systemd-logind.service
systemctl mask systemd-update-utmp.service
systemctl mask auditd.service
systemctl mask systemd-update-utmp-runlevel.service
systemctl mask systemd-user-sessions.service
#======================================
# Activate kiwi service
#--------------------------------------
suseInsertService sshd
suseInsertService kiwi
#======================================
# lvmetad sucks for building lvm images
#--------------------------------------
systemctl disable lvm2-lvmetad
systemctl mask lvm2-lvmetad
systemctl disable lvm2-lvmetad.socket
systemctl mask lvm2-lvmetad.socket
kiwi-boxed-plugin-0.2.31/boxes/leap/root/ 0000775 0000000 0000000 00000000000 14516463774 0020200 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/leap/root/etc/ 0000775 0000000 0000000 00000000000 14516463774 0020753 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/leap/root/etc/fstab.script 0000775 0000000 0000000 00000000077 14516463774 0023307 0 ustar 00root root 0000000 0000000 #!/bin/bash
echo "/dev/vda1 / ext2 defaults 0 0" > /etc/fstab
kiwi-boxed-plugin-0.2.31/boxes/leap/root/etc/lvm/ 0000775 0000000 0000000 00000000000 14516463774 0021551 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/leap/root/etc/lvm/lvm.conf 0000664 0000000 0000000 00000270545 14516463774 0023233 0 ustar 00root root 0000000 0000000 # This is an example configuration file for the LVM2 system.
# It contains the default settings that would be used if there was no
# /etc/lvm/lvm.conf file.
#
# Refer to 'man lvm.conf' for further information including the file layout.
#
# Refer to 'man lvm.conf' for information about how settings configured in
# this file are combined with built-in values and command line options to
# arrive at the final values used by LVM.
#
# Refer to 'man lvmconfig' for information about displaying the built-in
# and configured values used by LVM.
#
# If a default value is set in this file (not commented out), then a
# new version of LVM using this file will continue using that value,
# even if the new version of LVM changes the built-in default value.
#
# To put this file in a different directory and override /etc/lvm set
# the environment variable LVM_SYSTEM_DIR before running the tools.
#
# N.B. Take care that each setting only appears once if uncommenting
# example settings in this file.
#hello
# Configuration section config.
# How LVM configuration settings are handled.
config {
# Configuration option config/checks.
# If enabled, any LVM configuration mismatch is reported.
# This implies checking that the configuration key is understood by
# LVM and that the value of the key is the proper type. If disabled,
# any configuration mismatch is ignored and the default value is used
# without any warning (a message about the configuration key not being
# found is issued in verbose mode only).
checks = 1
# Configuration option config/abort_on_errors.
# Abort the LVM process if a configuration mismatch is found.
abort_on_errors = 0
# Configuration option config/profile_dir.
# Directory where LVM looks for configuration profiles.
profile_dir = "/etc/lvm/profile"
}
# Configuration section devices.
# How LVM uses block devices.
devices {
# Configuration option devices/dir.
# Directory in which to create volume group device nodes.
# Commands also accept this as a prefix on volume group names.
# This configuration option is advanced.
dir = "/dev"
# Configuration option devices/scan.
# Directories containing device nodes to use with LVM.
# This configuration option is advanced.
scan = [ "/dev" ]
# Configuration option devices/obtain_device_list_from_udev.
# Obtain the list of available devices from udev.
# This avoids opening or using any inapplicable non-block devices or
# subdirectories found in the udev directory. Any device node or
# symlink not managed by udev in the udev directory is ignored. This
# setting applies only to the udev-managed device directory; other
# directories will be scanned fully. LVM needs to be compiled with
# udev support for this setting to apply.
obtain_device_list_from_udev = 1
# Configuration option devices/external_device_info_source.
# Select an external device information source.
# Some information may already be available in the system and LVM can
# use this information to determine the exact type or use of devices it
# processes. Using an existing external device information source can
# speed up device processing as LVM does not need to run its own native
# routines to acquire this information. For example, this information
# is used to drive LVM filtering like MD component detection, multipath
# component detection, partition detection and others.
#
# Accepted values:
# none
# No external device information source is used.
# udev
# Reuse existing udev database records. Applicable only if LVM is
# compiled with udev support.
#
external_device_info_source = "none"
# Configuration option devices/preferred_names.
# Select which path name to display for a block device.
# If multiple path names exist for a block device, and LVM needs to
# display a name for the device, the path names are matched against
# each item in this list of regular expressions. The first match is
# used. Try to avoid using undescriptive /dev/dm-N names, if present.
# If no preferred name matches, or if preferred_names are not defined,
# the following built-in preferences are applied in order until one
# produces a preferred name:
# Prefer names with path prefixes in the order of:
# /dev/mapper, /dev/disk, /dev/dm-*, /dev/block.
# Prefer the name with the least number of slashes.
# Prefer a name that is a symlink.
# Prefer the path with least value in lexicographical order.
#
# Example
# preferred_names = [ "^/dev/mpath/", "^/dev/mapper/mpath", "^/dev/[hs]d" ]
#
preferred_names = [ "^/dev/mpath/", "^/dev/mapper/mpath", "^/dev/[hs]d" ]
# Configuration option devices/filter.
# Limit the block devices that are used by LVM commands.
# This is a list of regular expressions used to accept or reject block
# device path names. Each regex is delimited by a vertical bar '|'
# (or any character) and is preceded by 'a' to accept the path, or
# by 'r' to reject the path. The first regex in the list to match the
# path is used, producing the 'a' or 'r' result for the device.
# When multiple path names exist for a block device, if any path name
# matches an 'a' pattern before an 'r' pattern, then the device is
# accepted. If all the path names match an 'r' pattern first, then the
# device is rejected. Unmatching path names do not affect the accept
# or reject decision. If no path names for a device match a pattern,
# then the device is accepted. Be careful mixing 'a' and 'r' patterns,
# as the combination might produce unexpected results (test changes.)
# Run vgscan after changing the filter to regenerate the cache.
# See the use_lvmetad comment for a special case regarding filters.
#
# Example
# Accept every block device:
# filter = [ "a|.*/|" ]
# Reject the cdrom drive:
# filter = [ "r|/dev/cdrom|" ]
# Work with just loopback devices, e.g. for testing:
# filter = [ "a|loop|", "r|.*|" ]
# Accept all loop devices and ide drives except hdc:
# filter = [ "a|loop|", "r|/dev/hdc|", "a|/dev/ide|", "r|.*|" ]
# Use anchors to be very specific:
# filter = [ "a|^/dev/hda8$|", "r|.*/|" ]
#
# This configuration option has an automatic default value.
# filter = [ "a|.*/|" ]
filter = [ "r|/dev/.*/by-path/.*|", "r|/dev/.*/by-id/.*|", "r|/dev/fd.*|", "r|/dev/cdrom|", "a/.*/" ]
# Configuration option devices/global_filter.
# Limit the block devices that are used by LVM system components.
# Because devices/filter may be overridden from the command line, it is
# not suitable for system-wide device filtering, e.g. udev and lvmetad.
# Use global_filter to hide devices from these LVM system components.
# The syntax is the same as devices/filter. Devices rejected by
# global_filter are not opened by LVM.
# This configuration option has an automatic default value.
# global_filter = [ "a|.*/|" ]
# Configuration option devices/cache_dir.
# Directory in which to store the device cache file.
# The results of filtering are cached on disk to avoid rescanning dud
# devices (which can take a very long time). By default this cache is
# stored in a file named .cache. It is safe to delete this file; the
# tools regenerate it. If obtain_device_list_from_udev is enabled, the
# list of devices is obtained from udev and any existing .cache file
# is removed.
cache_dir = "/etc/lvm/cache"
# Configuration option devices/cache_file_prefix.
# A prefix used before the .cache file name. See devices/cache_dir.
cache_file_prefix = ""
# Configuration option devices/write_cache_state.
# Enable/disable writing the cache file. See devices/cache_dir.
write_cache_state = 1
# Configuration option devices/types.
# List of additional acceptable block device types.
# These are of device type names from /proc/devices, followed by the
# maximum number of partitions.
#
# Example
# types = [ "fd", 16 ]
#
# This configuration option is advanced.
# This configuration option does not have a default value defined.
# Configuration option devices/sysfs_scan.
# Restrict device scanning to block devices appearing in sysfs.
# This is a quick way of filtering out block devices that are not
# present on the system. sysfs must be part of the kernel and mounted.)
sysfs_scan = 1
# Configuration option devices/multipath_component_detection.
# Ignore devices that are components of DM multipath devices.
multipath_component_detection = 1
# Configuration option devices/md_component_detection.
# Ignore devices that are components of software RAID (md) devices.
md_component_detection = 1
# Configuration option devices/fw_raid_component_detection.
# Ignore devices that are components of firmware RAID devices.
# LVM must use an external_device_info_source other than none for this
# detection to execute.
fw_raid_component_detection = 0
# Configuration option devices/md_chunk_alignment.
# Align PV data blocks with md device's stripe-width.
# This applies if a PV is placed directly on an md device.
md_chunk_alignment = 1
# Configuration option devices/default_data_alignment.
# Default alignment of the start of a PV data area in MB.
# If set to 0, a value of 64KiB will be used.
# Set to 1 for 1MiB, 2 for 2MiB, etc.
# This configuration option has an automatic default value.
# default_data_alignment = 1
# Configuration option devices/data_alignment_detection.
# Detect PV data alignment based on sysfs device information.
# The start of a PV data area will be a multiple of minimum_io_size or
# optimal_io_size exposed in sysfs. minimum_io_size is the smallest
# request the device can perform without incurring a read-modify-write
# penalty, e.g. MD chunk size. optimal_io_size is the device's
# preferred unit of receiving I/O, e.g. MD stripe width.
# minimum_io_size is used if optimal_io_size is undefined (0).
# If md_chunk_alignment is enabled, that detects the optimal_io_size.
# This setting takes precedence over md_chunk_alignment.
data_alignment_detection = 1
# Configuration option devices/data_alignment.
# Alignment of the start of a PV data area in KiB.
# If a PV is placed directly on an md device and md_chunk_alignment or
# data_alignment_detection are enabled, then this setting is ignored.
# Otherwise, md_chunk_alignment and data_alignment_detection are
# disabled if this is set. Set to 0 to use the default alignment or the
# page size, if larger.
data_alignment = 0
# Configuration option devices/data_alignment_offset_detection.
# Detect PV data alignment offset based on sysfs device information.
# The start of a PV aligned data area will be shifted by the
# alignment_offset exposed in sysfs. This offset is often 0, but may
# be non-zero. Certain 4KiB sector drives that compensate for windows
# partitioning will have an alignment_offset of 3584 bytes (sector 7
# is the lowest aligned logical block, the 4KiB sectors start at
# LBA -1, and consequently sector 63 is aligned on a 4KiB boundary).
# pvcreate --dataalignmentoffset will skip this detection.
data_alignment_offset_detection = 1
# Configuration option devices/ignore_suspended_devices.
# Ignore DM devices that have I/O suspended while scanning devices.
# Otherwise, LVM waits for a suspended device to become accessible.
# This should only be needed in recovery situations.
ignore_suspended_devices = 0
# Configuration option devices/ignore_lvm_mirrors.
# Do not scan 'mirror' LVs to avoid possible deadlocks.
# This avoids possible deadlocks when using the 'mirror' segment type.
# This setting determines whether LVs using the 'mirror' segment type
# are scanned for LVM labels. This affects the ability of mirrors to
# be used as physical volumes. If this setting is enabled, it is
# impossible to create VGs on top of mirror LVs, i.e. to stack VGs on
# mirror LVs. If this setting is disabled, allowing mirror LVs to be
# scanned, it may cause LVM processes and I/O to the mirror to become
# blocked. This is due to the way that the mirror segment type handles
# failures. In order for the hang to occur, an LVM command must be run
# just after a failure and before the automatic LVM repair process
# takes place, or there must be failures in multiple mirrors in the
# same VG at the same time with write failures occurring moments before
# a scan of the mirror's labels. The 'mirror' scanning problems do not
# apply to LVM RAID types like 'raid1' which handle failures in a
# different way, making them a better choice for VG stacking.
ignore_lvm_mirrors = 1
# Configuration option devices/disable_after_error_count.
# Number of I/O errors after which a device is skipped.
# During each LVM operation, errors received from each device are
# counted. If the counter of a device exceeds the limit set here,
# no further I/O is sent to that device for the remainder of the
# operation. Setting this to 0 disables the counters altogether.
disable_after_error_count = 0
# Configuration option devices/require_restorefile_with_uuid.
# Allow use of pvcreate --uuid without requiring --restorefile.
require_restorefile_with_uuid = 1
# Configuration option devices/pv_min_size.
# Minimum size in KiB of block devices which can be used as PVs.
# In a clustered environment all nodes must use the same value.
# Any value smaller than 512KiB is ignored. The previous built-in
# value was 512.
pv_min_size = 2048
# Configuration option devices/issue_discards.
# Issue discards to PVs that are no longer used by an LV.
# Discards are sent to an LV's underlying physical volumes when the LV
# is no longer using the physical volumes' space, e.g. lvremove,
# lvreduce. Discards inform the storage that a region is no longer
# used. Storage that supports discards advertise the protocol-specific
# way discards should be issued by the kernel (TRIM, UNMAP, or
# WRITE SAME with UNMAP bit set). Not all storage will support or
# benefit from discards, but SSDs and thinly provisioned LUNs
# generally do. If enabled, discards will only be issued if both the
# storage and kernel provide support.
issue_discards = 0
# Configuration option devices/allow_changes_with_duplicate_pvs.
# Allow VG modification while a PV appears on multiple devices.
# When a PV appears on multiple devices, LVM attempts to choose the
# best device to use for the PV. If the devices represent the same
# underlying storage, the choice has minimal consequence. If the
# devices represent different underlying storage, the wrong choice
# can result in data loss if the VG is modified. Disabling this
# setting is the safest option because it prevents modifying a VG
# or activating LVs in it while a PV appears on multiple devices.
# Enabling this setting allows the VG to be used as usual even with
# uncertain devices.
allow_changes_with_duplicate_pvs = 0
}
# Configuration section allocation.
# How LVM selects space and applies properties to LVs.
allocation {
# Configuration option allocation/cling_tag_list.
# Advise LVM which PVs to use when searching for new space.
# When searching for free space to extend an LV, the 'cling' allocation
# policy will choose space on the same PVs as the last segment of the
# existing LV. If there is insufficient space and a list of tags is
# defined here, it will check whether any of them are attached to the
# PVs concerned and then seek to match those PV tags between existing
# extents and new extents.
#
# Example
# Use the special tag "@*" as a wildcard to match any PV tag:
# cling_tag_list = [ "@*" ]
# LVs are mirrored between two sites within a single VG, and
# PVs are tagged with either @site1 or @site2 to indicate where
# they are situated:
# cling_tag_list = [ "@site1", "@site2" ]
#
# This configuration option does not have a default value defined.
# Configuration option allocation/maximise_cling.
# Use a previous allocation algorithm.
# Changes made in version 2.02.85 extended the reach of the 'cling'
# policies to detect more situations where data can be grouped onto
# the same disks. This setting can be used to disable the changes
# and revert to the previous algorithm.
maximise_cling = 1
# Configuration option allocation/use_blkid_wiping.
# Use blkid to detect existing signatures on new PVs and LVs.
# The blkid library can detect more signatures than the native LVM
# detection code, but may take longer. LVM needs to be compiled with
# blkid wiping support for this setting to apply. LVM native detection
# code is currently able to recognize: MD device signatures,
# swap signature, and LUKS signatures. To see the list of signatures
# recognized by blkid, check the output of the 'blkid -k' command.
use_blkid_wiping = 1
# Configuration option allocation/wipe_signatures_when_zeroing_new_lvs.
# Look for and erase any signatures while zeroing a new LV.
# The --wipesignatures option overrides this setting.
# Zeroing is controlled by the -Z/--zero option, and if not specified,
# zeroing is used by default if possible. Zeroing simply overwrites the
# first 4KiB of a new LV with zeroes and does no signature detection or
# wiping. Signature wiping goes beyond zeroing and detects exact types
# and positions of signatures within the whole LV. It provides a
# cleaner LV after creation as all known signatures are wiped. The LV
# is not claimed incorrectly by other tools because of old signatures
# from previous use. The number of signatures that LVM can detect
# depends on the detection code that is selected (see
# use_blkid_wiping.) Wiping each detected signature must be confirmed.
# When this setting is disabled, signatures on new LVs are not detected
# or erased unless the --wipesignatures option is used directly.
wipe_signatures_when_zeroing_new_lvs = 1
# Configuration option allocation/mirror_logs_require_separate_pvs.
# Mirror logs and images will always use different PVs.
# The default setting changed in version 2.02.85.
mirror_logs_require_separate_pvs = 0
# Configuration option allocation/raid_stripe_all_devices.
# Stripe across all PVs when RAID stripes are not specified.
# If enabled, all PVs in the VG or on the command line are used for
# raid0/4/5/6/10 when the command does not specify the number of
# stripes to use.
# This was the default behaviour until release 2.02.162.
# This configuration option has an automatic default value.
# raid_stripe_all_devices = 0
# Configuration option allocation/cache_pool_metadata_require_separate_pvs.
# Cache pool metadata and data will always use different PVs.
cache_pool_metadata_require_separate_pvs = 0
# Configuration option allocation/cache_metadata_format.
# Sets default metadata format for new cache.
#
# Accepted values:
# 0 Automatically detected best available format
# 1 Original format
# 2 Improved 2nd. generation format
#
# This configuration option has an automatic default value.
# cache_metadata_format = 0
# Configuration option allocation/cache_mode.
# The default cache mode used for new cache.
#
# Accepted values:
# writethrough
# Data blocks are immediately written from the cache to disk.
# writeback
# Data blocks are written from the cache back to disk after some
# delay to improve performance.
#
# This setting replaces allocation/cache_pool_cachemode.
# This configuration option has an automatic default value.
# cache_mode = "writethrough"
# Configuration option allocation/cache_policy.
# The default cache policy used for new cache volume.
# Since kernel 4.2 the default policy is smq (Stochastic multiqueue),
# otherwise the older mq (Multiqueue) policy is selected.
# This configuration option does not have a default value defined.
# Configuration section allocation/cache_settings.
# Settings for the cache policy.
# See documentation for individual cache policies for more info.
# This configuration section has an automatic default value.
# cache_settings {
# }
# Configuration option allocation/cache_pool_chunk_size.
# The minimal chunk size in KiB for cache pool volumes.
# Using a chunk_size that is too large can result in wasteful use of
# the cache, where small reads and writes can cause large sections of
# an LV to be mapped into the cache. However, choosing a chunk_size
# that is too small can result in more overhead trying to manage the
# numerous chunks that become mapped into the cache. The former is
# more of a problem than the latter in most cases, so the default is
# on the smaller end of the spectrum. Supported values range from
# 32KiB to 1GiB in multiples of 32.
# This configuration option does not have a default value defined.
# Configuration option allocation/cache_pool_max_chunks.
# The maximum number of chunks in a cache pool.
# For cache target v1.9 the recommended maximumm is 1000000 chunks.
# Using cache pool with more chunks may degrade cache performance.
# This configuration option does not have a default value defined.
# Configuration option allocation/thin_pool_metadata_require_separate_pvs.
# Thin pool metdata and data will always use different PVs.
thin_pool_metadata_require_separate_pvs = 0
# Configuration option allocation/thin_pool_zero.
# Thin pool data chunks are zeroed before they are first used.
# Zeroing with a larger thin pool chunk size reduces performance.
# This configuration option has an automatic default value.
# thin_pool_zero = 1
# Configuration option allocation/thin_pool_discards.
# The discards behaviour of thin pool volumes.
#
# Accepted values:
# ignore
# nopassdown
# passdown
#
# This configuration option has an automatic default value.
# thin_pool_discards = "passdown"
# Configuration option allocation/thin_pool_chunk_size_policy.
# The chunk size calculation policy for thin pool volumes.
#
# Accepted values:
# generic
# If thin_pool_chunk_size is defined, use it. Otherwise, calculate
# the chunk size based on estimation and device hints exposed in
# sysfs - the minimum_io_size. The chunk size is always at least
# 64KiB.
# performance
# If thin_pool_chunk_size is defined, use it. Otherwise, calculate
# the chunk size for performance based on device hints exposed in
# sysfs - the optimal_io_size. The chunk size is always at least
# 512KiB.
#
# This configuration option has an automatic default value.
# thin_pool_chunk_size_policy = "generic"
# Configuration option allocation/thin_pool_chunk_size.
# The minimal chunk size in KiB for thin pool volumes.
# Larger chunk sizes may improve performance for plain thin volumes,
# however using them for snapshot volumes is less efficient, as it
# consumes more space and takes extra time for copying. When unset,
# lvm tries to estimate chunk size starting from 64KiB. Supported
# values are in the range 64KiB to 1GiB.
# This configuration option does not have a default value defined.
# Configuration option allocation/physical_extent_size.
# Default physical extent size in KiB to use for new VGs.
# This configuration option has an automatic default value.
# physical_extent_size = 4096
}
# Configuration section log.
# How LVM log information is reported.
log {
# Configuration option log/report_command_log.
# Enable or disable LVM log reporting.
# If enabled, LVM will collect a log of operations, messages,
# per-object return codes with object identification and associated
# error numbers (errnos) during LVM command processing. Then the
# log is either reported solely or in addition to any existing
# reports, depending on LVM command used. If it is a reporting command
# (e.g. pvs, vgs, lvs, lvm fullreport), then the log is reported in
# addition to any existing reports. Otherwise, there's only log report
# on output. For all applicable LVM commands, you can request that
# the output has only log report by using --logonly command line
# option. Use log/command_log_cols and log/command_log_sort settings
# to define fields to display and sort fields for the log report.
# You can also use log/command_log_selection to define selection
# criteria used each time the log is reported.
# This configuration option has an automatic default value.
# report_command_log = 0
# Configuration option log/command_log_sort.
# List of columns to sort by when reporting command log.
# See --logonly --configreport log -o help
# for the list of possible fields.
# This configuration option has an automatic default value.
# command_log_sort = "log_seq_num"
# Configuration option log/command_log_cols.
# List of columns to report when reporting command log.
# See --logonly --configreport log -o help
# for the list of possible fields.
# This configuration option has an automatic default value.
# command_log_cols = "log_seq_num,log_type,log_context,log_object_type,log_object_name,log_object_id,log_object_group,log_object_group_id,log_message,log_errno,log_ret_code"
# Configuration option log/command_log_selection.
# Selection criteria used when reporting command log.
# You can define selection criteria that are applied each
# time log is reported. This way, it is possible to control the
# amount of log that is displayed on output and you can select
# only parts of the log that are important for you. To define
# selection criteria, use fields from log report. See also
# --logonly --configreport log -S help for the
# list of possible fields and selection operators. You can also
# define selection criteria for log report on command line directly
# using --configreport log -S
# which has precedence over log/command_log_selection setting.
# For more information about selection criteria in general, see
# lvm(8) man page.
# This configuration option has an automatic default value.
# command_log_selection = "!(log_type=status && message=success)"
# Configuration option log/verbose.
# Controls the messages sent to stdout or stderr.
verbose = 0
# Configuration option log/silent.
# Suppress all non-essential messages from stdout.
# This has the same effect as -qq. When enabled, the following commands
# still produce output: dumpconfig, lvdisplay, lvmdiskscan, lvs, pvck,
# pvdisplay, pvs, version, vgcfgrestore -l, vgdisplay, vgs.
# Non-essential messages are shifted from log level 4 to log level 5
# for syslog and lvm2_log_fn purposes.
# Any 'yes' or 'no' questions not overridden by other arguments are
# suppressed and default to 'no'.
silent = 0
# Configuration option log/syslog.
# Send log messages through syslog.
syslog = 1
# Configuration option log/file.
# Write error and debug log messages to a file specified here.
# This configuration option does not have a default value defined.
# file = "/var/log/lvm2.log"
# Configuration option log/overwrite.
# Overwrite the log file each time the program is run.
overwrite = 0
# Configuration option log/level.
# The level of log messages that are sent to the log file or syslog.
# There are 6 syslog-like log levels currently in use: 2 to 7 inclusive.
# 7 is the most verbose (LOG_DEBUG).
level = 0
# Configuration option log/indent.
# Indent messages according to their severity.
indent = 1
# Configuration option log/command_names.
# Display the command name on each line of output.
command_names = 0
# Configuration option log/prefix.
# A prefix to use before the log message text.
# (After the command name, if selected).
# Two spaces allows you to see/grep the severity of each message.
# To make the messages look similar to the original LVM tools use:
# indent = 0, command_names = 1, prefix = " -- "
prefix = " "
# Configuration option log/activation.
# Log messages during activation.
# Don't use this in low memory situations (can deadlock).
activation = 0
# Configuration option log/debug_classes.
# Select log messages by class.
# Some debugging messages are assigned to a class and only appear in
# debug output if the class is listed here. Classes currently
# available: memory, devices, activation, allocation, lvmetad,
# metadata, cache, locking, lvmpolld. Use "all" to see everything.
debug_classes = [ "memory", "devices", "activation", "allocation", "lvmetad", "metadata", "cache", "locking", "lvmpolld", "dbus" ]
}
# Configuration section backup.
# How LVM metadata is backed up and archived.
# In LVM, a 'backup' is a copy of the metadata for the current system,
# and an 'archive' contains old metadata configurations. They are
# stored in a human readable text format.
backup {
# Configuration option backup/backup.
# Maintain a backup of the current metadata configuration.
# Think very hard before turning this off!
backup = 1
# Configuration option backup/backup_dir.
# Location of the metadata backup files.
# Remember to back up this directory regularly!
backup_dir = "/etc/lvm/backup"
# Configuration option backup/archive.
# Maintain an archive of old metadata configurations.
# Think very hard before turning this off.
archive = 1
# Configuration option backup/archive_dir.
# Location of the metdata archive files.
# Remember to back up this directory regularly!
archive_dir = "/etc/lvm/archive"
# Configuration option backup/retain_min.
# Minimum number of archives to keep.
retain_min = 10
# Configuration option backup/retain_days.
# Minimum number of days to keep archive files.
retain_days = 30
}
# Configuration section shell.
# Settings for running LVM in shell (readline) mode.
shell {
# Configuration option shell/history_size.
# Number of lines of history to store in ~/.lvm_history.
history_size = 100
}
# Configuration section global.
# Miscellaneous global LVM settings.
global {
# Configuration option global/umask.
# The file creation mask for any files and directories created.
# Interpreted as octal if the first digit is zero.
umask = 077
# Configuration option global/test.
# No on-disk metadata changes will be made in test mode.
# Equivalent to having the -t option on every command.
test = 0
# Configuration option global/units.
# Default value for --units argument.
units = "h"
# Configuration option global/si_unit_consistency.
# Distinguish between powers of 1024 and 1000 bytes.
# The LVM commands distinguish between powers of 1024 bytes,
# e.g. KiB, MiB, GiB, and powers of 1000 bytes, e.g. KB, MB, GB.
# If scripts depend on the old behaviour, disable this setting
# temporarily until they are updated.
si_unit_consistency = 1
# Configuration option global/suffix.
# Display unit suffix for sizes.
# This setting has no effect if the units are in human-readable form
# (global/units = "h") in which case the suffix is always displayed.
suffix = 1
# Configuration option global/activation.
# Enable/disable communication with the kernel device-mapper.
# Disable to use the tools to manipulate LVM metadata without
# activating any logical volumes. If the device-mapper driver
# is not present in the kernel, disabling this should suppress
# the error messages.
activation = 1
# Configuration option global/fallback_to_lvm1.
# Try running LVM1 tools if LVM cannot communicate with DM.
# This option only applies to 2.4 kernels and is provided to help
# switch between device-mapper kernels and LVM1 kernels. The LVM1
# tools need to be installed with .lvm1 suffices, e.g. vgscan.lvm1.
# They will stop working once the lvm2 on-disk metadata format is used.
# This configuration option has an automatic default value.
# fallback_to_lvm1 = 1
# Configuration option global/format.
# The default metadata format that commands should use.
# The -M 1|2 option overrides this setting.
#
# Accepted values:
# lvm1
# lvm2
#
# This configuration option has an automatic default value.
# format = "lvm2"
# Configuration option global/format_libraries.
# Shared libraries that process different metadata formats.
# If support for LVM1 metadata was compiled as a shared library use
# format_libraries = "liblvm2format1.so"
# This configuration option does not have a default value defined.
# Configuration option global/segment_libraries.
# This configuration option does not have a default value defined.
# Configuration option global/proc.
# Location of proc filesystem.
# This configuration option is advanced.
proc = "/proc"
# Configuration option global/etc.
# Location of /etc system configuration directory.
etc = "/etc"
# Configuration option global/locking_type.
# Type of locking to use.
#
# Accepted values:
# 0
# Turns off locking. Warning: this risks metadata corruption if
# commands run concurrently.
# 1
# LVM uses local file-based locking, the standard mode.
# 2
# LVM uses the external shared library locking_library.
# 3
# LVM uses built-in clustered locking with clvmd.
# This is incompatible with lvmetad. If use_lvmetad is enabled,
# LVM prints a warning and disables lvmetad use.
# 4
# LVM uses read-only locking which forbids any operations that
# might change metadata.
# 5
# Offers dummy locking for tools that do not need any locks.
# You should not need to set this directly; the tools will select
# when to use it instead of the configured locking_type.
# Do not use lvmetad or the kernel device-mapper driver with this
# locking type. It is used by the --readonly option that offers
# read-only access to Volume Group metadata that cannot be locked
# safely because it belongs to an inaccessible domain and might be
# in use, for example a virtual machine image or a disk that is
# shared by a clustered machine.
#
locking_type = 1
# Configuration option global/wait_for_locks.
# When disabled, fail if a lock request would block.
wait_for_locks = 1
# Configuration option global/fallback_to_clustered_locking.
# Attempt to use built-in cluster locking if locking_type 2 fails.
# If using external locking (type 2) and initialisation fails, with
# this enabled, an attempt will be made to use the built-in clustered
# locking. Disable this if using a customised locking_library.
fallback_to_clustered_locking = 1
# Configuration option global/fallback_to_local_locking.
# Use locking_type 1 (local) if locking_type 2 or 3 fail.
# If an attempt to initialise type 2 or type 3 locking failed, perhaps
# because cluster components such as clvmd are not running, with this
# enabled, an attempt will be made to use local file-based locking
# (type 1). If this succeeds, only commands against local VGs will
# proceed. VGs marked as clustered will be ignored.
fallback_to_local_locking = 1
# Configuration option global/locking_dir.
# Directory to use for LVM command file locks.
# Local non-LV directory that holds file-based locks while commands are
# in progress. A directory like /tmp that may get wiped on reboot is OK.
locking_dir = "/run/lock/lvm"
# Configuration option global/prioritise_write_locks.
# Allow quicker VG write access during high volume read access.
# When there are competing read-only and read-write access requests for
# a volume group's metadata, instead of always granting the read-only
# requests immediately, delay them to allow the read-write requests to
# be serviced. Without this setting, write access may be stalled by a
# high volume of read-only requests. This option only affects
# locking_type 1 viz. local file-based locking.
prioritise_write_locks = 1
# Configuration option global/library_dir.
# Search this directory first for shared libraries.
# This configuration option does not have a default value defined.
# Configuration option global/locking_library.
# The external locking library to use for locking_type 2.
# This configuration option has an automatic default value.
# locking_library = "liblvm2clusterlock.so"
# Configuration option global/abort_on_internal_errors.
# Abort a command that encounters an internal error.
# Treat any internal errors as fatal errors, aborting the process that
# encountered the internal error. Please only enable for debugging.
abort_on_internal_errors = 0
# Configuration option global/detect_internal_vg_cache_corruption.
# Internal verification of VG structures.
# Check if CRC matches when a parsed VG is used multiple times. This
# is useful to catch unexpected changes to cached VG structures.
# Please only enable for debugging.
detect_internal_vg_cache_corruption = 0
# Configuration option global/metadata_read_only.
# No operations that change on-disk metadata are permitted.
# Additionally, read-only commands that encounter metadata in need of
# repair will still be allowed to proceed exactly as if the repair had
# been performed (except for the unchanged vg_seqno). Inappropriate
# use could mess up your system, so seek advice first!
metadata_read_only = 0
# Configuration option global/mirror_segtype_default.
# The segment type used by the short mirroring option -m.
# The --type mirror|raid1 option overrides this setting.
#
# Accepted values:
# mirror
# The original RAID1 implementation from LVM/DM. It is
# characterized by a flexible log solution (core, disk, mirrored),
# and by the necessity to block I/O while handling a failure.
# There is an inherent race in the dmeventd failure handling logic
# with snapshots of devices using this type of RAID1 that in the
# worst case could cause a deadlock. (Also see
# devices/ignore_lvm_mirrors.)
# raid1
# This is a newer RAID1 implementation using the MD RAID1
# personality through device-mapper. It is characterized by a
# lack of log options. (A log is always allocated for every
# device and they are placed on the same device as the image,
# so no separate devices are required.) This mirror
# implementation does not require I/O to be blocked while
# handling a failure. This mirror implementation is not
# cluster-aware and cannot be used in a shared (active/active)
# fashion in a cluster.
#
mirror_segtype_default = "raid1"
# Configuration option global/raid10_segtype_default.
# The segment type used by the -i -m combination.
# The --type raid10|mirror option overrides this setting.
# The --stripes/-i and --mirrors/-m options can both be specified
# during the creation of a logical volume to use both striping and
# mirroring for the LV. There are two different implementations.
#
# Accepted values:
# raid10
# LVM uses MD's RAID10 personality through DM. This is the
# preferred option.
# mirror
# LVM layers the 'mirror' and 'stripe' segment types. The layering
# is done by creating a mirror LV on top of striped sub-LVs,
# effectively creating a RAID 0+1 array. The layering is suboptimal
# in terms of providing redundancy and performance.
#
raid10_segtype_default = "raid10"
# Configuration option global/sparse_segtype_default.
# The segment type used by the -V -L combination.
# The --type snapshot|thin option overrides this setting.
# The combination of -V and -L options creates a sparse LV. There are
# two different implementations.
#
# Accepted values:
# snapshot
# The original snapshot implementation from LVM/DM. It uses an old
# snapshot that mixes data and metadata within a single COW
# storage volume and performs poorly when the size of stored data
# passes hundreds of MB.
# thin
# A newer implementation that uses thin provisioning. It has a
# bigger minimal chunk size (64KiB) and uses a separate volume for
# metadata. It has better performance, especially when more data
# is used. It also supports full snapshots.
#
sparse_segtype_default = "thin"
# Configuration option global/lvdisplay_shows_full_device_path.
# Enable this to reinstate the previous lvdisplay name format.
# The default format for displaying LV names in lvdisplay was changed
# in version 2.02.89 to show the LV name and path separately.
# Previously this was always shown as /dev/vgname/lvname even when that
# was never a valid path in the /dev filesystem.
# This configuration option has an automatic default value.
# lvdisplay_shows_full_device_path = 0
# Configuration option global/use_lvmetad.
# Use lvmetad to cache metadata and reduce disk scanning.
# When enabled (and running), lvmetad provides LVM commands with VG
# metadata and PV state. LVM commands then avoid reading this
# information from disks which can be slow. When disabled (or not
# running), LVM commands fall back to scanning disks to obtain VG
# metadata. lvmetad is kept updated via udev rules which must be set
# up for LVM to work correctly. (The udev rules should be installed
# by default.) Without a proper udev setup, changes in the system's
# block device configuration will be unknown to LVM, and ignored
# until a manual 'pvscan --cache' is run. If lvmetad was running
# while use_lvmetad was disabled, it must be stopped, use_lvmetad
# enabled, and then started. When using lvmetad, LV activation is
# switched to an automatic, event-based mode. In this mode, LVs are
# activated based on incoming udev events that inform lvmetad when
# PVs appear on the system. When a VG is complete (all PVs present),
# it is auto-activated. The auto_activation_volume_list setting
# controls which LVs are auto-activated (all by default.)
# When lvmetad is updated (automatically by udev events, or directly
# by pvscan --cache), devices/filter is ignored and all devices are
# scanned by default. lvmetad always keeps unfiltered information
# which is provided to LVM commands. Each LVM command then filters
# based on devices/filter. This does not apply to other, non-regexp,
# filtering settings: component filters such as multipath and MD
# are checked during pvscan --cache. To filter a device and prevent
# scanning from the LVM system entirely, including lvmetad, use
# devices/global_filter.
use_lvmetad = 0
# Configuration option global/lvmetad_update_wait_time.
# Number of seconds a command will wait for lvmetad update to finish.
# After waiting for this period, a command will not use lvmetad, and
# will revert to disk scanning.
# This configuration option has an automatic default value.
# lvmetad_update_wait_time = 10
# Configuration option global/use_lvmlockd.
# Use lvmlockd for locking among hosts using LVM on shared storage.
# Applicable only if LVM is compiled with lockd support in which
# case there is also lvmlockd(8) man page available for more
# information.
use_lvmlockd = 0
# Configuration option global/lvmlockd_lock_retries.
# Retry lvmlockd lock requests this many times.
# Applicable only if LVM is compiled with lockd support
# This configuration option has an automatic default value.
# lvmlockd_lock_retries = 3
# Configuration option global/sanlock_lv_extend.
# Size in MiB to extend the internal LV holding sanlock locks.
# The internal LV holds locks for each LV in the VG, and after enough
# LVs have been created, the internal LV needs to be extended. lvcreate
# will automatically extend the internal LV when needed by the amount
# specified here. Setting this to 0 disables the automatic extension
# and can cause lvcreate to fail. Applicable only if LVM is compiled
# with lockd support
# This configuration option has an automatic default value.
# sanlock_lv_extend = 256
# Configuration option global/thin_check_executable.
# The full path to the thin_check command.
# LVM uses this command to check that a thin metadata device is in a
# usable state. When a thin pool is activated and after it is
# deactivated, this command is run. Activation will only proceed if
# the command has an exit status of 0. Set to "" to skip this check.
# (Not recommended.) Also see thin_check_options.
# (See package device-mapper-persistent-data or thin-provisioning-tools)
# This configuration option has an automatic default value.
# thin_check_executable = "/usr/sbin/thin_check"
# Configuration option global/thin_dump_executable.
# The full path to the thin_dump command.
# LVM uses this command to dump thin pool metadata.
# (See package device-mapper-persistent-data or thin-provisioning-tools)
# This configuration option has an automatic default value.
# thin_dump_executable = "/usr/sbin/thin_dump"
# Configuration option global/thin_repair_executable.
# The full path to the thin_repair command.
# LVM uses this command to repair a thin metadata device if it is in
# an unusable state. Also see thin_repair_options.
# (See package device-mapper-persistent-data or thin-provisioning-tools)
# This configuration option has an automatic default value.
# thin_repair_executable = "/usr/sbin/thin_repair"
# Configuration option global/thin_check_options.
# List of options passed to the thin_check command.
# With thin_check version 2.1 or newer you can add the option
# --ignore-non-fatal-errors to let it pass through ignorable errors
# and fix them later. With thin_check version 3.2 or newer you should
# include the option --clear-needs-check-flag.
# This configuration option has an automatic default value.
# thin_check_options = [ "-q", "--clear-needs-check-flag" ]
# Configuration option global/thin_repair_options.
# List of options passed to the thin_repair command.
# This configuration option has an automatic default value.
# thin_repair_options = [ "" ]
# Configuration option global/thin_disabled_features.
# Features to not use in the thin driver.
# This can be helpful for testing, or to avoid using a feature that is
# causing problems. Features include: block_size, discards,
# discards_non_power_2, external_origin, metadata_resize,
# external_origin_extend, error_if_no_space.
#
# Example
# thin_disabled_features = [ "discards", "block_size" ]
#
# This configuration option does not have a default value defined.
# Configuration option global/cache_disabled_features.
# Features to not use in the cache driver.
# This can be helpful for testing, or to avoid using a feature that is
# causing problems. Features include: policy_mq, policy_smq, metadata2.
#
# Example
# cache_disabled_features = [ "policy_smq" ]
#
# This configuration option does not have a default value defined.
# Configuration option global/cache_check_executable.
# The full path to the cache_check command.
# LVM uses this command to check that a cache metadata device is in a
# usable state. When a cached LV is activated and after it is
# deactivated, this command is run. Activation will only proceed if the
# command has an exit status of 0. Set to "" to skip this check.
# (Not recommended.) Also see cache_check_options.
# (See package device-mapper-persistent-data or thin-provisioning-tools)
# This configuration option has an automatic default value.
# cache_check_executable = "/usr/sbin/cache_check"
# Configuration option global/cache_dump_executable.
# The full path to the cache_dump command.
# LVM uses this command to dump cache pool metadata.
# (See package device-mapper-persistent-data or thin-provisioning-tools)
# This configuration option has an automatic default value.
# cache_dump_executable = "/usr/sbin/cache_dump"
# Configuration option global/cache_repair_executable.
# The full path to the cache_repair command.
# LVM uses this command to repair a cache metadata device if it is in
# an unusable state. Also see cache_repair_options.
# (See package device-mapper-persistent-data or thin-provisioning-tools)
# This configuration option has an automatic default value.
# cache_repair_executable = "/usr/sbin/cache_repair"
# Configuration option global/cache_check_options.
# List of options passed to the cache_check command.
# With cache_check version 5.0 or newer you should include the option
# --clear-needs-check-flag.
# This configuration option has an automatic default value.
# cache_check_options = [ "-q", "--clear-needs-check-flag" ]
# Configuration option global/cache_repair_options.
# List of options passed to the cache_repair command.
# This configuration option has an automatic default value.
# cache_repair_options = [ "" ]
# Configuration option global/fsadm_executable.
# The full path to the fsadm command.
# LVM uses this command to help with lvresize -r operations.
# This configuration option has an automatic default value.
# fsadm_executable = "/usr/sbin/fsadm"
# Configuration option global/system_id_source.
# The method LVM uses to set the local system ID.
# Volume Groups can also be given a system ID (by vgcreate, vgchange,
# or vgimport.) A VG on shared storage devices is accessible only to
# the host with a matching system ID. See 'man lvmsystemid' for
# information on limitations and correct usage.
#
# Accepted values:
# none
# The host has no system ID.
# lvmlocal
# Obtain the system ID from the system_id setting in the 'local'
# section of an lvm configuration file, e.g. lvmlocal.conf.
# uname
# Set the system ID from the hostname (uname) of the system.
# System IDs beginning localhost are not permitted.
# machineid
# Use the contents of the machine-id file to set the system ID.
# Some systems create this file at installation time.
# See 'man machine-id' and global/etc.
# file
# Use the contents of another file (system_id_file) to set the
# system ID.
#
system_id_source = "none"
# Configuration option global/system_id_file.
# The full path to the file containing a system ID.
# This is used when system_id_source is set to 'file'.
# Comments starting with the character # are ignored.
# This configuration option does not have a default value defined.
# Configuration option global/use_lvmpolld.
# Use lvmpolld to supervise long running LVM commands.
# When enabled, control of long running LVM commands is transferred
# from the original LVM command to the lvmpolld daemon. This allows
# the operation to continue independent of the original LVM command.
# After lvmpolld takes over, the LVM command displays the progress
# of the ongoing operation. lvmpolld itself runs LVM commands to
# manage the progress of ongoing operations. lvmpolld can be used as
# a native systemd service, which allows it to be started on demand,
# and to use its own control group. When this option is disabled, LVM
# commands will supervise long running operations by forking themselves.
# Applicable only if LVM is compiled with lvmpolld support.
use_lvmpolld = 1
# Configuration option global/notify_dbus.
# Enable D-Bus notification from LVM commands.
# When enabled, an LVM command that changes PVs, changes VG metadata,
# or changes the activation state of an LV will send a notification.
notify_dbus = 1
}
# Configuration section activation.
activation {
# Configuration option activation/checks.
# Perform internal checks of libdevmapper operations.
# Useful for debugging problems with activation. Some of the checks may
# be expensive, so it's best to use this only when there seems to be a
# problem.
checks = 0
# Configuration option activation/udev_sync.
# Use udev notifications to synchronize udev and LVM.
# The --nodevsync option overrides this setting.
# When disabled, LVM commands will not wait for notifications from
# udev, but continue irrespective of any possible udev processing in
# the background. Only use this if udev is not running or has rules
# that ignore the devices LVM creates. If enabled when udev is not
# running, and LVM processes are waiting for udev, run the command
# 'dmsetup udevcomplete_all' to wake them up.
udev_sync = 1
# Configuration option activation/udev_rules.
# Use udev rules to manage LV device nodes and symlinks.
# When disabled, LVM will manage the device nodes and symlinks for
# active LVs itself. Manual intervention may be required if this
# setting is changed while LVs are active.
udev_rules = 1
# Configuration option activation/verify_udev_operations.
# Use extra checks in LVM to verify udev operations.
# This enables additional checks (and if necessary, repairs) on entries
# in the device directory after udev has completed processing its
# events. Useful for diagnosing problems with LVM/udev interactions.
verify_udev_operations = 0
# Configuration option activation/retry_deactivation.
# Retry failed LV deactivation.
# If LV deactivation fails, LVM will retry for a few seconds before
# failing. This may happen because a process run from a quick udev rule
# temporarily opened the device.
retry_deactivation = 1
# Configuration option activation/missing_stripe_filler.
# Method to fill missing stripes when activating an incomplete LV.
# Using 'error' will make inaccessible parts of the device return I/O
# errors on access. Using 'zero' will return success (and zero) on I/O
# You can instead use a device path, in which case,
# that device will be used in place of missing stripes. Using anything
# other than 'error' with mirrored or snapshotted volumes is likely to
# result in data corruption.
# This configuration option is advanced.
missing_stripe_filler = "error"
# Configuration option activation/use_linear_target.
# Use the linear target to optimize single stripe LVs.
# When disabled, the striped target is used. The linear target is an
# optimised version of the striped target that only handles a single
# stripe.
use_linear_target = 1
# Configuration option activation/reserved_stack.
# Stack size in KiB to reserve for use while devices are suspended.
# Insufficent reserve risks I/O deadlock during device suspension.
reserved_stack = 64
# Configuration option activation/reserved_memory.
# Memory size in KiB to reserve for use while devices are suspended.
# Insufficent reserve risks I/O deadlock during device suspension.
reserved_memory = 8192
# Configuration option activation/process_priority.
# Nice value used while devices are suspended.
# Use a high priority so that LVs are suspended
# for the shortest possible time.
process_priority = -18
# Configuration option activation/volume_list.
# Only LVs selected by this list are activated.
# If this list is defined, an LV is only activated if it matches an
# entry in this list. If this list is undefined, it imposes no limits
# on LV activation (all are allowed).
#
# Accepted values:
# vgname
# The VG name is matched exactly and selects all LVs in the VG.
# vgname/lvname
# The VG name and LV name are matched exactly and selects the LV.
# @tag
# Selects an LV if the specified tag matches a tag set on the LV
# or VG.
# @*
# Selects an LV if a tag defined on the host is also set on the LV
# or VG. See tags/hosttags. If any host tags exist but volume_list
# is not defined, a default single-entry list containing '@*'
# is assumed.
#
# Example
# volume_list = [ "vg1", "vg2/lvol1", "@tag1", "@*" ]
#
# This configuration option does not have a default value defined.
# Configuration option activation/auto_activation_volume_list.
# Only LVs selected by this list are auto-activated.
# This list works like volume_list, but it is used only by
# auto-activation commands. It does not apply to direct activation
# commands. If this list is defined, an LV is only auto-activated
# if it matches an entry in this list. If this list is undefined, it
# imposes no limits on LV auto-activation (all are allowed.) If this
# list is defined and empty, i.e. "[]", then no LVs are selected for
# auto-activation. An LV that is selected by this list for
# auto-activation, must also be selected by volume_list (if defined)
# before it is activated. Auto-activation is an activation command that
# includes the 'a' argument: --activate ay or -a ay. The 'a' (auto)
# argument for auto-activation is meant to be used by activation
# commands that are run automatically by the system, as opposed to LVM
# commands run directly by a user. A user may also use the 'a' flag
# directly to perform auto-activation. Also see pvscan(8) for more
# information about auto-activation.
#
# Accepted values:
# vgname
# The VG name is matched exactly and selects all LVs in the VG.
# vgname/lvname
# The VG name and LV name are matched exactly and selects the LV.
# @tag
# Selects an LV if the specified tag matches a tag set on the LV
# or VG.
# @*
# Selects an LV if a tag defined on the host is also set on the LV
# or VG. See tags/hosttags. If any host tags exist but volume_list
# is not defined, a default single-entry list containing '@*'
# is assumed.
#
# Example
# auto_activation_volume_list = [ "vg1", "vg2/lvol1", "@tag1", "@*" ]
#
# This configuration option does not have a default value defined.
# Configuration option activation/read_only_volume_list.
# LVs in this list are activated in read-only mode.
# If this list is defined, each LV that is to be activated is checked
# against this list, and if it matches, it is activated in read-only
# mode. This overrides the permission setting stored in the metadata,
# e.g. from --permission rw.
#
# Accepted values:
# vgname
# The VG name is matched exactly and selects all LVs in the VG.
# vgname/lvname
# The VG name and LV name are matched exactly and selects the LV.
# @tag
# Selects an LV if the specified tag matches a tag set on the LV
# or VG.
# @*
# Selects an LV if a tag defined on the host is also set on the LV
# or VG. See tags/hosttags. If any host tags exist but volume_list
# is not defined, a default single-entry list containing '@*'
# is assumed.
#
# Example
# read_only_volume_list = [ "vg1", "vg2/lvol1", "@tag1", "@*" ]
#
# This configuration option does not have a default value defined.
# Configuration option activation/raid_region_size.
# Size in KiB of each raid or mirror synchronization region.
# The clean/dirty state of data is tracked for each region.
# The value is rounded down to a power of two if necessary, and
# is ignored if it is not a multiple of the machine memory page size.
raid_region_size = 2048
# Configuration option activation/error_when_full.
# Return errors if a thin pool runs out of space.
# The --errorwhenfull option overrides this setting.
# When enabled, writes to thin LVs immediately return an error if the
# thin pool is out of data space. When disabled, writes to thin LVs
# are queued if the thin pool is out of space, and processed when the
# thin pool data space is extended. New thin pools are assigned the
# behavior defined here.
# This configuration option has an automatic default value.
# error_when_full = 0
# Configuration option activation/readahead.
# Setting to use when there is no readahead setting in metadata.
#
# Accepted values:
# none
# Disable readahead.
# auto
# Use default value chosen by kernel.
#
readahead = "auto"
# Configuration option activation/raid_fault_policy.
# Defines how a device failure in a RAID LV is handled.
# This includes LVs that have the following segment types:
# raid1, raid4, raid5*, and raid6*.
# If a device in the LV fails, the policy determines the steps
# performed by dmeventd automatically, and the steps perfomed by the
# manual command lvconvert --repair --use-policies.
# Automatic handling requires dmeventd to be monitoring the LV.
#
# Accepted values:
# warn
# Use the system log to warn the user that a device in the RAID LV
# has failed. It is left to the user to run lvconvert --repair
# manually to remove or replace the failed device. As long as the
# number of failed devices does not exceed the redundancy of the LV
# (1 device for raid4/5, 2 for raid6), the LV will remain usable.
# allocate
# Attempt to use any extra physical volumes in the VG as spares and
# replace faulty devices.
#
raid_fault_policy = "warn"
# Configuration option activation/mirror_image_fault_policy.
# Defines how a device failure in a 'mirror' LV is handled.
# An LV with the 'mirror' segment type is composed of mirror images
# (copies) and a mirror log. A disk log ensures that a mirror LV does
# not need to be re-synced (all copies made the same) every time a
# machine reboots or crashes. If a device in the LV fails, this policy
# determines the steps perfomed by dmeventd automatically, and the steps
# performed by the manual command lvconvert --repair --use-policies.
# Automatic handling requires dmeventd to be monitoring the LV.
#
# Accepted values:
# remove
# Simply remove the faulty device and run without it. If the log
# device fails, the mirror would convert to using an in-memory log.
# This means the mirror will not remember its sync status across
# crashes/reboots and the entire mirror will be re-synced. If a
# mirror image fails, the mirror will convert to a non-mirrored
# device if there is only one remaining good copy.
# allocate
# Remove the faulty device and try to allocate space on a new
# device to be a replacement for the failed device. Using this
# policy for the log is fast and maintains the ability to remember
# sync state through crashes/reboots. Using this policy for a
# mirror device is slow, as it requires the mirror to resynchronize
# the devices, but it will preserve the mirror characteristic of
# the device. This policy acts like 'remove' if no suitable device
# and space can be allocated for the replacement.
# allocate_anywhere
# Not yet implemented. Useful to place the log device temporarily
# on the same physical volume as one of the mirror images. This
# policy is not recommended for mirror devices since it would break
# the redundant nature of the mirror. This policy acts like
# 'remove' if no suitable device and space can be allocated for the
# replacement.
#
mirror_image_fault_policy = "remove"
# Configuration option activation/mirror_log_fault_policy.
# Defines how a device failure in a 'mirror' log LV is handled.
# The mirror_image_fault_policy description for mirrored LVs also
# applies to mirrored log LVs.
mirror_log_fault_policy = "allocate"
# Configuration option activation/snapshot_autoextend_threshold.
# Auto-extend a snapshot when its usage exceeds this percent.
# Setting this to 100 disables automatic extension.
# The minimum value is 50 (a smaller value is treated as 50.)
# Also see snapshot_autoextend_percent.
# Automatic extension requires dmeventd to be monitoring the LV.
#
# Example
# Using 70% autoextend threshold and 20% autoextend size, when a 1G
# snapshot exceeds 700M, it is extended to 1.2G, and when it exceeds
# 840M, it is extended to 1.44G:
# snapshot_autoextend_threshold = 70
#
snapshot_autoextend_threshold = 100
# Configuration option activation/snapshot_autoextend_percent.
# Auto-extending a snapshot adds this percent extra space.
# The amount of additional space added to a snapshot is this
# percent of its current size.
#
# Example
# Using 70% autoextend threshold and 20% autoextend size, when a 1G
# snapshot exceeds 700M, it is extended to 1.2G, and when it exceeds
# 840M, it is extended to 1.44G:
# snapshot_autoextend_percent = 20
#
snapshot_autoextend_percent = 20
# Configuration option activation/thin_pool_autoextend_threshold.
# Auto-extend a thin pool when its usage exceeds this percent.
# Setting this to 100 disables automatic extension.
# The minimum value is 50 (a smaller value is treated as 50.)
# Also see thin_pool_autoextend_percent.
# Automatic extension requires dmeventd to be monitoring the LV.
#
# Example
# Using 70% autoextend threshold and 20% autoextend size, when a 1G
# thin pool exceeds 700M, it is extended to 1.2G, and when it exceeds
# 840M, it is extended to 1.44G:
# thin_pool_autoextend_threshold = 70
#
thin_pool_autoextend_threshold = 100
# Configuration option activation/thin_pool_autoextend_percent.
# Auto-extending a thin pool adds this percent extra space.
# The amount of additional space added to a thin pool is this
# percent of its current size.
#
# Example
# Using 70% autoextend threshold and 20% autoextend size, when a 1G
# thin pool exceeds 700M, it is extended to 1.2G, and when it exceeds
# 840M, it is extended to 1.44G:
# thin_pool_autoextend_percent = 20
#
thin_pool_autoextend_percent = 20
# Configuration option activation/mlock_filter.
# Do not mlock these memory areas.
# While activating devices, I/O to devices being (re)configured is
# suspended. As a precaution against deadlocks, LVM pins memory it is
# using so it is not paged out, and will not require I/O to reread.
# Groups of pages that are known not to be accessed during activation
# do not need to be pinned into memory. Each string listed in this
# setting is compared against each line in /proc/self/maps, and the
# pages corresponding to lines that match are not pinned. On some
# systems, locale-archive was found to make up over 80% of the memory
# used by the process.
#
# Example
# mlock_filter = [ "locale/locale-archive", "gconv/gconv-modules.cache" ]
#
# This configuration option is advanced.
# This configuration option does not have a default value defined.
# Configuration option activation/use_mlockall.
# Use the old behavior of mlockall to pin all memory.
# Prior to version 2.02.62, LVM used mlockall() to pin the whole
# process's memory while activating devices.
use_mlockall = 0
# Configuration option activation/monitoring.
# Monitor LVs that are activated.
# The --ignoremonitoring option overrides this setting.
# When enabled, LVM will ask dmeventd to monitor activated LVs.
monitoring = 1
# Configuration option activation/polling_interval.
# Check pvmove or lvconvert progress at this interval (seconds).
# When pvmove or lvconvert must wait for the kernel to finish
# synchronising or merging data, they check and report progress at
# intervals of this number of seconds. If this is set to 0 and there
# is only one thing to wait for, there are no progress reports, but
# the process is awoken immediately once the operation is complete.
polling_interval = 15
# Configuration option activation/auto_set_activation_skip.
# Set the activation skip flag on new thin snapshot LVs.
# The --setactivationskip option overrides this setting.
# An LV can have a persistent 'activation skip' flag. The flag causes
# the LV to be skipped during normal activation. The lvchange/vgchange
# -K option is required to activate LVs that have the activation skip
# flag set. When this setting is enabled, the activation skip flag is
# set on new thin snapshot LVs.
# This configuration option has an automatic default value.
# auto_set_activation_skip = 1
# Configuration option activation/activation_mode.
# How LVs with missing devices are activated.
# The --activationmode option overrides this setting.
#
# Accepted values:
# complete
# Only allow activation of an LV if all of the Physical Volumes it
# uses are present. Other PVs in the Volume Group may be missing.
# degraded
# Like complete, but additionally RAID LVs of segment type raid1,
# raid4, raid5, radid6 and raid10 will be activated if there is no
# data loss, i.e. they have sufficient redundancy to present the
# entire addressable range of the Logical Volume.
# partial
# Allows the activation of any LV even if a missing or failed PV
# could cause data loss with a portion of the LV inaccessible.
# This setting should not normally be used, but may sometimes
# assist with data recovery.
#
activation_mode = "degraded"
# Configuration option activation/lock_start_list.
# Locking is started only for VGs selected by this list.
# The rules are the same as those for volume_list.
# This configuration option does not have a default value defined.
# Configuration option activation/auto_lock_start_list.
# Locking is auto-started only for VGs selected by this list.
# The rules are the same as those for auto_activation_volume_list.
# This configuration option does not have a default value defined.
}
# Configuration section metadata.
# This configuration section has an automatic default value.
# metadata {
# Configuration option metadata/check_pv_device_sizes.
# Check device sizes are not smaller than corresponding PV sizes.
# If device size is less than corresponding PV size found in metadata,
# there is always a risk of data loss. If this option is set, then LVM
# issues a warning message each time it finds that the device size is
# less than corresponding PV size. You should not disable this unless
# you are absolutely sure about what you are doing!
# This configuration option is advanced.
# This configuration option has an automatic default value.
# check_pv_device_sizes = 1
# Configuration option metadata/record_lvs_history.
# When enabled, LVM keeps history records about removed LVs in
# metadata. The information that is recorded in metadata for
# historical LVs is reduced when compared to original
# information kept in metadata for live LVs. Currently, this
# feature is supported for thin and thin snapshot LVs only.
# This configuration option has an automatic default value.
# record_lvs_history = 0
# Configuration option metadata/lvs_history_retention_time.
# Retention time in seconds after which a record about individual
# historical logical volume is automatically destroyed.
# A value of 0 disables this feature.
# This configuration option has an automatic default value.
# lvs_history_retention_time = 0
# Configuration option metadata/pvmetadatacopies.
# Number of copies of metadata to store on each PV.
# The --pvmetadatacopies option overrides this setting.
#
# Accepted values:
# 2
# Two copies of the VG metadata are stored on the PV, one at the
# front of the PV, and one at the end.
# 1
# One copy of VG metadata is stored at the front of the PV.
# 0
# No copies of VG metadata are stored on the PV. This may be
# useful for VGs containing large numbers of PVs.
#
# This configuration option is advanced.
# This configuration option has an automatic default value.
# pvmetadatacopies = 1
# Configuration option metadata/vgmetadatacopies.
# Number of copies of metadata to maintain for each VG.
# The --vgmetadatacopies option overrides this setting.
# If set to a non-zero value, LVM automatically chooses which of the
# available metadata areas to use to achieve the requested number of
# copies of the VG metadata. If you set a value larger than the the
# total number of metadata areas available, then metadata is stored in
# them all. The value 0 (unmanaged) disables this automatic management
# and allows you to control which metadata areas are used at the
# individual PV level using pvchange --metadataignore y|n.
# This configuration option has an automatic default value.
# vgmetadatacopies = 0
# Configuration option metadata/pvmetadatasize.
# Approximate number of sectors to use for each metadata copy.
# VGs with large numbers of PVs or LVs, or VGs containing complex LV
# structures, may need additional space for VG metadata. The metadata
# areas are treated as circular buffers, so unused space becomes filled
# with an archive of the most recent previous versions of the metadata.
# This configuration option has an automatic default value.
# pvmetadatasize = 255
# Configuration option metadata/pvmetadataignore.
# Ignore metadata areas on a new PV.
# The --metadataignore option overrides this setting.
# If metadata areas on a PV are ignored, LVM will not store metadata
# in them.
# This configuration option is advanced.
# This configuration option has an automatic default value.
# pvmetadataignore = 0
# Configuration option metadata/stripesize.
# This configuration option is advanced.
# This configuration option has an automatic default value.
# stripesize = 64
# Configuration option metadata/dirs.
# Directories holding live copies of text format metadata.
# These directories must not be on logical volumes!
# It's possible to use LVM with a couple of directories here,
# preferably on different (non-LV) filesystems, and with no other
# on-disk metadata (pvmetadatacopies = 0). Or this can be in addition
# to on-disk metadata areas. The feature was originally added to
# simplify testing and is not supported under low memory situations -
# the machine could lock up. Never edit any files in these directories
# by hand unless you are absolutely sure you know what you are doing!
# Use the supplied toolset to make changes (e.g. vgcfgrestore).
#
# Example
# dirs = [ "/etc/lvm/metadata", "/mnt/disk2/lvm/metadata2" ]
#
# This configuration option is advanced.
# This configuration option does not have a default value defined.
# }
# Configuration section report.
# LVM report command output formatting.
# This configuration section has an automatic default value.
# report {
# Configuration option report/output_format.
# Format of LVM command's report output.
# If there is more than one report per command, then the format
# is applied for all reports. You can also change output format
# directly on command line using --reportformat option which
# has precedence over log/output_format setting.
# Accepted values:
# basic
# Original format with columns and rows. If there is more than
# one report per command, each report is prefixed with report's
# name for identification.
# json
# JSON format.
# This configuration option has an automatic default value.
# output_format = "basic"
# Configuration option report/compact_output.
# Do not print empty values for all report fields.
# If enabled, all fields that don't have a value set for any of the
# rows reported are skipped and not printed. Compact output is
# applicable only if report/buffered is enabled. If you need to
# compact only specified fields, use compact_output=0 and define
# report/compact_output_cols configuration setting instead.
# This configuration option has an automatic default value.
# compact_output = 0
# Configuration option report/compact_output_cols.
# Do not print empty values for specified report fields.
# If defined, specified fields that don't have a value set for any
# of the rows reported are skipped and not printed. Compact output
# is applicable only if report/buffered is enabled. If you need to
# compact all fields, use compact_output=1 instead in which case
# the compact_output_cols setting is then ignored.
# This configuration option has an automatic default value.
# compact_output_cols = ""
# Configuration option report/aligned.
# Align columns in report output.
# This configuration option has an automatic default value.
# aligned = 1
# Configuration option report/buffered.
# Buffer report output.
# When buffered reporting is used, the report's content is appended
# incrementally to include each object being reported until the report
# is flushed to output which normally happens at the end of command
# execution. Otherwise, if buffering is not used, each object is
# reported as soon as its processing is finished.
# This configuration option has an automatic default value.
# buffered = 1
# Configuration option report/headings.
# Show headings for columns on report.
# This configuration option has an automatic default value.
# headings = 1
# Configuration option report/separator.
# A separator to use on report after each field.
# This configuration option has an automatic default value.
# separator = " "
# Configuration option report/list_item_separator.
# A separator to use for list items when reported.
# This configuration option has an automatic default value.
# list_item_separator = ","
# Configuration option report/prefixes.
# Use a field name prefix for each field reported.
# This configuration option has an automatic default value.
# prefixes = 0
# Configuration option report/quoted.
# Quote field values when using field name prefixes.
# This configuration option has an automatic default value.
# quoted = 1
# Configuration option report/columns_as_rows.
# Output each column as a row.
# If set, this also implies report/prefixes=1.
# This configuration option has an automatic default value.
# columns_as_rows = 0
# Configuration option report/binary_values_as_numeric.
# Use binary values 0 or 1 instead of descriptive literal values.
# For columns that have exactly two valid values to report
# (not counting the 'unknown' value which denotes that the
# value could not be determined).
# This configuration option has an automatic default value.
# binary_values_as_numeric = 0
# Configuration option report/time_format.
# Set time format for fields reporting time values.
# Format specification is a string which may contain special character
# sequences and ordinary character sequences. Ordinary character
# sequences are copied verbatim. Each special character sequence is
# introduced by the '%' character and such sequence is then
# substituted with a value as described below.
#
# Accepted values:
# %a
# The abbreviated name of the day of the week according to the
# current locale.
# %A
# The full name of the day of the week according to the current
# locale.
# %b
# The abbreviated month name according to the current locale.
# %B
# The full month name according to the current locale.
# %c
# The preferred date and time representation for the current
# locale (alt E)
# %C
# The century number (year/100) as a 2-digit integer. (alt E)
# %d
# The day of the month as a decimal number (range 01 to 31).
# (alt O)
# %D
# Equivalent to %m/%d/%y. (For Americans only. Americans should
# note that in other countries%d/%m/%y is rather common. This
# means that in international context this format is ambiguous and
# should not be used.
# %e
# Like %d, the day of the month as a decimal number, but a leading
# zero is replaced by a space. (alt O)
# %E
# Modifier: use alternative local-dependent representation if
# available.
# %F
# Equivalent to %Y-%m-%d (the ISO 8601 date format).
# %G
# The ISO 8601 week-based year with century as adecimal number.
# The 4-digit year corresponding to the ISO week number (see %V).
# This has the same format and value as %Y, except that if the
# ISO week number belongs to the previous or next year, that year
# is used instead.
# %g
# Like %G, but without century, that is, with a 2-digit year
# (00-99).
# %h
# Equivalent to %b.
# %H
# The hour as a decimal number using a 24-hour clock
# (range 00 to 23). (alt O)
# %I
# The hour as a decimal number using a 12-hour clock
# (range 01 to 12). (alt O)
# %j
# The day of the year as a decimal number (range 001 to 366).
# %k
# The hour (24-hour clock) as a decimal number (range 0 to 23);
# single digits are preceded by a blank. (See also %H.)
# %l
# The hour (12-hour clock) as a decimal number (range 1 to 12);
# single digits are preceded by a blank. (See also %I.)
# %m
# The month as a decimal number (range 01 to 12). (alt O)
# %M
# The minute as a decimal number (range 00 to 59). (alt O)
# %O
# Modifier: use alternative numeric symbols.
# %p
# Either "AM" or "PM" according to the given time value,
# or the corresponding strings for the current locale. Noon is
# treated as "PM" and midnight as "AM".
# %P
# Like %p but in lowercase: "am" or "pm" or a corresponding
# string for the current locale.
# %r
# The time in a.m. or p.m. notation. In the POSIX locale this is
# equivalent to %I:%M:%S %p.
# %R
# The time in 24-hour notation (%H:%M). For a version including
# the seconds, see %T below.
# %s
# The number of seconds since the Epoch,
# 1970-01-01 00:00:00 +0000 (UTC)
# %S
# The second as a decimal number (range 00 to 60). (The range is
# up to 60 to allow for occasional leap seconds.) (alt O)
# %t
# A tab character.
# %T
# The time in 24-hour notation (%H:%M:%S).
# %u
# The day of the week as a decimal, range 1 to 7, Monday being 1.
# See also %w. (alt O)
# %U
# The week number of the current year as a decimal number,
# range 00 to 53, starting with the first Sunday as the first
# day of week 01. See also %V and %W. (alt O)
# %V
# The ISO 8601 week number of the current year as a decimal number,
# range 01 to 53, where week 1 is the first week that has at least
# 4 days in the new year. See also %U and %W. (alt O)
# %w
# The day of the week as a decimal, range 0 to 6, Sunday being 0.
# See also %u. (alt O)
# %W
# The week number of the current year as a decimal number,
# range 00 to 53, starting with the first Monday as the first day
# of week 01. (alt O)
# %x
# The preferred date representation for the current locale without
# the time. (alt E)
# %X
# The preferred time representation for the current locale without
# the date. (alt E)
# %y
# The year as a decimal number without a century (range 00 to 99).
# (alt E, alt O)
# %Y
# The year as a decimal number including the century. (alt E)
# %z
# The +hhmm or -hhmm numeric timezone (that is, the hour and minute
# offset from UTC).
# %Z
# The timezone name or abbreviation.
# %%
# A literal '%' character.
#
# This configuration option has an automatic default value.
# time_format = "%Y-%m-%d %T %z"
# Configuration option report/devtypes_sort.
# List of columns to sort by when reporting 'lvm devtypes' command.
# See 'lvm devtypes -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# devtypes_sort = "devtype_name"
# Configuration option report/devtypes_cols.
# List of columns to report for 'lvm devtypes' command.
# See 'lvm devtypes -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# devtypes_cols = "devtype_name,devtype_max_partitions,devtype_description"
# Configuration option report/devtypes_cols_verbose.
# List of columns to report for 'lvm devtypes' command in verbose mode.
# See 'lvm devtypes -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# devtypes_cols_verbose = "devtype_name,devtype_max_partitions,devtype_description"
# Configuration option report/lvs_sort.
# List of columns to sort by when reporting 'lvs' command.
# See 'lvs -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# lvs_sort = "vg_name,lv_name"
# Configuration option report/lvs_cols.
# List of columns to report for 'lvs' command.
# See 'lvs -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# lvs_cols = "lv_name,vg_name,lv_attr,lv_size,pool_lv,origin,data_percent,metadata_percent,move_pv,mirror_log,copy_percent,convert_lv"
# Configuration option report/lvs_cols_verbose.
# List of columns to report for 'lvs' command in verbose mode.
# See 'lvs -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# lvs_cols_verbose = "lv_name,vg_name,seg_count,lv_attr,lv_size,lv_major,lv_minor,lv_kernel_major,lv_kernel_minor,pool_lv,origin,data_percent,metadata_percent,move_pv,copy_percent,mirror_log,convert_lv,lv_uuid,lv_profile"
# Configuration option report/vgs_sort.
# List of columns to sort by when reporting 'vgs' command.
# See 'vgs -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# vgs_sort = "vg_name"
# Configuration option report/vgs_cols.
# List of columns to report for 'vgs' command.
# See 'vgs -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# vgs_cols = "vg_name,pv_count,lv_count,snap_count,vg_attr,vg_size,vg_free"
# Configuration option report/vgs_cols_verbose.
# List of columns to report for 'vgs' command in verbose mode.
# See 'vgs -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# vgs_cols_verbose = "vg_name,vg_attr,vg_extent_size,pv_count,lv_count,snap_count,vg_size,vg_free,vg_uuid,vg_profile"
# Configuration option report/pvs_sort.
# List of columns to sort by when reporting 'pvs' command.
# See 'pvs -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# pvs_sort = "pv_name"
# Configuration option report/pvs_cols.
# List of columns to report for 'pvs' command.
# See 'pvs -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# pvs_cols = "pv_name,vg_name,pv_fmt,pv_attr,pv_size,pv_free"
# Configuration option report/pvs_cols_verbose.
# List of columns to report for 'pvs' command in verbose mode.
# See 'pvs -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# pvs_cols_verbose = "pv_name,vg_name,pv_fmt,pv_attr,pv_size,pv_free,dev_size,pv_uuid"
# Configuration option report/segs_sort.
# List of columns to sort by when reporting 'lvs --segments' command.
# See 'lvs --segments -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# segs_sort = "vg_name,lv_name,seg_start"
# Configuration option report/segs_cols.
# List of columns to report for 'lvs --segments' command.
# See 'lvs --segments -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# segs_cols = "lv_name,vg_name,lv_attr,stripes,segtype,seg_size"
# Configuration option report/segs_cols_verbose.
# List of columns to report for 'lvs --segments' command in verbose mode.
# See 'lvs --segments -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# segs_cols_verbose = "lv_name,vg_name,lv_attr,seg_start,seg_size,stripes,segtype,stripesize,chunksize"
# Configuration option report/pvsegs_sort.
# List of columns to sort by when reporting 'pvs --segments' command.
# See 'pvs --segments -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# pvsegs_sort = "pv_name,pvseg_start"
# Configuration option report/pvsegs_cols.
# List of columns to sort by when reporting 'pvs --segments' command.
# See 'pvs --segments -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# pvsegs_cols = "pv_name,vg_name,pv_fmt,pv_attr,pv_size,pv_free,pvseg_start,pvseg_size"
# Configuration option report/pvsegs_cols_verbose.
# List of columns to sort by when reporting 'pvs --segments' command in verbose mode.
# See 'pvs --segments -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# pvsegs_cols_verbose = "pv_name,vg_name,pv_fmt,pv_attr,pv_size,pv_free,pvseg_start,pvseg_size,lv_name,seg_start_pe,segtype,seg_pe_ranges"
# Configuration option report/vgs_cols_full.
# List of columns to report for lvm fullreport's 'vgs' subreport.
# See 'vgs -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# vgs_cols_full = "vg_all"
# Configuration option report/pvs_cols_full.
# List of columns to report for lvm fullreport's 'vgs' subreport.
# See 'pvs -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# pvs_cols_full = "pv_all"
# Configuration option report/lvs_cols_full.
# List of columns to report for lvm fullreport's 'lvs' subreport.
# See 'lvs -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# lvs_cols_full = "lv_all"
# Configuration option report/pvsegs_cols_full.
# List of columns to report for lvm fullreport's 'pvseg' subreport.
# See 'pvs --segments -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# pvsegs_cols_full = "pvseg_all,pv_uuid,lv_uuid"
# Configuration option report/segs_cols_full.
# List of columns to report for lvm fullreport's 'seg' subreport.
# See 'lvs --segments -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# segs_cols_full = "seg_all,lv_uuid"
# Configuration option report/vgs_sort_full.
# List of columns to sort by when reporting lvm fullreport's 'vgs' subreport.
# See 'vgs -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# vgs_sort_full = "vg_name"
# Configuration option report/pvs_sort_full.
# List of columns to sort by when reporting lvm fullreport's 'vgs' subreport.
# See 'pvs -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# pvs_sort_full = "pv_name"
# Configuration option report/lvs_sort_full.
# List of columns to sort by when reporting lvm fullreport's 'lvs' subreport.
# See 'lvs -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# lvs_sort_full = "vg_name,lv_name"
# Configuration option report/pvsegs_sort_full.
# List of columns to sort by when reporting for lvm fullreport's 'pvseg' subreport.
# See 'pvs --segments -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# pvsegs_sort_full = "pv_uuid,pvseg_start"
# Configuration option report/segs_sort_full.
# List of columns to sort by when reporting lvm fullreport's 'seg' subreport.
# See 'lvs --segments -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# segs_sort_full = "lv_uuid,seg_start"
# Configuration option report/mark_hidden_devices.
# Use brackets [] to mark hidden devices.
# This configuration option has an automatic default value.
# mark_hidden_devices = 1
# Configuration option report/two_word_unknown_device.
# Use the two words 'unknown device' in place of '[unknown]'.
# This is displayed when the device for a PV is not known.
# This configuration option has an automatic default value.
# two_word_unknown_device = 0
# }
# Configuration section dmeventd.
# Settings for the LVM event daemon.
dmeventd {
# Configuration option dmeventd/mirror_library.
# The library dmeventd uses when monitoring a mirror device.
# libdevmapper-event-lvm2mirror.so attempts to recover from
# failures. It removes failed devices from a volume group and
# reconfigures a mirror as necessary. If no mirror library is
# provided, mirrors are not monitored through dmeventd.
mirror_library = "libdevmapper-event-lvm2mirror.so"
# Configuration option dmeventd/raid_library.
# This configuration option has an automatic default value.
# raid_library = "libdevmapper-event-lvm2raid.so"
# Configuration option dmeventd/snapshot_library.
# The library dmeventd uses when monitoring a snapshot device.
# libdevmapper-event-lvm2snapshot.so monitors the filling of snapshots
# and emits a warning through syslog when the usage exceeds 80%. The
# warning is repeated when 85%, 90% and 95% of the snapshot is filled.
snapshot_library = "libdevmapper-event-lvm2snapshot.so"
# Configuration option dmeventd/thin_library.
# The library dmeventd uses when monitoring a thin device.
# libdevmapper-event-lvm2thin.so monitors the filling of a pool
# and emits a warning through syslog when the usage exceeds 80%. The
# warning is repeated when 85%, 90% and 95% of the pool is filled.
thin_library = "libdevmapper-event-lvm2thin.so"
# Configuration option dmeventd/thin_command.
# The plugin runs command with each 5% increment when thin-pool data volume
# or metadata volume gets above 50%.
# Command which starts with 'lvm ' prefix is internal lvm command.
# You can write your own handler to customise behaviour in more details.
# User handler is specified with the full path starting with '/'.
# This configuration option has an automatic default value.
# thin_command = "lvm lvextend --use-policies"
# Configuration option dmeventd/executable.
# The full path to the dmeventd binary.
# This configuration option has an automatic default value.
# executable = "/usr/sbin/dmeventd"
}
# Configuration section tags.
# Host tag settings.
# This configuration section has an automatic default value.
# tags {
# Configuration option tags/hosttags.
# Create a host tag using the machine name.
# The machine name is nodename returned by uname(2).
# This configuration option has an automatic default value.
# hosttags = 0
# Configuration section tags/.
# Replace this subsection name with a custom tag name.
# Multiple subsections like this can be created. The '@' prefix for
# tags is optional. This subsection can contain host_list, which is a
# list of machine names. If the name of the local machine is found in
# host_list, then the name of this subsection is used as a tag and is
# applied to the local machine as a 'host tag'. If this subsection is
# empty (has no host_list), then the subsection name is always applied
# as a 'host tag'.
#
# Example
# The host tag foo is given to all hosts, and the host tag
# bar is given to the hosts named machine1 and machine2.
# tags { foo { } bar { host_list = [ "machine1", "machine2" ] } }
#
# This configuration section has variable name.
# This configuration section has an automatic default value.
# tag {
# Configuration option tags//host_list.
# A list of machine names.
# These machine names are compared to the nodename returned
# by uname(2). If the local machine name matches an entry in
# this list, the name of the subsection is applied to the
# machine as a 'host tag'.
# This configuration option does not have a default value defined.
# }
# }
kiwi-boxed-plugin-0.2.31/boxes/leap/root/etc/sysconfig/ 0000775 0000000 0000000 00000000000 14516463774 0022757 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/leap/root/etc/sysconfig/network/ 0000775 0000000 0000000 00000000000 14516463774 0024450 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/leap/root/etc/sysconfig/network/ifcfg-lan0 0000664 0000000 0000000 00000000074 14516463774 0026302 0 ustar 00root root 0000000 0000000 BOOTPROTO='dhcp'
MTU=''
REMOTE_IPADDR=''
STARTMODE='onboot'
kiwi-boxed-plugin-0.2.31/boxes/leap/root/etc/systemd/ 0000775 0000000 0000000 00000000000 14516463774 0022443 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/leap/root/etc/systemd/system/ 0000775 0000000 0000000 00000000000 14516463774 0023767 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/leap/root/etc/systemd/system/serial-getty@hvc0.service.d/ 0000775 0000000 0000000 00000000000 14516463774 0031142 5 ustar 00root root 0000000 0000000 override.conf 0000664 0000000 0000000 00000000161 14516463774 0033547 0 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/leap/root/etc/systemd/system/serial-getty@hvc0.service.d [Service]
ExecStart=
ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud 115200,38400,9600 hvc0 $TERM
kiwi-boxed-plugin-0.2.31/boxes/leap/root/etc/systemd/system/serial-getty@ttyS0.service.d/ 0000775 0000000 0000000 00000000000 14516463774 0031325 5 ustar 00root root 0000000 0000000 override.conf 0000664 0000000 0000000 00000000162 14516463774 0033733 0 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/leap/root/etc/systemd/system/serial-getty@ttyS0.service.d [Service]
ExecStart=
ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud 115200,38400,9600 ttyS0 $TERM
kiwi-boxed-plugin-0.2.31/boxes/leap/root/etc/udev/ 0000775 0000000 0000000 00000000000 14516463774 0021716 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/leap/root/etc/udev/rules.d/ 0000775 0000000 0000000 00000000000 14516463774 0023272 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/leap/root/etc/udev/rules.d/70-persistent-net.rules 0000664 0000000 0000000 00000000205 14516463774 0027553 0 ustar 00root root 0000000 0000000 SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="?*", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="?*", NAME="lan0"
kiwi-boxed-plugin-0.2.31/boxes/leap/root/usr/ 0000775 0000000 0000000 00000000000 14516463774 0021011 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/leap/root/usr/lib/ 0000775 0000000 0000000 00000000000 14516463774 0021557 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/leap/root/usr/lib/systemd/ 0000775 0000000 0000000 00000000000 14516463774 0023247 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/leap/root/usr/lib/systemd/system/ 0000775 0000000 0000000 00000000000 14516463774 0024573 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/leap/root/usr/lib/systemd/system/kiwi.service 0000664 0000000 0000000 00000000263 14516463774 0027121 0 ustar 00root root 0000000 0000000 [Unit]
Description=Start kiwi build process
After=network.target
Requires=network-online.target
[Service]
ExecStart=/usr/local/bin/run_kiwi
[Install]
WantedBy=multi-user.target
kiwi-boxed-plugin-0.2.31/boxes/tumbleweed/ 0000775 0000000 0000000 00000000000 14516463774 0020431 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/tumbleweed/appliance.kiwi 0000664 0000000 0000000 00000007040 14516463774 0023253 0 ustar 00root root 0000000 0000000
Marcus Schäferms@suse.comTumbleWeed VM for kiwi boxed build1.42.2zypperen_USusUTCtruefalsefalse50
kiwi-boxed-plugin-0.2.31/boxes/tumbleweed/config.sh 0000664 0000000 0000000 00000002017 14516463774 0022232 0 ustar 00root root 0000000 0000000 #!/bin/bash
test -f /.kconfig && . /.kconfig
test -f /.profile && . /.profile
#======================================
# Setup baseproduct link
#--------------------------------------
suseSetupProduct
#======================================
# Setup default target, multi-user
#--------------------------------------
baseSetRunlevel 3
#==================================
# Disable services
#----------------------------------
systemctl mask systemd-logind.service
systemctl mask systemd-update-utmp.service
systemctl mask auditd.service
systemctl mask systemd-update-utmp-runlevel.service
systemctl mask systemd-user-sessions.service
#======================================
# Activate kiwi service
#--------------------------------------
suseInsertService sshd
suseInsertService kiwi
#======================================
# lvmetad sucks for building lvm images
#--------------------------------------
systemctl disable lvm2-lvmetad
systemctl mask lvm2-lvmetad
systemctl disable lvm2-lvmetad.socket
systemctl mask lvm2-lvmetad.socket
kiwi-boxed-plugin-0.2.31/boxes/tumbleweed/root/ 0000775 0000000 0000000 00000000000 14516463774 0021414 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/tumbleweed/root/etc/ 0000775 0000000 0000000 00000000000 14516463774 0022167 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/tumbleweed/root/etc/fstab.script 0000775 0000000 0000000 00000000077 14516463774 0024523 0 ustar 00root root 0000000 0000000 #!/bin/bash
echo "/dev/vda1 / ext2 defaults 0 0" > /etc/fstab
kiwi-boxed-plugin-0.2.31/boxes/tumbleweed/root/etc/lvm/ 0000775 0000000 0000000 00000000000 14516463774 0022765 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/tumbleweed/root/etc/lvm/lvm.conf 0000664 0000000 0000000 00000270545 14516463774 0024447 0 ustar 00root root 0000000 0000000 # This is an example configuration file for the LVM2 system.
# It contains the default settings that would be used if there was no
# /etc/lvm/lvm.conf file.
#
# Refer to 'man lvm.conf' for further information including the file layout.
#
# Refer to 'man lvm.conf' for information about how settings configured in
# this file are combined with built-in values and command line options to
# arrive at the final values used by LVM.
#
# Refer to 'man lvmconfig' for information about displaying the built-in
# and configured values used by LVM.
#
# If a default value is set in this file (not commented out), then a
# new version of LVM using this file will continue using that value,
# even if the new version of LVM changes the built-in default value.
#
# To put this file in a different directory and override /etc/lvm set
# the environment variable LVM_SYSTEM_DIR before running the tools.
#
# N.B. Take care that each setting only appears once if uncommenting
# example settings in this file.
#hello
# Configuration section config.
# How LVM configuration settings are handled.
config {
# Configuration option config/checks.
# If enabled, any LVM configuration mismatch is reported.
# This implies checking that the configuration key is understood by
# LVM and that the value of the key is the proper type. If disabled,
# any configuration mismatch is ignored and the default value is used
# without any warning (a message about the configuration key not being
# found is issued in verbose mode only).
checks = 1
# Configuration option config/abort_on_errors.
# Abort the LVM process if a configuration mismatch is found.
abort_on_errors = 0
# Configuration option config/profile_dir.
# Directory where LVM looks for configuration profiles.
profile_dir = "/etc/lvm/profile"
}
# Configuration section devices.
# How LVM uses block devices.
devices {
# Configuration option devices/dir.
# Directory in which to create volume group device nodes.
# Commands also accept this as a prefix on volume group names.
# This configuration option is advanced.
dir = "/dev"
# Configuration option devices/scan.
# Directories containing device nodes to use with LVM.
# This configuration option is advanced.
scan = [ "/dev" ]
# Configuration option devices/obtain_device_list_from_udev.
# Obtain the list of available devices from udev.
# This avoids opening or using any inapplicable non-block devices or
# subdirectories found in the udev directory. Any device node or
# symlink not managed by udev in the udev directory is ignored. This
# setting applies only to the udev-managed device directory; other
# directories will be scanned fully. LVM needs to be compiled with
# udev support for this setting to apply.
obtain_device_list_from_udev = 1
# Configuration option devices/external_device_info_source.
# Select an external device information source.
# Some information may already be available in the system and LVM can
# use this information to determine the exact type or use of devices it
# processes. Using an existing external device information source can
# speed up device processing as LVM does not need to run its own native
# routines to acquire this information. For example, this information
# is used to drive LVM filtering like MD component detection, multipath
# component detection, partition detection and others.
#
# Accepted values:
# none
# No external device information source is used.
# udev
# Reuse existing udev database records. Applicable only if LVM is
# compiled with udev support.
#
external_device_info_source = "none"
# Configuration option devices/preferred_names.
# Select which path name to display for a block device.
# If multiple path names exist for a block device, and LVM needs to
# display a name for the device, the path names are matched against
# each item in this list of regular expressions. The first match is
# used. Try to avoid using undescriptive /dev/dm-N names, if present.
# If no preferred name matches, or if preferred_names are not defined,
# the following built-in preferences are applied in order until one
# produces a preferred name:
# Prefer names with path prefixes in the order of:
# /dev/mapper, /dev/disk, /dev/dm-*, /dev/block.
# Prefer the name with the least number of slashes.
# Prefer a name that is a symlink.
# Prefer the path with least value in lexicographical order.
#
# Example
# preferred_names = [ "^/dev/mpath/", "^/dev/mapper/mpath", "^/dev/[hs]d" ]
#
preferred_names = [ "^/dev/mpath/", "^/dev/mapper/mpath", "^/dev/[hs]d" ]
# Configuration option devices/filter.
# Limit the block devices that are used by LVM commands.
# This is a list of regular expressions used to accept or reject block
# device path names. Each regex is delimited by a vertical bar '|'
# (or any character) and is preceded by 'a' to accept the path, or
# by 'r' to reject the path. The first regex in the list to match the
# path is used, producing the 'a' or 'r' result for the device.
# When multiple path names exist for a block device, if any path name
# matches an 'a' pattern before an 'r' pattern, then the device is
# accepted. If all the path names match an 'r' pattern first, then the
# device is rejected. Unmatching path names do not affect the accept
# or reject decision. If no path names for a device match a pattern,
# then the device is accepted. Be careful mixing 'a' and 'r' patterns,
# as the combination might produce unexpected results (test changes.)
# Run vgscan after changing the filter to regenerate the cache.
# See the use_lvmetad comment for a special case regarding filters.
#
# Example
# Accept every block device:
# filter = [ "a|.*/|" ]
# Reject the cdrom drive:
# filter = [ "r|/dev/cdrom|" ]
# Work with just loopback devices, e.g. for testing:
# filter = [ "a|loop|", "r|.*|" ]
# Accept all loop devices and ide drives except hdc:
# filter = [ "a|loop|", "r|/dev/hdc|", "a|/dev/ide|", "r|.*|" ]
# Use anchors to be very specific:
# filter = [ "a|^/dev/hda8$|", "r|.*/|" ]
#
# This configuration option has an automatic default value.
# filter = [ "a|.*/|" ]
filter = [ "r|/dev/.*/by-path/.*|", "r|/dev/.*/by-id/.*|", "r|/dev/fd.*|", "r|/dev/cdrom|", "a/.*/" ]
# Configuration option devices/global_filter.
# Limit the block devices that are used by LVM system components.
# Because devices/filter may be overridden from the command line, it is
# not suitable for system-wide device filtering, e.g. udev and lvmetad.
# Use global_filter to hide devices from these LVM system components.
# The syntax is the same as devices/filter. Devices rejected by
# global_filter are not opened by LVM.
# This configuration option has an automatic default value.
# global_filter = [ "a|.*/|" ]
# Configuration option devices/cache_dir.
# Directory in which to store the device cache file.
# The results of filtering are cached on disk to avoid rescanning dud
# devices (which can take a very long time). By default this cache is
# stored in a file named .cache. It is safe to delete this file; the
# tools regenerate it. If obtain_device_list_from_udev is enabled, the
# list of devices is obtained from udev and any existing .cache file
# is removed.
cache_dir = "/etc/lvm/cache"
# Configuration option devices/cache_file_prefix.
# A prefix used before the .cache file name. See devices/cache_dir.
cache_file_prefix = ""
# Configuration option devices/write_cache_state.
# Enable/disable writing the cache file. See devices/cache_dir.
write_cache_state = 1
# Configuration option devices/types.
# List of additional acceptable block device types.
# These are of device type names from /proc/devices, followed by the
# maximum number of partitions.
#
# Example
# types = [ "fd", 16 ]
#
# This configuration option is advanced.
# This configuration option does not have a default value defined.
# Configuration option devices/sysfs_scan.
# Restrict device scanning to block devices appearing in sysfs.
# This is a quick way of filtering out block devices that are not
# present on the system. sysfs must be part of the kernel and mounted.)
sysfs_scan = 1
# Configuration option devices/multipath_component_detection.
# Ignore devices that are components of DM multipath devices.
multipath_component_detection = 1
# Configuration option devices/md_component_detection.
# Ignore devices that are components of software RAID (md) devices.
md_component_detection = 1
# Configuration option devices/fw_raid_component_detection.
# Ignore devices that are components of firmware RAID devices.
# LVM must use an external_device_info_source other than none for this
# detection to execute.
fw_raid_component_detection = 0
# Configuration option devices/md_chunk_alignment.
# Align PV data blocks with md device's stripe-width.
# This applies if a PV is placed directly on an md device.
md_chunk_alignment = 1
# Configuration option devices/default_data_alignment.
# Default alignment of the start of a PV data area in MB.
# If set to 0, a value of 64KiB will be used.
# Set to 1 for 1MiB, 2 for 2MiB, etc.
# This configuration option has an automatic default value.
# default_data_alignment = 1
# Configuration option devices/data_alignment_detection.
# Detect PV data alignment based on sysfs device information.
# The start of a PV data area will be a multiple of minimum_io_size or
# optimal_io_size exposed in sysfs. minimum_io_size is the smallest
# request the device can perform without incurring a read-modify-write
# penalty, e.g. MD chunk size. optimal_io_size is the device's
# preferred unit of receiving I/O, e.g. MD stripe width.
# minimum_io_size is used if optimal_io_size is undefined (0).
# If md_chunk_alignment is enabled, that detects the optimal_io_size.
# This setting takes precedence over md_chunk_alignment.
data_alignment_detection = 1
# Configuration option devices/data_alignment.
# Alignment of the start of a PV data area in KiB.
# If a PV is placed directly on an md device and md_chunk_alignment or
# data_alignment_detection are enabled, then this setting is ignored.
# Otherwise, md_chunk_alignment and data_alignment_detection are
# disabled if this is set. Set to 0 to use the default alignment or the
# page size, if larger.
data_alignment = 0
# Configuration option devices/data_alignment_offset_detection.
# Detect PV data alignment offset based on sysfs device information.
# The start of a PV aligned data area will be shifted by the
# alignment_offset exposed in sysfs. This offset is often 0, but may
# be non-zero. Certain 4KiB sector drives that compensate for windows
# partitioning will have an alignment_offset of 3584 bytes (sector 7
# is the lowest aligned logical block, the 4KiB sectors start at
# LBA -1, and consequently sector 63 is aligned on a 4KiB boundary).
# pvcreate --dataalignmentoffset will skip this detection.
data_alignment_offset_detection = 1
# Configuration option devices/ignore_suspended_devices.
# Ignore DM devices that have I/O suspended while scanning devices.
# Otherwise, LVM waits for a suspended device to become accessible.
# This should only be needed in recovery situations.
ignore_suspended_devices = 0
# Configuration option devices/ignore_lvm_mirrors.
# Do not scan 'mirror' LVs to avoid possible deadlocks.
# This avoids possible deadlocks when using the 'mirror' segment type.
# This setting determines whether LVs using the 'mirror' segment type
# are scanned for LVM labels. This affects the ability of mirrors to
# be used as physical volumes. If this setting is enabled, it is
# impossible to create VGs on top of mirror LVs, i.e. to stack VGs on
# mirror LVs. If this setting is disabled, allowing mirror LVs to be
# scanned, it may cause LVM processes and I/O to the mirror to become
# blocked. This is due to the way that the mirror segment type handles
# failures. In order for the hang to occur, an LVM command must be run
# just after a failure and before the automatic LVM repair process
# takes place, or there must be failures in multiple mirrors in the
# same VG at the same time with write failures occurring moments before
# a scan of the mirror's labels. The 'mirror' scanning problems do not
# apply to LVM RAID types like 'raid1' which handle failures in a
# different way, making them a better choice for VG stacking.
ignore_lvm_mirrors = 1
# Configuration option devices/disable_after_error_count.
# Number of I/O errors after which a device is skipped.
# During each LVM operation, errors received from each device are
# counted. If the counter of a device exceeds the limit set here,
# no further I/O is sent to that device for the remainder of the
# operation. Setting this to 0 disables the counters altogether.
disable_after_error_count = 0
# Configuration option devices/require_restorefile_with_uuid.
# Allow use of pvcreate --uuid without requiring --restorefile.
require_restorefile_with_uuid = 1
# Configuration option devices/pv_min_size.
# Minimum size in KiB of block devices which can be used as PVs.
# In a clustered environment all nodes must use the same value.
# Any value smaller than 512KiB is ignored. The previous built-in
# value was 512.
pv_min_size = 2048
# Configuration option devices/issue_discards.
# Issue discards to PVs that are no longer used by an LV.
# Discards are sent to an LV's underlying physical volumes when the LV
# is no longer using the physical volumes' space, e.g. lvremove,
# lvreduce. Discards inform the storage that a region is no longer
# used. Storage that supports discards advertise the protocol-specific
# way discards should be issued by the kernel (TRIM, UNMAP, or
# WRITE SAME with UNMAP bit set). Not all storage will support or
# benefit from discards, but SSDs and thinly provisioned LUNs
# generally do. If enabled, discards will only be issued if both the
# storage and kernel provide support.
issue_discards = 0
# Configuration option devices/allow_changes_with_duplicate_pvs.
# Allow VG modification while a PV appears on multiple devices.
# When a PV appears on multiple devices, LVM attempts to choose the
# best device to use for the PV. If the devices represent the same
# underlying storage, the choice has minimal consequence. If the
# devices represent different underlying storage, the wrong choice
# can result in data loss if the VG is modified. Disabling this
# setting is the safest option because it prevents modifying a VG
# or activating LVs in it while a PV appears on multiple devices.
# Enabling this setting allows the VG to be used as usual even with
# uncertain devices.
allow_changes_with_duplicate_pvs = 0
}
# Configuration section allocation.
# How LVM selects space and applies properties to LVs.
allocation {
# Configuration option allocation/cling_tag_list.
# Advise LVM which PVs to use when searching for new space.
# When searching for free space to extend an LV, the 'cling' allocation
# policy will choose space on the same PVs as the last segment of the
# existing LV. If there is insufficient space and a list of tags is
# defined here, it will check whether any of them are attached to the
# PVs concerned and then seek to match those PV tags between existing
# extents and new extents.
#
# Example
# Use the special tag "@*" as a wildcard to match any PV tag:
# cling_tag_list = [ "@*" ]
# LVs are mirrored between two sites within a single VG, and
# PVs are tagged with either @site1 or @site2 to indicate where
# they are situated:
# cling_tag_list = [ "@site1", "@site2" ]
#
# This configuration option does not have a default value defined.
# Configuration option allocation/maximise_cling.
# Use a previous allocation algorithm.
# Changes made in version 2.02.85 extended the reach of the 'cling'
# policies to detect more situations where data can be grouped onto
# the same disks. This setting can be used to disable the changes
# and revert to the previous algorithm.
maximise_cling = 1
# Configuration option allocation/use_blkid_wiping.
# Use blkid to detect existing signatures on new PVs and LVs.
# The blkid library can detect more signatures than the native LVM
# detection code, but may take longer. LVM needs to be compiled with
# blkid wiping support for this setting to apply. LVM native detection
# code is currently able to recognize: MD device signatures,
# swap signature, and LUKS signatures. To see the list of signatures
# recognized by blkid, check the output of the 'blkid -k' command.
use_blkid_wiping = 1
# Configuration option allocation/wipe_signatures_when_zeroing_new_lvs.
# Look for and erase any signatures while zeroing a new LV.
# The --wipesignatures option overrides this setting.
# Zeroing is controlled by the -Z/--zero option, and if not specified,
# zeroing is used by default if possible. Zeroing simply overwrites the
# first 4KiB of a new LV with zeroes and does no signature detection or
# wiping. Signature wiping goes beyond zeroing and detects exact types
# and positions of signatures within the whole LV. It provides a
# cleaner LV after creation as all known signatures are wiped. The LV
# is not claimed incorrectly by other tools because of old signatures
# from previous use. The number of signatures that LVM can detect
# depends on the detection code that is selected (see
# use_blkid_wiping.) Wiping each detected signature must be confirmed.
# When this setting is disabled, signatures on new LVs are not detected
# or erased unless the --wipesignatures option is used directly.
wipe_signatures_when_zeroing_new_lvs = 1
# Configuration option allocation/mirror_logs_require_separate_pvs.
# Mirror logs and images will always use different PVs.
# The default setting changed in version 2.02.85.
mirror_logs_require_separate_pvs = 0
# Configuration option allocation/raid_stripe_all_devices.
# Stripe across all PVs when RAID stripes are not specified.
# If enabled, all PVs in the VG or on the command line are used for
# raid0/4/5/6/10 when the command does not specify the number of
# stripes to use.
# This was the default behaviour until release 2.02.162.
# This configuration option has an automatic default value.
# raid_stripe_all_devices = 0
# Configuration option allocation/cache_pool_metadata_require_separate_pvs.
# Cache pool metadata and data will always use different PVs.
cache_pool_metadata_require_separate_pvs = 0
# Configuration option allocation/cache_metadata_format.
# Sets default metadata format for new cache.
#
# Accepted values:
# 0 Automatically detected best available format
# 1 Original format
# 2 Improved 2nd. generation format
#
# This configuration option has an automatic default value.
# cache_metadata_format = 0
# Configuration option allocation/cache_mode.
# The default cache mode used for new cache.
#
# Accepted values:
# writethrough
# Data blocks are immediately written from the cache to disk.
# writeback
# Data blocks are written from the cache back to disk after some
# delay to improve performance.
#
# This setting replaces allocation/cache_pool_cachemode.
# This configuration option has an automatic default value.
# cache_mode = "writethrough"
# Configuration option allocation/cache_policy.
# The default cache policy used for new cache volume.
# Since kernel 4.2 the default policy is smq (Stochastic multiqueue),
# otherwise the older mq (Multiqueue) policy is selected.
# This configuration option does not have a default value defined.
# Configuration section allocation/cache_settings.
# Settings for the cache policy.
# See documentation for individual cache policies for more info.
# This configuration section has an automatic default value.
# cache_settings {
# }
# Configuration option allocation/cache_pool_chunk_size.
# The minimal chunk size in KiB for cache pool volumes.
# Using a chunk_size that is too large can result in wasteful use of
# the cache, where small reads and writes can cause large sections of
# an LV to be mapped into the cache. However, choosing a chunk_size
# that is too small can result in more overhead trying to manage the
# numerous chunks that become mapped into the cache. The former is
# more of a problem than the latter in most cases, so the default is
# on the smaller end of the spectrum. Supported values range from
# 32KiB to 1GiB in multiples of 32.
# This configuration option does not have a default value defined.
# Configuration option allocation/cache_pool_max_chunks.
# The maximum number of chunks in a cache pool.
# For cache target v1.9 the recommended maximumm is 1000000 chunks.
# Using cache pool with more chunks may degrade cache performance.
# This configuration option does not have a default value defined.
# Configuration option allocation/thin_pool_metadata_require_separate_pvs.
# Thin pool metdata and data will always use different PVs.
thin_pool_metadata_require_separate_pvs = 0
# Configuration option allocation/thin_pool_zero.
# Thin pool data chunks are zeroed before they are first used.
# Zeroing with a larger thin pool chunk size reduces performance.
# This configuration option has an automatic default value.
# thin_pool_zero = 1
# Configuration option allocation/thin_pool_discards.
# The discards behaviour of thin pool volumes.
#
# Accepted values:
# ignore
# nopassdown
# passdown
#
# This configuration option has an automatic default value.
# thin_pool_discards = "passdown"
# Configuration option allocation/thin_pool_chunk_size_policy.
# The chunk size calculation policy for thin pool volumes.
#
# Accepted values:
# generic
# If thin_pool_chunk_size is defined, use it. Otherwise, calculate
# the chunk size based on estimation and device hints exposed in
# sysfs - the minimum_io_size. The chunk size is always at least
# 64KiB.
# performance
# If thin_pool_chunk_size is defined, use it. Otherwise, calculate
# the chunk size for performance based on device hints exposed in
# sysfs - the optimal_io_size. The chunk size is always at least
# 512KiB.
#
# This configuration option has an automatic default value.
# thin_pool_chunk_size_policy = "generic"
# Configuration option allocation/thin_pool_chunk_size.
# The minimal chunk size in KiB for thin pool volumes.
# Larger chunk sizes may improve performance for plain thin volumes,
# however using them for snapshot volumes is less efficient, as it
# consumes more space and takes extra time for copying. When unset,
# lvm tries to estimate chunk size starting from 64KiB. Supported
# values are in the range 64KiB to 1GiB.
# This configuration option does not have a default value defined.
# Configuration option allocation/physical_extent_size.
# Default physical extent size in KiB to use for new VGs.
# This configuration option has an automatic default value.
# physical_extent_size = 4096
}
# Configuration section log.
# How LVM log information is reported.
log {
# Configuration option log/report_command_log.
# Enable or disable LVM log reporting.
# If enabled, LVM will collect a log of operations, messages,
# per-object return codes with object identification and associated
# error numbers (errnos) during LVM command processing. Then the
# log is either reported solely or in addition to any existing
# reports, depending on LVM command used. If it is a reporting command
# (e.g. pvs, vgs, lvs, lvm fullreport), then the log is reported in
# addition to any existing reports. Otherwise, there's only log report
# on output. For all applicable LVM commands, you can request that
# the output has only log report by using --logonly command line
# option. Use log/command_log_cols and log/command_log_sort settings
# to define fields to display and sort fields for the log report.
# You can also use log/command_log_selection to define selection
# criteria used each time the log is reported.
# This configuration option has an automatic default value.
# report_command_log = 0
# Configuration option log/command_log_sort.
# List of columns to sort by when reporting command log.
# See --logonly --configreport log -o help
# for the list of possible fields.
# This configuration option has an automatic default value.
# command_log_sort = "log_seq_num"
# Configuration option log/command_log_cols.
# List of columns to report when reporting command log.
# See --logonly --configreport log -o help
# for the list of possible fields.
# This configuration option has an automatic default value.
# command_log_cols = "log_seq_num,log_type,log_context,log_object_type,log_object_name,log_object_id,log_object_group,log_object_group_id,log_message,log_errno,log_ret_code"
# Configuration option log/command_log_selection.
# Selection criteria used when reporting command log.
# You can define selection criteria that are applied each
# time log is reported. This way, it is possible to control the
# amount of log that is displayed on output and you can select
# only parts of the log that are important for you. To define
# selection criteria, use fields from log report. See also
# --logonly --configreport log -S help for the
# list of possible fields and selection operators. You can also
# define selection criteria for log report on command line directly
# using --configreport log -S
# which has precedence over log/command_log_selection setting.
# For more information about selection criteria in general, see
# lvm(8) man page.
# This configuration option has an automatic default value.
# command_log_selection = "!(log_type=status && message=success)"
# Configuration option log/verbose.
# Controls the messages sent to stdout or stderr.
verbose = 0
# Configuration option log/silent.
# Suppress all non-essential messages from stdout.
# This has the same effect as -qq. When enabled, the following commands
# still produce output: dumpconfig, lvdisplay, lvmdiskscan, lvs, pvck,
# pvdisplay, pvs, version, vgcfgrestore -l, vgdisplay, vgs.
# Non-essential messages are shifted from log level 4 to log level 5
# for syslog and lvm2_log_fn purposes.
# Any 'yes' or 'no' questions not overridden by other arguments are
# suppressed and default to 'no'.
silent = 0
# Configuration option log/syslog.
# Send log messages through syslog.
syslog = 1
# Configuration option log/file.
# Write error and debug log messages to a file specified here.
# This configuration option does not have a default value defined.
# file = "/var/log/lvm2.log"
# Configuration option log/overwrite.
# Overwrite the log file each time the program is run.
overwrite = 0
# Configuration option log/level.
# The level of log messages that are sent to the log file or syslog.
# There are 6 syslog-like log levels currently in use: 2 to 7 inclusive.
# 7 is the most verbose (LOG_DEBUG).
level = 0
# Configuration option log/indent.
# Indent messages according to their severity.
indent = 1
# Configuration option log/command_names.
# Display the command name on each line of output.
command_names = 0
# Configuration option log/prefix.
# A prefix to use before the log message text.
# (After the command name, if selected).
# Two spaces allows you to see/grep the severity of each message.
# To make the messages look similar to the original LVM tools use:
# indent = 0, command_names = 1, prefix = " -- "
prefix = " "
# Configuration option log/activation.
# Log messages during activation.
# Don't use this in low memory situations (can deadlock).
activation = 0
# Configuration option log/debug_classes.
# Select log messages by class.
# Some debugging messages are assigned to a class and only appear in
# debug output if the class is listed here. Classes currently
# available: memory, devices, activation, allocation, lvmetad,
# metadata, cache, locking, lvmpolld. Use "all" to see everything.
debug_classes = [ "memory", "devices", "activation", "allocation", "lvmetad", "metadata", "cache", "locking", "lvmpolld", "dbus" ]
}
# Configuration section backup.
# How LVM metadata is backed up and archived.
# In LVM, a 'backup' is a copy of the metadata for the current system,
# and an 'archive' contains old metadata configurations. They are
# stored in a human readable text format.
backup {
# Configuration option backup/backup.
# Maintain a backup of the current metadata configuration.
# Think very hard before turning this off!
backup = 1
# Configuration option backup/backup_dir.
# Location of the metadata backup files.
# Remember to back up this directory regularly!
backup_dir = "/etc/lvm/backup"
# Configuration option backup/archive.
# Maintain an archive of old metadata configurations.
# Think very hard before turning this off.
archive = 1
# Configuration option backup/archive_dir.
# Location of the metdata archive files.
# Remember to back up this directory regularly!
archive_dir = "/etc/lvm/archive"
# Configuration option backup/retain_min.
# Minimum number of archives to keep.
retain_min = 10
# Configuration option backup/retain_days.
# Minimum number of days to keep archive files.
retain_days = 30
}
# Configuration section shell.
# Settings for running LVM in shell (readline) mode.
shell {
# Configuration option shell/history_size.
# Number of lines of history to store in ~/.lvm_history.
history_size = 100
}
# Configuration section global.
# Miscellaneous global LVM settings.
global {
# Configuration option global/umask.
# The file creation mask for any files and directories created.
# Interpreted as octal if the first digit is zero.
umask = 077
# Configuration option global/test.
# No on-disk metadata changes will be made in test mode.
# Equivalent to having the -t option on every command.
test = 0
# Configuration option global/units.
# Default value for --units argument.
units = "h"
# Configuration option global/si_unit_consistency.
# Distinguish between powers of 1024 and 1000 bytes.
# The LVM commands distinguish between powers of 1024 bytes,
# e.g. KiB, MiB, GiB, and powers of 1000 bytes, e.g. KB, MB, GB.
# If scripts depend on the old behaviour, disable this setting
# temporarily until they are updated.
si_unit_consistency = 1
# Configuration option global/suffix.
# Display unit suffix for sizes.
# This setting has no effect if the units are in human-readable form
# (global/units = "h") in which case the suffix is always displayed.
suffix = 1
# Configuration option global/activation.
# Enable/disable communication with the kernel device-mapper.
# Disable to use the tools to manipulate LVM metadata without
# activating any logical volumes. If the device-mapper driver
# is not present in the kernel, disabling this should suppress
# the error messages.
activation = 1
# Configuration option global/fallback_to_lvm1.
# Try running LVM1 tools if LVM cannot communicate with DM.
# This option only applies to 2.4 kernels and is provided to help
# switch between device-mapper kernels and LVM1 kernels. The LVM1
# tools need to be installed with .lvm1 suffices, e.g. vgscan.lvm1.
# They will stop working once the lvm2 on-disk metadata format is used.
# This configuration option has an automatic default value.
# fallback_to_lvm1 = 1
# Configuration option global/format.
# The default metadata format that commands should use.
# The -M 1|2 option overrides this setting.
#
# Accepted values:
# lvm1
# lvm2
#
# This configuration option has an automatic default value.
# format = "lvm2"
# Configuration option global/format_libraries.
# Shared libraries that process different metadata formats.
# If support for LVM1 metadata was compiled as a shared library use
# format_libraries = "liblvm2format1.so"
# This configuration option does not have a default value defined.
# Configuration option global/segment_libraries.
# This configuration option does not have a default value defined.
# Configuration option global/proc.
# Location of proc filesystem.
# This configuration option is advanced.
proc = "/proc"
# Configuration option global/etc.
# Location of /etc system configuration directory.
etc = "/etc"
# Configuration option global/locking_type.
# Type of locking to use.
#
# Accepted values:
# 0
# Turns off locking. Warning: this risks metadata corruption if
# commands run concurrently.
# 1
# LVM uses local file-based locking, the standard mode.
# 2
# LVM uses the external shared library locking_library.
# 3
# LVM uses built-in clustered locking with clvmd.
# This is incompatible with lvmetad. If use_lvmetad is enabled,
# LVM prints a warning and disables lvmetad use.
# 4
# LVM uses read-only locking which forbids any operations that
# might change metadata.
# 5
# Offers dummy locking for tools that do not need any locks.
# You should not need to set this directly; the tools will select
# when to use it instead of the configured locking_type.
# Do not use lvmetad or the kernel device-mapper driver with this
# locking type. It is used by the --readonly option that offers
# read-only access to Volume Group metadata that cannot be locked
# safely because it belongs to an inaccessible domain and might be
# in use, for example a virtual machine image or a disk that is
# shared by a clustered machine.
#
locking_type = 1
# Configuration option global/wait_for_locks.
# When disabled, fail if a lock request would block.
wait_for_locks = 1
# Configuration option global/fallback_to_clustered_locking.
# Attempt to use built-in cluster locking if locking_type 2 fails.
# If using external locking (type 2) and initialisation fails, with
# this enabled, an attempt will be made to use the built-in clustered
# locking. Disable this if using a customised locking_library.
fallback_to_clustered_locking = 1
# Configuration option global/fallback_to_local_locking.
# Use locking_type 1 (local) if locking_type 2 or 3 fail.
# If an attempt to initialise type 2 or type 3 locking failed, perhaps
# because cluster components such as clvmd are not running, with this
# enabled, an attempt will be made to use local file-based locking
# (type 1). If this succeeds, only commands against local VGs will
# proceed. VGs marked as clustered will be ignored.
fallback_to_local_locking = 1
# Configuration option global/locking_dir.
# Directory to use for LVM command file locks.
# Local non-LV directory that holds file-based locks while commands are
# in progress. A directory like /tmp that may get wiped on reboot is OK.
locking_dir = "/run/lock/lvm"
# Configuration option global/prioritise_write_locks.
# Allow quicker VG write access during high volume read access.
# When there are competing read-only and read-write access requests for
# a volume group's metadata, instead of always granting the read-only
# requests immediately, delay them to allow the read-write requests to
# be serviced. Without this setting, write access may be stalled by a
# high volume of read-only requests. This option only affects
# locking_type 1 viz. local file-based locking.
prioritise_write_locks = 1
# Configuration option global/library_dir.
# Search this directory first for shared libraries.
# This configuration option does not have a default value defined.
# Configuration option global/locking_library.
# The external locking library to use for locking_type 2.
# This configuration option has an automatic default value.
# locking_library = "liblvm2clusterlock.so"
# Configuration option global/abort_on_internal_errors.
# Abort a command that encounters an internal error.
# Treat any internal errors as fatal errors, aborting the process that
# encountered the internal error. Please only enable for debugging.
abort_on_internal_errors = 0
# Configuration option global/detect_internal_vg_cache_corruption.
# Internal verification of VG structures.
# Check if CRC matches when a parsed VG is used multiple times. This
# is useful to catch unexpected changes to cached VG structures.
# Please only enable for debugging.
detect_internal_vg_cache_corruption = 0
# Configuration option global/metadata_read_only.
# No operations that change on-disk metadata are permitted.
# Additionally, read-only commands that encounter metadata in need of
# repair will still be allowed to proceed exactly as if the repair had
# been performed (except for the unchanged vg_seqno). Inappropriate
# use could mess up your system, so seek advice first!
metadata_read_only = 0
# Configuration option global/mirror_segtype_default.
# The segment type used by the short mirroring option -m.
# The --type mirror|raid1 option overrides this setting.
#
# Accepted values:
# mirror
# The original RAID1 implementation from LVM/DM. It is
# characterized by a flexible log solution (core, disk, mirrored),
# and by the necessity to block I/O while handling a failure.
# There is an inherent race in the dmeventd failure handling logic
# with snapshots of devices using this type of RAID1 that in the
# worst case could cause a deadlock. (Also see
# devices/ignore_lvm_mirrors.)
# raid1
# This is a newer RAID1 implementation using the MD RAID1
# personality through device-mapper. It is characterized by a
# lack of log options. (A log is always allocated for every
# device and they are placed on the same device as the image,
# so no separate devices are required.) This mirror
# implementation does not require I/O to be blocked while
# handling a failure. This mirror implementation is not
# cluster-aware and cannot be used in a shared (active/active)
# fashion in a cluster.
#
mirror_segtype_default = "raid1"
# Configuration option global/raid10_segtype_default.
# The segment type used by the -i -m combination.
# The --type raid10|mirror option overrides this setting.
# The --stripes/-i and --mirrors/-m options can both be specified
# during the creation of a logical volume to use both striping and
# mirroring for the LV. There are two different implementations.
#
# Accepted values:
# raid10
# LVM uses MD's RAID10 personality through DM. This is the
# preferred option.
# mirror
# LVM layers the 'mirror' and 'stripe' segment types. The layering
# is done by creating a mirror LV on top of striped sub-LVs,
# effectively creating a RAID 0+1 array. The layering is suboptimal
# in terms of providing redundancy and performance.
#
raid10_segtype_default = "raid10"
# Configuration option global/sparse_segtype_default.
# The segment type used by the -V -L combination.
# The --type snapshot|thin option overrides this setting.
# The combination of -V and -L options creates a sparse LV. There are
# two different implementations.
#
# Accepted values:
# snapshot
# The original snapshot implementation from LVM/DM. It uses an old
# snapshot that mixes data and metadata within a single COW
# storage volume and performs poorly when the size of stored data
# passes hundreds of MB.
# thin
# A newer implementation that uses thin provisioning. It has a
# bigger minimal chunk size (64KiB) and uses a separate volume for
# metadata. It has better performance, especially when more data
# is used. It also supports full snapshots.
#
sparse_segtype_default = "thin"
# Configuration option global/lvdisplay_shows_full_device_path.
# Enable this to reinstate the previous lvdisplay name format.
# The default format for displaying LV names in lvdisplay was changed
# in version 2.02.89 to show the LV name and path separately.
# Previously this was always shown as /dev/vgname/lvname even when that
# was never a valid path in the /dev filesystem.
# This configuration option has an automatic default value.
# lvdisplay_shows_full_device_path = 0
# Configuration option global/use_lvmetad.
# Use lvmetad to cache metadata and reduce disk scanning.
# When enabled (and running), lvmetad provides LVM commands with VG
# metadata and PV state. LVM commands then avoid reading this
# information from disks which can be slow. When disabled (or not
# running), LVM commands fall back to scanning disks to obtain VG
# metadata. lvmetad is kept updated via udev rules which must be set
# up for LVM to work correctly. (The udev rules should be installed
# by default.) Without a proper udev setup, changes in the system's
# block device configuration will be unknown to LVM, and ignored
# until a manual 'pvscan --cache' is run. If lvmetad was running
# while use_lvmetad was disabled, it must be stopped, use_lvmetad
# enabled, and then started. When using lvmetad, LV activation is
# switched to an automatic, event-based mode. In this mode, LVs are
# activated based on incoming udev events that inform lvmetad when
# PVs appear on the system. When a VG is complete (all PVs present),
# it is auto-activated. The auto_activation_volume_list setting
# controls which LVs are auto-activated (all by default.)
# When lvmetad is updated (automatically by udev events, or directly
# by pvscan --cache), devices/filter is ignored and all devices are
# scanned by default. lvmetad always keeps unfiltered information
# which is provided to LVM commands. Each LVM command then filters
# based on devices/filter. This does not apply to other, non-regexp,
# filtering settings: component filters such as multipath and MD
# are checked during pvscan --cache. To filter a device and prevent
# scanning from the LVM system entirely, including lvmetad, use
# devices/global_filter.
use_lvmetad = 0
# Configuration option global/lvmetad_update_wait_time.
# Number of seconds a command will wait for lvmetad update to finish.
# After waiting for this period, a command will not use lvmetad, and
# will revert to disk scanning.
# This configuration option has an automatic default value.
# lvmetad_update_wait_time = 10
# Configuration option global/use_lvmlockd.
# Use lvmlockd for locking among hosts using LVM on shared storage.
# Applicable only if LVM is compiled with lockd support in which
# case there is also lvmlockd(8) man page available for more
# information.
use_lvmlockd = 0
# Configuration option global/lvmlockd_lock_retries.
# Retry lvmlockd lock requests this many times.
# Applicable only if LVM is compiled with lockd support
# This configuration option has an automatic default value.
# lvmlockd_lock_retries = 3
# Configuration option global/sanlock_lv_extend.
# Size in MiB to extend the internal LV holding sanlock locks.
# The internal LV holds locks for each LV in the VG, and after enough
# LVs have been created, the internal LV needs to be extended. lvcreate
# will automatically extend the internal LV when needed by the amount
# specified here. Setting this to 0 disables the automatic extension
# and can cause lvcreate to fail. Applicable only if LVM is compiled
# with lockd support
# This configuration option has an automatic default value.
# sanlock_lv_extend = 256
# Configuration option global/thin_check_executable.
# The full path to the thin_check command.
# LVM uses this command to check that a thin metadata device is in a
# usable state. When a thin pool is activated and after it is
# deactivated, this command is run. Activation will only proceed if
# the command has an exit status of 0. Set to "" to skip this check.
# (Not recommended.) Also see thin_check_options.
# (See package device-mapper-persistent-data or thin-provisioning-tools)
# This configuration option has an automatic default value.
# thin_check_executable = "/usr/sbin/thin_check"
# Configuration option global/thin_dump_executable.
# The full path to the thin_dump command.
# LVM uses this command to dump thin pool metadata.
# (See package device-mapper-persistent-data or thin-provisioning-tools)
# This configuration option has an automatic default value.
# thin_dump_executable = "/usr/sbin/thin_dump"
# Configuration option global/thin_repair_executable.
# The full path to the thin_repair command.
# LVM uses this command to repair a thin metadata device if it is in
# an unusable state. Also see thin_repair_options.
# (See package device-mapper-persistent-data or thin-provisioning-tools)
# This configuration option has an automatic default value.
# thin_repair_executable = "/usr/sbin/thin_repair"
# Configuration option global/thin_check_options.
# List of options passed to the thin_check command.
# With thin_check version 2.1 or newer you can add the option
# --ignore-non-fatal-errors to let it pass through ignorable errors
# and fix them later. With thin_check version 3.2 or newer you should
# include the option --clear-needs-check-flag.
# This configuration option has an automatic default value.
# thin_check_options = [ "-q", "--clear-needs-check-flag" ]
# Configuration option global/thin_repair_options.
# List of options passed to the thin_repair command.
# This configuration option has an automatic default value.
# thin_repair_options = [ "" ]
# Configuration option global/thin_disabled_features.
# Features to not use in the thin driver.
# This can be helpful for testing, or to avoid using a feature that is
# causing problems. Features include: block_size, discards,
# discards_non_power_2, external_origin, metadata_resize,
# external_origin_extend, error_if_no_space.
#
# Example
# thin_disabled_features = [ "discards", "block_size" ]
#
# This configuration option does not have a default value defined.
# Configuration option global/cache_disabled_features.
# Features to not use in the cache driver.
# This can be helpful for testing, or to avoid using a feature that is
# causing problems. Features include: policy_mq, policy_smq, metadata2.
#
# Example
# cache_disabled_features = [ "policy_smq" ]
#
# This configuration option does not have a default value defined.
# Configuration option global/cache_check_executable.
# The full path to the cache_check command.
# LVM uses this command to check that a cache metadata device is in a
# usable state. When a cached LV is activated and after it is
# deactivated, this command is run. Activation will only proceed if the
# command has an exit status of 0. Set to "" to skip this check.
# (Not recommended.) Also see cache_check_options.
# (See package device-mapper-persistent-data or thin-provisioning-tools)
# This configuration option has an automatic default value.
# cache_check_executable = "/usr/sbin/cache_check"
# Configuration option global/cache_dump_executable.
# The full path to the cache_dump command.
# LVM uses this command to dump cache pool metadata.
# (See package device-mapper-persistent-data or thin-provisioning-tools)
# This configuration option has an automatic default value.
# cache_dump_executable = "/usr/sbin/cache_dump"
# Configuration option global/cache_repair_executable.
# The full path to the cache_repair command.
# LVM uses this command to repair a cache metadata device if it is in
# an unusable state. Also see cache_repair_options.
# (See package device-mapper-persistent-data or thin-provisioning-tools)
# This configuration option has an automatic default value.
# cache_repair_executable = "/usr/sbin/cache_repair"
# Configuration option global/cache_check_options.
# List of options passed to the cache_check command.
# With cache_check version 5.0 or newer you should include the option
# --clear-needs-check-flag.
# This configuration option has an automatic default value.
# cache_check_options = [ "-q", "--clear-needs-check-flag" ]
# Configuration option global/cache_repair_options.
# List of options passed to the cache_repair command.
# This configuration option has an automatic default value.
# cache_repair_options = [ "" ]
# Configuration option global/fsadm_executable.
# The full path to the fsadm command.
# LVM uses this command to help with lvresize -r operations.
# This configuration option has an automatic default value.
# fsadm_executable = "/usr/sbin/fsadm"
# Configuration option global/system_id_source.
# The method LVM uses to set the local system ID.
# Volume Groups can also be given a system ID (by vgcreate, vgchange,
# or vgimport.) A VG on shared storage devices is accessible only to
# the host with a matching system ID. See 'man lvmsystemid' for
# information on limitations and correct usage.
#
# Accepted values:
# none
# The host has no system ID.
# lvmlocal
# Obtain the system ID from the system_id setting in the 'local'
# section of an lvm configuration file, e.g. lvmlocal.conf.
# uname
# Set the system ID from the hostname (uname) of the system.
# System IDs beginning localhost are not permitted.
# machineid
# Use the contents of the machine-id file to set the system ID.
# Some systems create this file at installation time.
# See 'man machine-id' and global/etc.
# file
# Use the contents of another file (system_id_file) to set the
# system ID.
#
system_id_source = "none"
# Configuration option global/system_id_file.
# The full path to the file containing a system ID.
# This is used when system_id_source is set to 'file'.
# Comments starting with the character # are ignored.
# This configuration option does not have a default value defined.
# Configuration option global/use_lvmpolld.
# Use lvmpolld to supervise long running LVM commands.
# When enabled, control of long running LVM commands is transferred
# from the original LVM command to the lvmpolld daemon. This allows
# the operation to continue independent of the original LVM command.
# After lvmpolld takes over, the LVM command displays the progress
# of the ongoing operation. lvmpolld itself runs LVM commands to
# manage the progress of ongoing operations. lvmpolld can be used as
# a native systemd service, which allows it to be started on demand,
# and to use its own control group. When this option is disabled, LVM
# commands will supervise long running operations by forking themselves.
# Applicable only if LVM is compiled with lvmpolld support.
use_lvmpolld = 1
# Configuration option global/notify_dbus.
# Enable D-Bus notification from LVM commands.
# When enabled, an LVM command that changes PVs, changes VG metadata,
# or changes the activation state of an LV will send a notification.
notify_dbus = 1
}
# Configuration section activation.
activation {
# Configuration option activation/checks.
# Perform internal checks of libdevmapper operations.
# Useful for debugging problems with activation. Some of the checks may
# be expensive, so it's best to use this only when there seems to be a
# problem.
checks = 0
# Configuration option activation/udev_sync.
# Use udev notifications to synchronize udev and LVM.
# The --nodevsync option overrides this setting.
# When disabled, LVM commands will not wait for notifications from
# udev, but continue irrespective of any possible udev processing in
# the background. Only use this if udev is not running or has rules
# that ignore the devices LVM creates. If enabled when udev is not
# running, and LVM processes are waiting for udev, run the command
# 'dmsetup udevcomplete_all' to wake them up.
udev_sync = 1
# Configuration option activation/udev_rules.
# Use udev rules to manage LV device nodes and symlinks.
# When disabled, LVM will manage the device nodes and symlinks for
# active LVs itself. Manual intervention may be required if this
# setting is changed while LVs are active.
udev_rules = 1
# Configuration option activation/verify_udev_operations.
# Use extra checks in LVM to verify udev operations.
# This enables additional checks (and if necessary, repairs) on entries
# in the device directory after udev has completed processing its
# events. Useful for diagnosing problems with LVM/udev interactions.
verify_udev_operations = 0
# Configuration option activation/retry_deactivation.
# Retry failed LV deactivation.
# If LV deactivation fails, LVM will retry for a few seconds before
# failing. This may happen because a process run from a quick udev rule
# temporarily opened the device.
retry_deactivation = 1
# Configuration option activation/missing_stripe_filler.
# Method to fill missing stripes when activating an incomplete LV.
# Using 'error' will make inaccessible parts of the device return I/O
# errors on access. Using 'zero' will return success (and zero) on I/O
# You can instead use a device path, in which case,
# that device will be used in place of missing stripes. Using anything
# other than 'error' with mirrored or snapshotted volumes is likely to
# result in data corruption.
# This configuration option is advanced.
missing_stripe_filler = "error"
# Configuration option activation/use_linear_target.
# Use the linear target to optimize single stripe LVs.
# When disabled, the striped target is used. The linear target is an
# optimised version of the striped target that only handles a single
# stripe.
use_linear_target = 1
# Configuration option activation/reserved_stack.
# Stack size in KiB to reserve for use while devices are suspended.
# Insufficent reserve risks I/O deadlock during device suspension.
reserved_stack = 64
# Configuration option activation/reserved_memory.
# Memory size in KiB to reserve for use while devices are suspended.
# Insufficent reserve risks I/O deadlock during device suspension.
reserved_memory = 8192
# Configuration option activation/process_priority.
# Nice value used while devices are suspended.
# Use a high priority so that LVs are suspended
# for the shortest possible time.
process_priority = -18
# Configuration option activation/volume_list.
# Only LVs selected by this list are activated.
# If this list is defined, an LV is only activated if it matches an
# entry in this list. If this list is undefined, it imposes no limits
# on LV activation (all are allowed).
#
# Accepted values:
# vgname
# The VG name is matched exactly and selects all LVs in the VG.
# vgname/lvname
# The VG name and LV name are matched exactly and selects the LV.
# @tag
# Selects an LV if the specified tag matches a tag set on the LV
# or VG.
# @*
# Selects an LV if a tag defined on the host is also set on the LV
# or VG. See tags/hosttags. If any host tags exist but volume_list
# is not defined, a default single-entry list containing '@*'
# is assumed.
#
# Example
# volume_list = [ "vg1", "vg2/lvol1", "@tag1", "@*" ]
#
# This configuration option does not have a default value defined.
# Configuration option activation/auto_activation_volume_list.
# Only LVs selected by this list are auto-activated.
# This list works like volume_list, but it is used only by
# auto-activation commands. It does not apply to direct activation
# commands. If this list is defined, an LV is only auto-activated
# if it matches an entry in this list. If this list is undefined, it
# imposes no limits on LV auto-activation (all are allowed.) If this
# list is defined and empty, i.e. "[]", then no LVs are selected for
# auto-activation. An LV that is selected by this list for
# auto-activation, must also be selected by volume_list (if defined)
# before it is activated. Auto-activation is an activation command that
# includes the 'a' argument: --activate ay or -a ay. The 'a' (auto)
# argument for auto-activation is meant to be used by activation
# commands that are run automatically by the system, as opposed to LVM
# commands run directly by a user. A user may also use the 'a' flag
# directly to perform auto-activation. Also see pvscan(8) for more
# information about auto-activation.
#
# Accepted values:
# vgname
# The VG name is matched exactly and selects all LVs in the VG.
# vgname/lvname
# The VG name and LV name are matched exactly and selects the LV.
# @tag
# Selects an LV if the specified tag matches a tag set on the LV
# or VG.
# @*
# Selects an LV if a tag defined on the host is also set on the LV
# or VG. See tags/hosttags. If any host tags exist but volume_list
# is not defined, a default single-entry list containing '@*'
# is assumed.
#
# Example
# auto_activation_volume_list = [ "vg1", "vg2/lvol1", "@tag1", "@*" ]
#
# This configuration option does not have a default value defined.
# Configuration option activation/read_only_volume_list.
# LVs in this list are activated in read-only mode.
# If this list is defined, each LV that is to be activated is checked
# against this list, and if it matches, it is activated in read-only
# mode. This overrides the permission setting stored in the metadata,
# e.g. from --permission rw.
#
# Accepted values:
# vgname
# The VG name is matched exactly and selects all LVs in the VG.
# vgname/lvname
# The VG name and LV name are matched exactly and selects the LV.
# @tag
# Selects an LV if the specified tag matches a tag set on the LV
# or VG.
# @*
# Selects an LV if a tag defined on the host is also set on the LV
# or VG. See tags/hosttags. If any host tags exist but volume_list
# is not defined, a default single-entry list containing '@*'
# is assumed.
#
# Example
# read_only_volume_list = [ "vg1", "vg2/lvol1", "@tag1", "@*" ]
#
# This configuration option does not have a default value defined.
# Configuration option activation/raid_region_size.
# Size in KiB of each raid or mirror synchronization region.
# The clean/dirty state of data is tracked for each region.
# The value is rounded down to a power of two if necessary, and
# is ignored if it is not a multiple of the machine memory page size.
raid_region_size = 2048
# Configuration option activation/error_when_full.
# Return errors if a thin pool runs out of space.
# The --errorwhenfull option overrides this setting.
# When enabled, writes to thin LVs immediately return an error if the
# thin pool is out of data space. When disabled, writes to thin LVs
# are queued if the thin pool is out of space, and processed when the
# thin pool data space is extended. New thin pools are assigned the
# behavior defined here.
# This configuration option has an automatic default value.
# error_when_full = 0
# Configuration option activation/readahead.
# Setting to use when there is no readahead setting in metadata.
#
# Accepted values:
# none
# Disable readahead.
# auto
# Use default value chosen by kernel.
#
readahead = "auto"
# Configuration option activation/raid_fault_policy.
# Defines how a device failure in a RAID LV is handled.
# This includes LVs that have the following segment types:
# raid1, raid4, raid5*, and raid6*.
# If a device in the LV fails, the policy determines the steps
# performed by dmeventd automatically, and the steps perfomed by the
# manual command lvconvert --repair --use-policies.
# Automatic handling requires dmeventd to be monitoring the LV.
#
# Accepted values:
# warn
# Use the system log to warn the user that a device in the RAID LV
# has failed. It is left to the user to run lvconvert --repair
# manually to remove or replace the failed device. As long as the
# number of failed devices does not exceed the redundancy of the LV
# (1 device for raid4/5, 2 for raid6), the LV will remain usable.
# allocate
# Attempt to use any extra physical volumes in the VG as spares and
# replace faulty devices.
#
raid_fault_policy = "warn"
# Configuration option activation/mirror_image_fault_policy.
# Defines how a device failure in a 'mirror' LV is handled.
# An LV with the 'mirror' segment type is composed of mirror images
# (copies) and a mirror log. A disk log ensures that a mirror LV does
# not need to be re-synced (all copies made the same) every time a
# machine reboots or crashes. If a device in the LV fails, this policy
# determines the steps perfomed by dmeventd automatically, and the steps
# performed by the manual command lvconvert --repair --use-policies.
# Automatic handling requires dmeventd to be monitoring the LV.
#
# Accepted values:
# remove
# Simply remove the faulty device and run without it. If the log
# device fails, the mirror would convert to using an in-memory log.
# This means the mirror will not remember its sync status across
# crashes/reboots and the entire mirror will be re-synced. If a
# mirror image fails, the mirror will convert to a non-mirrored
# device if there is only one remaining good copy.
# allocate
# Remove the faulty device and try to allocate space on a new
# device to be a replacement for the failed device. Using this
# policy for the log is fast and maintains the ability to remember
# sync state through crashes/reboots. Using this policy for a
# mirror device is slow, as it requires the mirror to resynchronize
# the devices, but it will preserve the mirror characteristic of
# the device. This policy acts like 'remove' if no suitable device
# and space can be allocated for the replacement.
# allocate_anywhere
# Not yet implemented. Useful to place the log device temporarily
# on the same physical volume as one of the mirror images. This
# policy is not recommended for mirror devices since it would break
# the redundant nature of the mirror. This policy acts like
# 'remove' if no suitable device and space can be allocated for the
# replacement.
#
mirror_image_fault_policy = "remove"
# Configuration option activation/mirror_log_fault_policy.
# Defines how a device failure in a 'mirror' log LV is handled.
# The mirror_image_fault_policy description for mirrored LVs also
# applies to mirrored log LVs.
mirror_log_fault_policy = "allocate"
# Configuration option activation/snapshot_autoextend_threshold.
# Auto-extend a snapshot when its usage exceeds this percent.
# Setting this to 100 disables automatic extension.
# The minimum value is 50 (a smaller value is treated as 50.)
# Also see snapshot_autoextend_percent.
# Automatic extension requires dmeventd to be monitoring the LV.
#
# Example
# Using 70% autoextend threshold and 20% autoextend size, when a 1G
# snapshot exceeds 700M, it is extended to 1.2G, and when it exceeds
# 840M, it is extended to 1.44G:
# snapshot_autoextend_threshold = 70
#
snapshot_autoextend_threshold = 100
# Configuration option activation/snapshot_autoextend_percent.
# Auto-extending a snapshot adds this percent extra space.
# The amount of additional space added to a snapshot is this
# percent of its current size.
#
# Example
# Using 70% autoextend threshold and 20% autoextend size, when a 1G
# snapshot exceeds 700M, it is extended to 1.2G, and when it exceeds
# 840M, it is extended to 1.44G:
# snapshot_autoextend_percent = 20
#
snapshot_autoextend_percent = 20
# Configuration option activation/thin_pool_autoextend_threshold.
# Auto-extend a thin pool when its usage exceeds this percent.
# Setting this to 100 disables automatic extension.
# The minimum value is 50 (a smaller value is treated as 50.)
# Also see thin_pool_autoextend_percent.
# Automatic extension requires dmeventd to be monitoring the LV.
#
# Example
# Using 70% autoextend threshold and 20% autoextend size, when a 1G
# thin pool exceeds 700M, it is extended to 1.2G, and when it exceeds
# 840M, it is extended to 1.44G:
# thin_pool_autoextend_threshold = 70
#
thin_pool_autoextend_threshold = 100
# Configuration option activation/thin_pool_autoextend_percent.
# Auto-extending a thin pool adds this percent extra space.
# The amount of additional space added to a thin pool is this
# percent of its current size.
#
# Example
# Using 70% autoextend threshold and 20% autoextend size, when a 1G
# thin pool exceeds 700M, it is extended to 1.2G, and when it exceeds
# 840M, it is extended to 1.44G:
# thin_pool_autoextend_percent = 20
#
thin_pool_autoextend_percent = 20
# Configuration option activation/mlock_filter.
# Do not mlock these memory areas.
# While activating devices, I/O to devices being (re)configured is
# suspended. As a precaution against deadlocks, LVM pins memory it is
# using so it is not paged out, and will not require I/O to reread.
# Groups of pages that are known not to be accessed during activation
# do not need to be pinned into memory. Each string listed in this
# setting is compared against each line in /proc/self/maps, and the
# pages corresponding to lines that match are not pinned. On some
# systems, locale-archive was found to make up over 80% of the memory
# used by the process.
#
# Example
# mlock_filter = [ "locale/locale-archive", "gconv/gconv-modules.cache" ]
#
# This configuration option is advanced.
# This configuration option does not have a default value defined.
# Configuration option activation/use_mlockall.
# Use the old behavior of mlockall to pin all memory.
# Prior to version 2.02.62, LVM used mlockall() to pin the whole
# process's memory while activating devices.
use_mlockall = 0
# Configuration option activation/monitoring.
# Monitor LVs that are activated.
# The --ignoremonitoring option overrides this setting.
# When enabled, LVM will ask dmeventd to monitor activated LVs.
monitoring = 1
# Configuration option activation/polling_interval.
# Check pvmove or lvconvert progress at this interval (seconds).
# When pvmove or lvconvert must wait for the kernel to finish
# synchronising or merging data, they check and report progress at
# intervals of this number of seconds. If this is set to 0 and there
# is only one thing to wait for, there are no progress reports, but
# the process is awoken immediately once the operation is complete.
polling_interval = 15
# Configuration option activation/auto_set_activation_skip.
# Set the activation skip flag on new thin snapshot LVs.
# The --setactivationskip option overrides this setting.
# An LV can have a persistent 'activation skip' flag. The flag causes
# the LV to be skipped during normal activation. The lvchange/vgchange
# -K option is required to activate LVs that have the activation skip
# flag set. When this setting is enabled, the activation skip flag is
# set on new thin snapshot LVs.
# This configuration option has an automatic default value.
# auto_set_activation_skip = 1
# Configuration option activation/activation_mode.
# How LVs with missing devices are activated.
# The --activationmode option overrides this setting.
#
# Accepted values:
# complete
# Only allow activation of an LV if all of the Physical Volumes it
# uses are present. Other PVs in the Volume Group may be missing.
# degraded
# Like complete, but additionally RAID LVs of segment type raid1,
# raid4, raid5, radid6 and raid10 will be activated if there is no
# data loss, i.e. they have sufficient redundancy to present the
# entire addressable range of the Logical Volume.
# partial
# Allows the activation of any LV even if a missing or failed PV
# could cause data loss with a portion of the LV inaccessible.
# This setting should not normally be used, but may sometimes
# assist with data recovery.
#
activation_mode = "degraded"
# Configuration option activation/lock_start_list.
# Locking is started only for VGs selected by this list.
# The rules are the same as those for volume_list.
# This configuration option does not have a default value defined.
# Configuration option activation/auto_lock_start_list.
# Locking is auto-started only for VGs selected by this list.
# The rules are the same as those for auto_activation_volume_list.
# This configuration option does not have a default value defined.
}
# Configuration section metadata.
# This configuration section has an automatic default value.
# metadata {
# Configuration option metadata/check_pv_device_sizes.
# Check device sizes are not smaller than corresponding PV sizes.
# If device size is less than corresponding PV size found in metadata,
# there is always a risk of data loss. If this option is set, then LVM
# issues a warning message each time it finds that the device size is
# less than corresponding PV size. You should not disable this unless
# you are absolutely sure about what you are doing!
# This configuration option is advanced.
# This configuration option has an automatic default value.
# check_pv_device_sizes = 1
# Configuration option metadata/record_lvs_history.
# When enabled, LVM keeps history records about removed LVs in
# metadata. The information that is recorded in metadata for
# historical LVs is reduced when compared to original
# information kept in metadata for live LVs. Currently, this
# feature is supported for thin and thin snapshot LVs only.
# This configuration option has an automatic default value.
# record_lvs_history = 0
# Configuration option metadata/lvs_history_retention_time.
# Retention time in seconds after which a record about individual
# historical logical volume is automatically destroyed.
# A value of 0 disables this feature.
# This configuration option has an automatic default value.
# lvs_history_retention_time = 0
# Configuration option metadata/pvmetadatacopies.
# Number of copies of metadata to store on each PV.
# The --pvmetadatacopies option overrides this setting.
#
# Accepted values:
# 2
# Two copies of the VG metadata are stored on the PV, one at the
# front of the PV, and one at the end.
# 1
# One copy of VG metadata is stored at the front of the PV.
# 0
# No copies of VG metadata are stored on the PV. This may be
# useful for VGs containing large numbers of PVs.
#
# This configuration option is advanced.
# This configuration option has an automatic default value.
# pvmetadatacopies = 1
# Configuration option metadata/vgmetadatacopies.
# Number of copies of metadata to maintain for each VG.
# The --vgmetadatacopies option overrides this setting.
# If set to a non-zero value, LVM automatically chooses which of the
# available metadata areas to use to achieve the requested number of
# copies of the VG metadata. If you set a value larger than the the
# total number of metadata areas available, then metadata is stored in
# them all. The value 0 (unmanaged) disables this automatic management
# and allows you to control which metadata areas are used at the
# individual PV level using pvchange --metadataignore y|n.
# This configuration option has an automatic default value.
# vgmetadatacopies = 0
# Configuration option metadata/pvmetadatasize.
# Approximate number of sectors to use for each metadata copy.
# VGs with large numbers of PVs or LVs, or VGs containing complex LV
# structures, may need additional space for VG metadata. The metadata
# areas are treated as circular buffers, so unused space becomes filled
# with an archive of the most recent previous versions of the metadata.
# This configuration option has an automatic default value.
# pvmetadatasize = 255
# Configuration option metadata/pvmetadataignore.
# Ignore metadata areas on a new PV.
# The --metadataignore option overrides this setting.
# If metadata areas on a PV are ignored, LVM will not store metadata
# in them.
# This configuration option is advanced.
# This configuration option has an automatic default value.
# pvmetadataignore = 0
# Configuration option metadata/stripesize.
# This configuration option is advanced.
# This configuration option has an automatic default value.
# stripesize = 64
# Configuration option metadata/dirs.
# Directories holding live copies of text format metadata.
# These directories must not be on logical volumes!
# It's possible to use LVM with a couple of directories here,
# preferably on different (non-LV) filesystems, and with no other
# on-disk metadata (pvmetadatacopies = 0). Or this can be in addition
# to on-disk metadata areas. The feature was originally added to
# simplify testing and is not supported under low memory situations -
# the machine could lock up. Never edit any files in these directories
# by hand unless you are absolutely sure you know what you are doing!
# Use the supplied toolset to make changes (e.g. vgcfgrestore).
#
# Example
# dirs = [ "/etc/lvm/metadata", "/mnt/disk2/lvm/metadata2" ]
#
# This configuration option is advanced.
# This configuration option does not have a default value defined.
# }
# Configuration section report.
# LVM report command output formatting.
# This configuration section has an automatic default value.
# report {
# Configuration option report/output_format.
# Format of LVM command's report output.
# If there is more than one report per command, then the format
# is applied for all reports. You can also change output format
# directly on command line using --reportformat option which
# has precedence over log/output_format setting.
# Accepted values:
# basic
# Original format with columns and rows. If there is more than
# one report per command, each report is prefixed with report's
# name for identification.
# json
# JSON format.
# This configuration option has an automatic default value.
# output_format = "basic"
# Configuration option report/compact_output.
# Do not print empty values for all report fields.
# If enabled, all fields that don't have a value set for any of the
# rows reported are skipped and not printed. Compact output is
# applicable only if report/buffered is enabled. If you need to
# compact only specified fields, use compact_output=0 and define
# report/compact_output_cols configuration setting instead.
# This configuration option has an automatic default value.
# compact_output = 0
# Configuration option report/compact_output_cols.
# Do not print empty values for specified report fields.
# If defined, specified fields that don't have a value set for any
# of the rows reported are skipped and not printed. Compact output
# is applicable only if report/buffered is enabled. If you need to
# compact all fields, use compact_output=1 instead in which case
# the compact_output_cols setting is then ignored.
# This configuration option has an automatic default value.
# compact_output_cols = ""
# Configuration option report/aligned.
# Align columns in report output.
# This configuration option has an automatic default value.
# aligned = 1
# Configuration option report/buffered.
# Buffer report output.
# When buffered reporting is used, the report's content is appended
# incrementally to include each object being reported until the report
# is flushed to output which normally happens at the end of command
# execution. Otherwise, if buffering is not used, each object is
# reported as soon as its processing is finished.
# This configuration option has an automatic default value.
# buffered = 1
# Configuration option report/headings.
# Show headings for columns on report.
# This configuration option has an automatic default value.
# headings = 1
# Configuration option report/separator.
# A separator to use on report after each field.
# This configuration option has an automatic default value.
# separator = " "
# Configuration option report/list_item_separator.
# A separator to use for list items when reported.
# This configuration option has an automatic default value.
# list_item_separator = ","
# Configuration option report/prefixes.
# Use a field name prefix for each field reported.
# This configuration option has an automatic default value.
# prefixes = 0
# Configuration option report/quoted.
# Quote field values when using field name prefixes.
# This configuration option has an automatic default value.
# quoted = 1
# Configuration option report/columns_as_rows.
# Output each column as a row.
# If set, this also implies report/prefixes=1.
# This configuration option has an automatic default value.
# columns_as_rows = 0
# Configuration option report/binary_values_as_numeric.
# Use binary values 0 or 1 instead of descriptive literal values.
# For columns that have exactly two valid values to report
# (not counting the 'unknown' value which denotes that the
# value could not be determined).
# This configuration option has an automatic default value.
# binary_values_as_numeric = 0
# Configuration option report/time_format.
# Set time format for fields reporting time values.
# Format specification is a string which may contain special character
# sequences and ordinary character sequences. Ordinary character
# sequences are copied verbatim. Each special character sequence is
# introduced by the '%' character and such sequence is then
# substituted with a value as described below.
#
# Accepted values:
# %a
# The abbreviated name of the day of the week according to the
# current locale.
# %A
# The full name of the day of the week according to the current
# locale.
# %b
# The abbreviated month name according to the current locale.
# %B
# The full month name according to the current locale.
# %c
# The preferred date and time representation for the current
# locale (alt E)
# %C
# The century number (year/100) as a 2-digit integer. (alt E)
# %d
# The day of the month as a decimal number (range 01 to 31).
# (alt O)
# %D
# Equivalent to %m/%d/%y. (For Americans only. Americans should
# note that in other countries%d/%m/%y is rather common. This
# means that in international context this format is ambiguous and
# should not be used.
# %e
# Like %d, the day of the month as a decimal number, but a leading
# zero is replaced by a space. (alt O)
# %E
# Modifier: use alternative local-dependent representation if
# available.
# %F
# Equivalent to %Y-%m-%d (the ISO 8601 date format).
# %G
# The ISO 8601 week-based year with century as adecimal number.
# The 4-digit year corresponding to the ISO week number (see %V).
# This has the same format and value as %Y, except that if the
# ISO week number belongs to the previous or next year, that year
# is used instead.
# %g
# Like %G, but without century, that is, with a 2-digit year
# (00-99).
# %h
# Equivalent to %b.
# %H
# The hour as a decimal number using a 24-hour clock
# (range 00 to 23). (alt O)
# %I
# The hour as a decimal number using a 12-hour clock
# (range 01 to 12). (alt O)
# %j
# The day of the year as a decimal number (range 001 to 366).
# %k
# The hour (24-hour clock) as a decimal number (range 0 to 23);
# single digits are preceded by a blank. (See also %H.)
# %l
# The hour (12-hour clock) as a decimal number (range 1 to 12);
# single digits are preceded by a blank. (See also %I.)
# %m
# The month as a decimal number (range 01 to 12). (alt O)
# %M
# The minute as a decimal number (range 00 to 59). (alt O)
# %O
# Modifier: use alternative numeric symbols.
# %p
# Either "AM" or "PM" according to the given time value,
# or the corresponding strings for the current locale. Noon is
# treated as "PM" and midnight as "AM".
# %P
# Like %p but in lowercase: "am" or "pm" or a corresponding
# string for the current locale.
# %r
# The time in a.m. or p.m. notation. In the POSIX locale this is
# equivalent to %I:%M:%S %p.
# %R
# The time in 24-hour notation (%H:%M). For a version including
# the seconds, see %T below.
# %s
# The number of seconds since the Epoch,
# 1970-01-01 00:00:00 +0000 (UTC)
# %S
# The second as a decimal number (range 00 to 60). (The range is
# up to 60 to allow for occasional leap seconds.) (alt O)
# %t
# A tab character.
# %T
# The time in 24-hour notation (%H:%M:%S).
# %u
# The day of the week as a decimal, range 1 to 7, Monday being 1.
# See also %w. (alt O)
# %U
# The week number of the current year as a decimal number,
# range 00 to 53, starting with the first Sunday as the first
# day of week 01. See also %V and %W. (alt O)
# %V
# The ISO 8601 week number of the current year as a decimal number,
# range 01 to 53, where week 1 is the first week that has at least
# 4 days in the new year. See also %U and %W. (alt O)
# %w
# The day of the week as a decimal, range 0 to 6, Sunday being 0.
# See also %u. (alt O)
# %W
# The week number of the current year as a decimal number,
# range 00 to 53, starting with the first Monday as the first day
# of week 01. (alt O)
# %x
# The preferred date representation for the current locale without
# the time. (alt E)
# %X
# The preferred time representation for the current locale without
# the date. (alt E)
# %y
# The year as a decimal number without a century (range 00 to 99).
# (alt E, alt O)
# %Y
# The year as a decimal number including the century. (alt E)
# %z
# The +hhmm or -hhmm numeric timezone (that is, the hour and minute
# offset from UTC).
# %Z
# The timezone name or abbreviation.
# %%
# A literal '%' character.
#
# This configuration option has an automatic default value.
# time_format = "%Y-%m-%d %T %z"
# Configuration option report/devtypes_sort.
# List of columns to sort by when reporting 'lvm devtypes' command.
# See 'lvm devtypes -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# devtypes_sort = "devtype_name"
# Configuration option report/devtypes_cols.
# List of columns to report for 'lvm devtypes' command.
# See 'lvm devtypes -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# devtypes_cols = "devtype_name,devtype_max_partitions,devtype_description"
# Configuration option report/devtypes_cols_verbose.
# List of columns to report for 'lvm devtypes' command in verbose mode.
# See 'lvm devtypes -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# devtypes_cols_verbose = "devtype_name,devtype_max_partitions,devtype_description"
# Configuration option report/lvs_sort.
# List of columns to sort by when reporting 'lvs' command.
# See 'lvs -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# lvs_sort = "vg_name,lv_name"
# Configuration option report/lvs_cols.
# List of columns to report for 'lvs' command.
# See 'lvs -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# lvs_cols = "lv_name,vg_name,lv_attr,lv_size,pool_lv,origin,data_percent,metadata_percent,move_pv,mirror_log,copy_percent,convert_lv"
# Configuration option report/lvs_cols_verbose.
# List of columns to report for 'lvs' command in verbose mode.
# See 'lvs -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# lvs_cols_verbose = "lv_name,vg_name,seg_count,lv_attr,lv_size,lv_major,lv_minor,lv_kernel_major,lv_kernel_minor,pool_lv,origin,data_percent,metadata_percent,move_pv,copy_percent,mirror_log,convert_lv,lv_uuid,lv_profile"
# Configuration option report/vgs_sort.
# List of columns to sort by when reporting 'vgs' command.
# See 'vgs -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# vgs_sort = "vg_name"
# Configuration option report/vgs_cols.
# List of columns to report for 'vgs' command.
# See 'vgs -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# vgs_cols = "vg_name,pv_count,lv_count,snap_count,vg_attr,vg_size,vg_free"
# Configuration option report/vgs_cols_verbose.
# List of columns to report for 'vgs' command in verbose mode.
# See 'vgs -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# vgs_cols_verbose = "vg_name,vg_attr,vg_extent_size,pv_count,lv_count,snap_count,vg_size,vg_free,vg_uuid,vg_profile"
# Configuration option report/pvs_sort.
# List of columns to sort by when reporting 'pvs' command.
# See 'pvs -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# pvs_sort = "pv_name"
# Configuration option report/pvs_cols.
# List of columns to report for 'pvs' command.
# See 'pvs -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# pvs_cols = "pv_name,vg_name,pv_fmt,pv_attr,pv_size,pv_free"
# Configuration option report/pvs_cols_verbose.
# List of columns to report for 'pvs' command in verbose mode.
# See 'pvs -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# pvs_cols_verbose = "pv_name,vg_name,pv_fmt,pv_attr,pv_size,pv_free,dev_size,pv_uuid"
# Configuration option report/segs_sort.
# List of columns to sort by when reporting 'lvs --segments' command.
# See 'lvs --segments -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# segs_sort = "vg_name,lv_name,seg_start"
# Configuration option report/segs_cols.
# List of columns to report for 'lvs --segments' command.
# See 'lvs --segments -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# segs_cols = "lv_name,vg_name,lv_attr,stripes,segtype,seg_size"
# Configuration option report/segs_cols_verbose.
# List of columns to report for 'lvs --segments' command in verbose mode.
# See 'lvs --segments -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# segs_cols_verbose = "lv_name,vg_name,lv_attr,seg_start,seg_size,stripes,segtype,stripesize,chunksize"
# Configuration option report/pvsegs_sort.
# List of columns to sort by when reporting 'pvs --segments' command.
# See 'pvs --segments -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# pvsegs_sort = "pv_name,pvseg_start"
# Configuration option report/pvsegs_cols.
# List of columns to sort by when reporting 'pvs --segments' command.
# See 'pvs --segments -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# pvsegs_cols = "pv_name,vg_name,pv_fmt,pv_attr,pv_size,pv_free,pvseg_start,pvseg_size"
# Configuration option report/pvsegs_cols_verbose.
# List of columns to sort by when reporting 'pvs --segments' command in verbose mode.
# See 'pvs --segments -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# pvsegs_cols_verbose = "pv_name,vg_name,pv_fmt,pv_attr,pv_size,pv_free,pvseg_start,pvseg_size,lv_name,seg_start_pe,segtype,seg_pe_ranges"
# Configuration option report/vgs_cols_full.
# List of columns to report for lvm fullreport's 'vgs' subreport.
# See 'vgs -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# vgs_cols_full = "vg_all"
# Configuration option report/pvs_cols_full.
# List of columns to report for lvm fullreport's 'vgs' subreport.
# See 'pvs -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# pvs_cols_full = "pv_all"
# Configuration option report/lvs_cols_full.
# List of columns to report for lvm fullreport's 'lvs' subreport.
# See 'lvs -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# lvs_cols_full = "lv_all"
# Configuration option report/pvsegs_cols_full.
# List of columns to report for lvm fullreport's 'pvseg' subreport.
# See 'pvs --segments -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# pvsegs_cols_full = "pvseg_all,pv_uuid,lv_uuid"
# Configuration option report/segs_cols_full.
# List of columns to report for lvm fullreport's 'seg' subreport.
# See 'lvs --segments -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# segs_cols_full = "seg_all,lv_uuid"
# Configuration option report/vgs_sort_full.
# List of columns to sort by when reporting lvm fullreport's 'vgs' subreport.
# See 'vgs -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# vgs_sort_full = "vg_name"
# Configuration option report/pvs_sort_full.
# List of columns to sort by when reporting lvm fullreport's 'vgs' subreport.
# See 'pvs -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# pvs_sort_full = "pv_name"
# Configuration option report/lvs_sort_full.
# List of columns to sort by when reporting lvm fullreport's 'lvs' subreport.
# See 'lvs -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# lvs_sort_full = "vg_name,lv_name"
# Configuration option report/pvsegs_sort_full.
# List of columns to sort by when reporting for lvm fullreport's 'pvseg' subreport.
# See 'pvs --segments -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# pvsegs_sort_full = "pv_uuid,pvseg_start"
# Configuration option report/segs_sort_full.
# List of columns to sort by when reporting lvm fullreport's 'seg' subreport.
# See 'lvs --segments -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# segs_sort_full = "lv_uuid,seg_start"
# Configuration option report/mark_hidden_devices.
# Use brackets [] to mark hidden devices.
# This configuration option has an automatic default value.
# mark_hidden_devices = 1
# Configuration option report/two_word_unknown_device.
# Use the two words 'unknown device' in place of '[unknown]'.
# This is displayed when the device for a PV is not known.
# This configuration option has an automatic default value.
# two_word_unknown_device = 0
# }
# Configuration section dmeventd.
# Settings for the LVM event daemon.
dmeventd {
# Configuration option dmeventd/mirror_library.
# The library dmeventd uses when monitoring a mirror device.
# libdevmapper-event-lvm2mirror.so attempts to recover from
# failures. It removes failed devices from a volume group and
# reconfigures a mirror as necessary. If no mirror library is
# provided, mirrors are not monitored through dmeventd.
mirror_library = "libdevmapper-event-lvm2mirror.so"
# Configuration option dmeventd/raid_library.
# This configuration option has an automatic default value.
# raid_library = "libdevmapper-event-lvm2raid.so"
# Configuration option dmeventd/snapshot_library.
# The library dmeventd uses when monitoring a snapshot device.
# libdevmapper-event-lvm2snapshot.so monitors the filling of snapshots
# and emits a warning through syslog when the usage exceeds 80%. The
# warning is repeated when 85%, 90% and 95% of the snapshot is filled.
snapshot_library = "libdevmapper-event-lvm2snapshot.so"
# Configuration option dmeventd/thin_library.
# The library dmeventd uses when monitoring a thin device.
# libdevmapper-event-lvm2thin.so monitors the filling of a pool
# and emits a warning through syslog when the usage exceeds 80%. The
# warning is repeated when 85%, 90% and 95% of the pool is filled.
thin_library = "libdevmapper-event-lvm2thin.so"
# Configuration option dmeventd/thin_command.
# The plugin runs command with each 5% increment when thin-pool data volume
# or metadata volume gets above 50%.
# Command which starts with 'lvm ' prefix is internal lvm command.
# You can write your own handler to customise behaviour in more details.
# User handler is specified with the full path starting with '/'.
# This configuration option has an automatic default value.
# thin_command = "lvm lvextend --use-policies"
# Configuration option dmeventd/executable.
# The full path to the dmeventd binary.
# This configuration option has an automatic default value.
# executable = "/usr/sbin/dmeventd"
}
# Configuration section tags.
# Host tag settings.
# This configuration section has an automatic default value.
# tags {
# Configuration option tags/hosttags.
# Create a host tag using the machine name.
# The machine name is nodename returned by uname(2).
# This configuration option has an automatic default value.
# hosttags = 0
# Configuration section tags/.
# Replace this subsection name with a custom tag name.
# Multiple subsections like this can be created. The '@' prefix for
# tags is optional. This subsection can contain host_list, which is a
# list of machine names. If the name of the local machine is found in
# host_list, then the name of this subsection is used as a tag and is
# applied to the local machine as a 'host tag'. If this subsection is
# empty (has no host_list), then the subsection name is always applied
# as a 'host tag'.
#
# Example
# The host tag foo is given to all hosts, and the host tag
# bar is given to the hosts named machine1 and machine2.
# tags { foo { } bar { host_list = [ "machine1", "machine2" ] } }
#
# This configuration section has variable name.
# This configuration section has an automatic default value.
# tag {
# Configuration option tags//host_list.
# A list of machine names.
# These machine names are compared to the nodename returned
# by uname(2). If the local machine name matches an entry in
# this list, the name of the subsection is applied to the
# machine as a 'host tag'.
# This configuration option does not have a default value defined.
# }
# }
kiwi-boxed-plugin-0.2.31/boxes/tumbleweed/root/etc/sysconfig/ 0000775 0000000 0000000 00000000000 14516463774 0024173 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/tumbleweed/root/etc/sysconfig/network/ 0000775 0000000 0000000 00000000000 14516463774 0025664 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/tumbleweed/root/etc/sysconfig/network/ifcfg-lan0 0000664 0000000 0000000 00000000074 14516463774 0027516 0 ustar 00root root 0000000 0000000 BOOTPROTO='dhcp'
MTU=''
REMOTE_IPADDR=''
STARTMODE='onboot'
kiwi-boxed-plugin-0.2.31/boxes/tumbleweed/root/etc/systemd/ 0000775 0000000 0000000 00000000000 14516463774 0023657 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/tumbleweed/root/etc/systemd/system/ 0000775 0000000 0000000 00000000000 14516463774 0025203 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/tumbleweed/root/etc/systemd/system/serial-getty@hvc0.service.d/ 0000775 0000000 0000000 00000000000 14516463774 0032356 5 ustar 00root root 0000000 0000000 override.conf 0000664 0000000 0000000 00000000161 14516463774 0034763 0 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/tumbleweed/root/etc/systemd/system/serial-getty@hvc0.service.d [Service]
ExecStart=
ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud 115200,38400,9600 hvc0 $TERM
kiwi-boxed-plugin-0.2.31/boxes/tumbleweed/root/etc/systemd/system/serial-getty@ttyS0.service.d/ 0000775 0000000 0000000 00000000000 14516463774 0032541 5 ustar 00root root 0000000 0000000 override.conf 0000664 0000000 0000000 00000000162 14516463774 0035147 0 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/tumbleweed/root/etc/systemd/system/serial-getty@ttyS0.service.d [Service]
ExecStart=
ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud 115200,38400,9600 ttyS0 $TERM
kiwi-boxed-plugin-0.2.31/boxes/tumbleweed/root/etc/udev/ 0000775 0000000 0000000 00000000000 14516463774 0023132 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/tumbleweed/root/etc/udev/rules.d/ 0000775 0000000 0000000 00000000000 14516463774 0024506 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/tumbleweed/root/etc/udev/rules.d/70-persistent-net.rules 0000664 0000000 0000000 00000000205 14516463774 0030767 0 ustar 00root root 0000000 0000000 SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="?*", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="?*", NAME="lan0"
kiwi-boxed-plugin-0.2.31/boxes/tumbleweed/root/usr/ 0000775 0000000 0000000 00000000000 14516463774 0022225 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/tumbleweed/root/usr/lib/ 0000775 0000000 0000000 00000000000 14516463774 0022773 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/tumbleweed/root/usr/lib/systemd/ 0000775 0000000 0000000 00000000000 14516463774 0024463 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/tumbleweed/root/usr/lib/systemd/system/ 0000775 0000000 0000000 00000000000 14516463774 0026007 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/tumbleweed/root/usr/lib/systemd/system/kiwi.service 0000664 0000000 0000000 00000000263 14516463774 0030335 0 ustar 00root root 0000000 0000000 [Unit]
Description=Start kiwi build process
After=network.target
Requires=network-online.target
[Service]
ExecStart=/usr/local/bin/run_kiwi
[Install]
WantedBy=multi-user.target
kiwi-boxed-plugin-0.2.31/boxes/ubuntu/ 0000775 0000000 0000000 00000000000 14516463774 0017616 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/ubuntu/appliance.kiwi 0000664 0000000 0000000 00000010115 14516463774 0022435 0 ustar 00root root 0000000 0000000
Marcus Schäferms@suse.comUbuntu VM for kiwi boxed build1.22.04apt-geten_USusUTCfalsefalse50
kiwi-boxed-plugin-0.2.31/boxes/ubuntu/config.sh 0000664 0000000 0000000 00000002071 14516463774 0021417 0 ustar 00root root 0000000 0000000 #!/bin/bash
set -x
test -f /.kconfig && . /.kconfig
test -f /.profile && . /.profile
#======================================
# Setup default target, multi-user
#--------------------------------------
baseSetRunlevel 3
#==================================
# Disable services
#----------------------------------
systemctl mask systemd-logind.service
systemctl mask systemd-update-utmp.service
systemctl mask auditd.service
systemctl mask systemd-update-utmp-runlevel.service
systemctl mask systemd-user-sessions.service
#======================================
# Activate kiwi service
#--------------------------------------
baseInsertService ssh
baseInsertService kiwi
#======================================
# lvmetad sucks for building lvm images
#--------------------------------------
systemctl disable lvm2-lvmetad
systemctl mask lvm2-lvmetad
systemctl disable lvm2-lvmetad.socket
systemctl mask lvm2-lvmetad.socket
#======================================
# Enable firstboot resolv.conf setting
#--------------------------------------
baseInsertService symlink-resolvconf
kiwi-boxed-plugin-0.2.31/boxes/ubuntu/root/ 0000775 0000000 0000000 00000000000 14516463774 0020601 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/ubuntu/root/etc/ 0000775 0000000 0000000 00000000000 14516463774 0021354 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/ubuntu/root/etc/firstboot 0000664 0000000 0000000 00000000000 14516463774 0023300 0 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/ubuntu/root/etc/fstab.script 0000775 0000000 0000000 00000000077 14516463774 0023710 0 ustar 00root root 0000000 0000000 #!/bin/bash
echo "/dev/vda1 / ext2 defaults 0 0" > /etc/fstab
kiwi-boxed-plugin-0.2.31/boxes/ubuntu/root/etc/lvm/ 0000775 0000000 0000000 00000000000 14516463774 0022152 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/ubuntu/root/etc/lvm/lvm.conf 0000664 0000000 0000000 00000270545 14516463774 0023634 0 ustar 00root root 0000000 0000000 # This is an example configuration file for the LVM2 system.
# It contains the default settings that would be used if there was no
# /etc/lvm/lvm.conf file.
#
# Refer to 'man lvm.conf' for further information including the file layout.
#
# Refer to 'man lvm.conf' for information about how settings configured in
# this file are combined with built-in values and command line options to
# arrive at the final values used by LVM.
#
# Refer to 'man lvmconfig' for information about displaying the built-in
# and configured values used by LVM.
#
# If a default value is set in this file (not commented out), then a
# new version of LVM using this file will continue using that value,
# even if the new version of LVM changes the built-in default value.
#
# To put this file in a different directory and override /etc/lvm set
# the environment variable LVM_SYSTEM_DIR before running the tools.
#
# N.B. Take care that each setting only appears once if uncommenting
# example settings in this file.
#hello
# Configuration section config.
# How LVM configuration settings are handled.
config {
# Configuration option config/checks.
# If enabled, any LVM configuration mismatch is reported.
# This implies checking that the configuration key is understood by
# LVM and that the value of the key is the proper type. If disabled,
# any configuration mismatch is ignored and the default value is used
# without any warning (a message about the configuration key not being
# found is issued in verbose mode only).
checks = 1
# Configuration option config/abort_on_errors.
# Abort the LVM process if a configuration mismatch is found.
abort_on_errors = 0
# Configuration option config/profile_dir.
# Directory where LVM looks for configuration profiles.
profile_dir = "/etc/lvm/profile"
}
# Configuration section devices.
# How LVM uses block devices.
devices {
# Configuration option devices/dir.
# Directory in which to create volume group device nodes.
# Commands also accept this as a prefix on volume group names.
# This configuration option is advanced.
dir = "/dev"
# Configuration option devices/scan.
# Directories containing device nodes to use with LVM.
# This configuration option is advanced.
scan = [ "/dev" ]
# Configuration option devices/obtain_device_list_from_udev.
# Obtain the list of available devices from udev.
# This avoids opening or using any inapplicable non-block devices or
# subdirectories found in the udev directory. Any device node or
# symlink not managed by udev in the udev directory is ignored. This
# setting applies only to the udev-managed device directory; other
# directories will be scanned fully. LVM needs to be compiled with
# udev support for this setting to apply.
obtain_device_list_from_udev = 1
# Configuration option devices/external_device_info_source.
# Select an external device information source.
# Some information may already be available in the system and LVM can
# use this information to determine the exact type or use of devices it
# processes. Using an existing external device information source can
# speed up device processing as LVM does not need to run its own native
# routines to acquire this information. For example, this information
# is used to drive LVM filtering like MD component detection, multipath
# component detection, partition detection and others.
#
# Accepted values:
# none
# No external device information source is used.
# udev
# Reuse existing udev database records. Applicable only if LVM is
# compiled with udev support.
#
external_device_info_source = "none"
# Configuration option devices/preferred_names.
# Select which path name to display for a block device.
# If multiple path names exist for a block device, and LVM needs to
# display a name for the device, the path names are matched against
# each item in this list of regular expressions. The first match is
# used. Try to avoid using undescriptive /dev/dm-N names, if present.
# If no preferred name matches, or if preferred_names are not defined,
# the following built-in preferences are applied in order until one
# produces a preferred name:
# Prefer names with path prefixes in the order of:
# /dev/mapper, /dev/disk, /dev/dm-*, /dev/block.
# Prefer the name with the least number of slashes.
# Prefer a name that is a symlink.
# Prefer the path with least value in lexicographical order.
#
# Example
# preferred_names = [ "^/dev/mpath/", "^/dev/mapper/mpath", "^/dev/[hs]d" ]
#
preferred_names = [ "^/dev/mpath/", "^/dev/mapper/mpath", "^/dev/[hs]d" ]
# Configuration option devices/filter.
# Limit the block devices that are used by LVM commands.
# This is a list of regular expressions used to accept or reject block
# device path names. Each regex is delimited by a vertical bar '|'
# (or any character) and is preceded by 'a' to accept the path, or
# by 'r' to reject the path. The first regex in the list to match the
# path is used, producing the 'a' or 'r' result for the device.
# When multiple path names exist for a block device, if any path name
# matches an 'a' pattern before an 'r' pattern, then the device is
# accepted. If all the path names match an 'r' pattern first, then the
# device is rejected. Unmatching path names do not affect the accept
# or reject decision. If no path names for a device match a pattern,
# then the device is accepted. Be careful mixing 'a' and 'r' patterns,
# as the combination might produce unexpected results (test changes.)
# Run vgscan after changing the filter to regenerate the cache.
# See the use_lvmetad comment for a special case regarding filters.
#
# Example
# Accept every block device:
# filter = [ "a|.*/|" ]
# Reject the cdrom drive:
# filter = [ "r|/dev/cdrom|" ]
# Work with just loopback devices, e.g. for testing:
# filter = [ "a|loop|", "r|.*|" ]
# Accept all loop devices and ide drives except hdc:
# filter = [ "a|loop|", "r|/dev/hdc|", "a|/dev/ide|", "r|.*|" ]
# Use anchors to be very specific:
# filter = [ "a|^/dev/hda8$|", "r|.*/|" ]
#
# This configuration option has an automatic default value.
# filter = [ "a|.*/|" ]
filter = [ "r|/dev/.*/by-path/.*|", "r|/dev/.*/by-id/.*|", "r|/dev/fd.*|", "r|/dev/cdrom|", "a/.*/" ]
# Configuration option devices/global_filter.
# Limit the block devices that are used by LVM system components.
# Because devices/filter may be overridden from the command line, it is
# not suitable for system-wide device filtering, e.g. udev and lvmetad.
# Use global_filter to hide devices from these LVM system components.
# The syntax is the same as devices/filter. Devices rejected by
# global_filter are not opened by LVM.
# This configuration option has an automatic default value.
# global_filter = [ "a|.*/|" ]
# Configuration option devices/cache_dir.
# Directory in which to store the device cache file.
# The results of filtering are cached on disk to avoid rescanning dud
# devices (which can take a very long time). By default this cache is
# stored in a file named .cache. It is safe to delete this file; the
# tools regenerate it. If obtain_device_list_from_udev is enabled, the
# list of devices is obtained from udev and any existing .cache file
# is removed.
cache_dir = "/etc/lvm/cache"
# Configuration option devices/cache_file_prefix.
# A prefix used before the .cache file name. See devices/cache_dir.
cache_file_prefix = ""
# Configuration option devices/write_cache_state.
# Enable/disable writing the cache file. See devices/cache_dir.
write_cache_state = 1
# Configuration option devices/types.
# List of additional acceptable block device types.
# These are of device type names from /proc/devices, followed by the
# maximum number of partitions.
#
# Example
# types = [ "fd", 16 ]
#
# This configuration option is advanced.
# This configuration option does not have a default value defined.
# Configuration option devices/sysfs_scan.
# Restrict device scanning to block devices appearing in sysfs.
# This is a quick way of filtering out block devices that are not
# present on the system. sysfs must be part of the kernel and mounted.)
sysfs_scan = 1
# Configuration option devices/multipath_component_detection.
# Ignore devices that are components of DM multipath devices.
multipath_component_detection = 1
# Configuration option devices/md_component_detection.
# Ignore devices that are components of software RAID (md) devices.
md_component_detection = 1
# Configuration option devices/fw_raid_component_detection.
# Ignore devices that are components of firmware RAID devices.
# LVM must use an external_device_info_source other than none for this
# detection to execute.
fw_raid_component_detection = 0
# Configuration option devices/md_chunk_alignment.
# Align PV data blocks with md device's stripe-width.
# This applies if a PV is placed directly on an md device.
md_chunk_alignment = 1
# Configuration option devices/default_data_alignment.
# Default alignment of the start of a PV data area in MB.
# If set to 0, a value of 64KiB will be used.
# Set to 1 for 1MiB, 2 for 2MiB, etc.
# This configuration option has an automatic default value.
# default_data_alignment = 1
# Configuration option devices/data_alignment_detection.
# Detect PV data alignment based on sysfs device information.
# The start of a PV data area will be a multiple of minimum_io_size or
# optimal_io_size exposed in sysfs. minimum_io_size is the smallest
# request the device can perform without incurring a read-modify-write
# penalty, e.g. MD chunk size. optimal_io_size is the device's
# preferred unit of receiving I/O, e.g. MD stripe width.
# minimum_io_size is used if optimal_io_size is undefined (0).
# If md_chunk_alignment is enabled, that detects the optimal_io_size.
# This setting takes precedence over md_chunk_alignment.
data_alignment_detection = 1
# Configuration option devices/data_alignment.
# Alignment of the start of a PV data area in KiB.
# If a PV is placed directly on an md device and md_chunk_alignment or
# data_alignment_detection are enabled, then this setting is ignored.
# Otherwise, md_chunk_alignment and data_alignment_detection are
# disabled if this is set. Set to 0 to use the default alignment or the
# page size, if larger.
data_alignment = 0
# Configuration option devices/data_alignment_offset_detection.
# Detect PV data alignment offset based on sysfs device information.
# The start of a PV aligned data area will be shifted by the
# alignment_offset exposed in sysfs. This offset is often 0, but may
# be non-zero. Certain 4KiB sector drives that compensate for windows
# partitioning will have an alignment_offset of 3584 bytes (sector 7
# is the lowest aligned logical block, the 4KiB sectors start at
# LBA -1, and consequently sector 63 is aligned on a 4KiB boundary).
# pvcreate --dataalignmentoffset will skip this detection.
data_alignment_offset_detection = 1
# Configuration option devices/ignore_suspended_devices.
# Ignore DM devices that have I/O suspended while scanning devices.
# Otherwise, LVM waits for a suspended device to become accessible.
# This should only be needed in recovery situations.
ignore_suspended_devices = 0
# Configuration option devices/ignore_lvm_mirrors.
# Do not scan 'mirror' LVs to avoid possible deadlocks.
# This avoids possible deadlocks when using the 'mirror' segment type.
# This setting determines whether LVs using the 'mirror' segment type
# are scanned for LVM labels. This affects the ability of mirrors to
# be used as physical volumes. If this setting is enabled, it is
# impossible to create VGs on top of mirror LVs, i.e. to stack VGs on
# mirror LVs. If this setting is disabled, allowing mirror LVs to be
# scanned, it may cause LVM processes and I/O to the mirror to become
# blocked. This is due to the way that the mirror segment type handles
# failures. In order for the hang to occur, an LVM command must be run
# just after a failure and before the automatic LVM repair process
# takes place, or there must be failures in multiple mirrors in the
# same VG at the same time with write failures occurring moments before
# a scan of the mirror's labels. The 'mirror' scanning problems do not
# apply to LVM RAID types like 'raid1' which handle failures in a
# different way, making them a better choice for VG stacking.
ignore_lvm_mirrors = 1
# Configuration option devices/disable_after_error_count.
# Number of I/O errors after which a device is skipped.
# During each LVM operation, errors received from each device are
# counted. If the counter of a device exceeds the limit set here,
# no further I/O is sent to that device for the remainder of the
# operation. Setting this to 0 disables the counters altogether.
disable_after_error_count = 0
# Configuration option devices/require_restorefile_with_uuid.
# Allow use of pvcreate --uuid without requiring --restorefile.
require_restorefile_with_uuid = 1
# Configuration option devices/pv_min_size.
# Minimum size in KiB of block devices which can be used as PVs.
# In a clustered environment all nodes must use the same value.
# Any value smaller than 512KiB is ignored. The previous built-in
# value was 512.
pv_min_size = 2048
# Configuration option devices/issue_discards.
# Issue discards to PVs that are no longer used by an LV.
# Discards are sent to an LV's underlying physical volumes when the LV
# is no longer using the physical volumes' space, e.g. lvremove,
# lvreduce. Discards inform the storage that a region is no longer
# used. Storage that supports discards advertise the protocol-specific
# way discards should be issued by the kernel (TRIM, UNMAP, or
# WRITE SAME with UNMAP bit set). Not all storage will support or
# benefit from discards, but SSDs and thinly provisioned LUNs
# generally do. If enabled, discards will only be issued if both the
# storage and kernel provide support.
issue_discards = 0
# Configuration option devices/allow_changes_with_duplicate_pvs.
# Allow VG modification while a PV appears on multiple devices.
# When a PV appears on multiple devices, LVM attempts to choose the
# best device to use for the PV. If the devices represent the same
# underlying storage, the choice has minimal consequence. If the
# devices represent different underlying storage, the wrong choice
# can result in data loss if the VG is modified. Disabling this
# setting is the safest option because it prevents modifying a VG
# or activating LVs in it while a PV appears on multiple devices.
# Enabling this setting allows the VG to be used as usual even with
# uncertain devices.
allow_changes_with_duplicate_pvs = 0
}
# Configuration section allocation.
# How LVM selects space and applies properties to LVs.
allocation {
# Configuration option allocation/cling_tag_list.
# Advise LVM which PVs to use when searching for new space.
# When searching for free space to extend an LV, the 'cling' allocation
# policy will choose space on the same PVs as the last segment of the
# existing LV. If there is insufficient space and a list of tags is
# defined here, it will check whether any of them are attached to the
# PVs concerned and then seek to match those PV tags between existing
# extents and new extents.
#
# Example
# Use the special tag "@*" as a wildcard to match any PV tag:
# cling_tag_list = [ "@*" ]
# LVs are mirrored between two sites within a single VG, and
# PVs are tagged with either @site1 or @site2 to indicate where
# they are situated:
# cling_tag_list = [ "@site1", "@site2" ]
#
# This configuration option does not have a default value defined.
# Configuration option allocation/maximise_cling.
# Use a previous allocation algorithm.
# Changes made in version 2.02.85 extended the reach of the 'cling'
# policies to detect more situations where data can be grouped onto
# the same disks. This setting can be used to disable the changes
# and revert to the previous algorithm.
maximise_cling = 1
# Configuration option allocation/use_blkid_wiping.
# Use blkid to detect existing signatures on new PVs and LVs.
# The blkid library can detect more signatures than the native LVM
# detection code, but may take longer. LVM needs to be compiled with
# blkid wiping support for this setting to apply. LVM native detection
# code is currently able to recognize: MD device signatures,
# swap signature, and LUKS signatures. To see the list of signatures
# recognized by blkid, check the output of the 'blkid -k' command.
use_blkid_wiping = 1
# Configuration option allocation/wipe_signatures_when_zeroing_new_lvs.
# Look for and erase any signatures while zeroing a new LV.
# The --wipesignatures option overrides this setting.
# Zeroing is controlled by the -Z/--zero option, and if not specified,
# zeroing is used by default if possible. Zeroing simply overwrites the
# first 4KiB of a new LV with zeroes and does no signature detection or
# wiping. Signature wiping goes beyond zeroing and detects exact types
# and positions of signatures within the whole LV. It provides a
# cleaner LV after creation as all known signatures are wiped. The LV
# is not claimed incorrectly by other tools because of old signatures
# from previous use. The number of signatures that LVM can detect
# depends on the detection code that is selected (see
# use_blkid_wiping.) Wiping each detected signature must be confirmed.
# When this setting is disabled, signatures on new LVs are not detected
# or erased unless the --wipesignatures option is used directly.
wipe_signatures_when_zeroing_new_lvs = 1
# Configuration option allocation/mirror_logs_require_separate_pvs.
# Mirror logs and images will always use different PVs.
# The default setting changed in version 2.02.85.
mirror_logs_require_separate_pvs = 0
# Configuration option allocation/raid_stripe_all_devices.
# Stripe across all PVs when RAID stripes are not specified.
# If enabled, all PVs in the VG or on the command line are used for
# raid0/4/5/6/10 when the command does not specify the number of
# stripes to use.
# This was the default behaviour until release 2.02.162.
# This configuration option has an automatic default value.
# raid_stripe_all_devices = 0
# Configuration option allocation/cache_pool_metadata_require_separate_pvs.
# Cache pool metadata and data will always use different PVs.
cache_pool_metadata_require_separate_pvs = 0
# Configuration option allocation/cache_metadata_format.
# Sets default metadata format for new cache.
#
# Accepted values:
# 0 Automatically detected best available format
# 1 Original format
# 2 Improved 2nd. generation format
#
# This configuration option has an automatic default value.
# cache_metadata_format = 0
# Configuration option allocation/cache_mode.
# The default cache mode used for new cache.
#
# Accepted values:
# writethrough
# Data blocks are immediately written from the cache to disk.
# writeback
# Data blocks are written from the cache back to disk after some
# delay to improve performance.
#
# This setting replaces allocation/cache_pool_cachemode.
# This configuration option has an automatic default value.
# cache_mode = "writethrough"
# Configuration option allocation/cache_policy.
# The default cache policy used for new cache volume.
# Since kernel 4.2 the default policy is smq (Stochastic multiqueue),
# otherwise the older mq (Multiqueue) policy is selected.
# This configuration option does not have a default value defined.
# Configuration section allocation/cache_settings.
# Settings for the cache policy.
# See documentation for individual cache policies for more info.
# This configuration section has an automatic default value.
# cache_settings {
# }
# Configuration option allocation/cache_pool_chunk_size.
# The minimal chunk size in KiB for cache pool volumes.
# Using a chunk_size that is too large can result in wasteful use of
# the cache, where small reads and writes can cause large sections of
# an LV to be mapped into the cache. However, choosing a chunk_size
# that is too small can result in more overhead trying to manage the
# numerous chunks that become mapped into the cache. The former is
# more of a problem than the latter in most cases, so the default is
# on the smaller end of the spectrum. Supported values range from
# 32KiB to 1GiB in multiples of 32.
# This configuration option does not have a default value defined.
# Configuration option allocation/cache_pool_max_chunks.
# The maximum number of chunks in a cache pool.
# For cache target v1.9 the recommended maximumm is 1000000 chunks.
# Using cache pool with more chunks may degrade cache performance.
# This configuration option does not have a default value defined.
# Configuration option allocation/thin_pool_metadata_require_separate_pvs.
# Thin pool metdata and data will always use different PVs.
thin_pool_metadata_require_separate_pvs = 0
# Configuration option allocation/thin_pool_zero.
# Thin pool data chunks are zeroed before they are first used.
# Zeroing with a larger thin pool chunk size reduces performance.
# This configuration option has an automatic default value.
# thin_pool_zero = 1
# Configuration option allocation/thin_pool_discards.
# The discards behaviour of thin pool volumes.
#
# Accepted values:
# ignore
# nopassdown
# passdown
#
# This configuration option has an automatic default value.
# thin_pool_discards = "passdown"
# Configuration option allocation/thin_pool_chunk_size_policy.
# The chunk size calculation policy for thin pool volumes.
#
# Accepted values:
# generic
# If thin_pool_chunk_size is defined, use it. Otherwise, calculate
# the chunk size based on estimation and device hints exposed in
# sysfs - the minimum_io_size. The chunk size is always at least
# 64KiB.
# performance
# If thin_pool_chunk_size is defined, use it. Otherwise, calculate
# the chunk size for performance based on device hints exposed in
# sysfs - the optimal_io_size. The chunk size is always at least
# 512KiB.
#
# This configuration option has an automatic default value.
# thin_pool_chunk_size_policy = "generic"
# Configuration option allocation/thin_pool_chunk_size.
# The minimal chunk size in KiB for thin pool volumes.
# Larger chunk sizes may improve performance for plain thin volumes,
# however using them for snapshot volumes is less efficient, as it
# consumes more space and takes extra time for copying. When unset,
# lvm tries to estimate chunk size starting from 64KiB. Supported
# values are in the range 64KiB to 1GiB.
# This configuration option does not have a default value defined.
# Configuration option allocation/physical_extent_size.
# Default physical extent size in KiB to use for new VGs.
# This configuration option has an automatic default value.
# physical_extent_size = 4096
}
# Configuration section log.
# How LVM log information is reported.
log {
# Configuration option log/report_command_log.
# Enable or disable LVM log reporting.
# If enabled, LVM will collect a log of operations, messages,
# per-object return codes with object identification and associated
# error numbers (errnos) during LVM command processing. Then the
# log is either reported solely or in addition to any existing
# reports, depending on LVM command used. If it is a reporting command
# (e.g. pvs, vgs, lvs, lvm fullreport), then the log is reported in
# addition to any existing reports. Otherwise, there's only log report
# on output. For all applicable LVM commands, you can request that
# the output has only log report by using --logonly command line
# option. Use log/command_log_cols and log/command_log_sort settings
# to define fields to display and sort fields for the log report.
# You can also use log/command_log_selection to define selection
# criteria used each time the log is reported.
# This configuration option has an automatic default value.
# report_command_log = 0
# Configuration option log/command_log_sort.
# List of columns to sort by when reporting command log.
# See --logonly --configreport log -o help
# for the list of possible fields.
# This configuration option has an automatic default value.
# command_log_sort = "log_seq_num"
# Configuration option log/command_log_cols.
# List of columns to report when reporting command log.
# See --logonly --configreport log -o help
# for the list of possible fields.
# This configuration option has an automatic default value.
# command_log_cols = "log_seq_num,log_type,log_context,log_object_type,log_object_name,log_object_id,log_object_group,log_object_group_id,log_message,log_errno,log_ret_code"
# Configuration option log/command_log_selection.
# Selection criteria used when reporting command log.
# You can define selection criteria that are applied each
# time log is reported. This way, it is possible to control the
# amount of log that is displayed on output and you can select
# only parts of the log that are important for you. To define
# selection criteria, use fields from log report. See also
# --logonly --configreport log -S help for the
# list of possible fields and selection operators. You can also
# define selection criteria for log report on command line directly
# using --configreport log -S
# which has precedence over log/command_log_selection setting.
# For more information about selection criteria in general, see
# lvm(8) man page.
# This configuration option has an automatic default value.
# command_log_selection = "!(log_type=status && message=success)"
# Configuration option log/verbose.
# Controls the messages sent to stdout or stderr.
verbose = 0
# Configuration option log/silent.
# Suppress all non-essential messages from stdout.
# This has the same effect as -qq. When enabled, the following commands
# still produce output: dumpconfig, lvdisplay, lvmdiskscan, lvs, pvck,
# pvdisplay, pvs, version, vgcfgrestore -l, vgdisplay, vgs.
# Non-essential messages are shifted from log level 4 to log level 5
# for syslog and lvm2_log_fn purposes.
# Any 'yes' or 'no' questions not overridden by other arguments are
# suppressed and default to 'no'.
silent = 0
# Configuration option log/syslog.
# Send log messages through syslog.
syslog = 1
# Configuration option log/file.
# Write error and debug log messages to a file specified here.
# This configuration option does not have a default value defined.
# file = "/var/log/lvm2.log"
# Configuration option log/overwrite.
# Overwrite the log file each time the program is run.
overwrite = 0
# Configuration option log/level.
# The level of log messages that are sent to the log file or syslog.
# There are 6 syslog-like log levels currently in use: 2 to 7 inclusive.
# 7 is the most verbose (LOG_DEBUG).
level = 0
# Configuration option log/indent.
# Indent messages according to their severity.
indent = 1
# Configuration option log/command_names.
# Display the command name on each line of output.
command_names = 0
# Configuration option log/prefix.
# A prefix to use before the log message text.
# (After the command name, if selected).
# Two spaces allows you to see/grep the severity of each message.
# To make the messages look similar to the original LVM tools use:
# indent = 0, command_names = 1, prefix = " -- "
prefix = " "
# Configuration option log/activation.
# Log messages during activation.
# Don't use this in low memory situations (can deadlock).
activation = 0
# Configuration option log/debug_classes.
# Select log messages by class.
# Some debugging messages are assigned to a class and only appear in
# debug output if the class is listed here. Classes currently
# available: memory, devices, activation, allocation, lvmetad,
# metadata, cache, locking, lvmpolld. Use "all" to see everything.
debug_classes = [ "memory", "devices", "activation", "allocation", "lvmetad", "metadata", "cache", "locking", "lvmpolld", "dbus" ]
}
# Configuration section backup.
# How LVM metadata is backed up and archived.
# In LVM, a 'backup' is a copy of the metadata for the current system,
# and an 'archive' contains old metadata configurations. They are
# stored in a human readable text format.
backup {
# Configuration option backup/backup.
# Maintain a backup of the current metadata configuration.
# Think very hard before turning this off!
backup = 1
# Configuration option backup/backup_dir.
# Location of the metadata backup files.
# Remember to back up this directory regularly!
backup_dir = "/etc/lvm/backup"
# Configuration option backup/archive.
# Maintain an archive of old metadata configurations.
# Think very hard before turning this off.
archive = 1
# Configuration option backup/archive_dir.
# Location of the metdata archive files.
# Remember to back up this directory regularly!
archive_dir = "/etc/lvm/archive"
# Configuration option backup/retain_min.
# Minimum number of archives to keep.
retain_min = 10
# Configuration option backup/retain_days.
# Minimum number of days to keep archive files.
retain_days = 30
}
# Configuration section shell.
# Settings for running LVM in shell (readline) mode.
shell {
# Configuration option shell/history_size.
# Number of lines of history to store in ~/.lvm_history.
history_size = 100
}
# Configuration section global.
# Miscellaneous global LVM settings.
global {
# Configuration option global/umask.
# The file creation mask for any files and directories created.
# Interpreted as octal if the first digit is zero.
umask = 077
# Configuration option global/test.
# No on-disk metadata changes will be made in test mode.
# Equivalent to having the -t option on every command.
test = 0
# Configuration option global/units.
# Default value for --units argument.
units = "h"
# Configuration option global/si_unit_consistency.
# Distinguish between powers of 1024 and 1000 bytes.
# The LVM commands distinguish between powers of 1024 bytes,
# e.g. KiB, MiB, GiB, and powers of 1000 bytes, e.g. KB, MB, GB.
# If scripts depend on the old behaviour, disable this setting
# temporarily until they are updated.
si_unit_consistency = 1
# Configuration option global/suffix.
# Display unit suffix for sizes.
# This setting has no effect if the units are in human-readable form
# (global/units = "h") in which case the suffix is always displayed.
suffix = 1
# Configuration option global/activation.
# Enable/disable communication with the kernel device-mapper.
# Disable to use the tools to manipulate LVM metadata without
# activating any logical volumes. If the device-mapper driver
# is not present in the kernel, disabling this should suppress
# the error messages.
activation = 1
# Configuration option global/fallback_to_lvm1.
# Try running LVM1 tools if LVM cannot communicate with DM.
# This option only applies to 2.4 kernels and is provided to help
# switch between device-mapper kernels and LVM1 kernels. The LVM1
# tools need to be installed with .lvm1 suffices, e.g. vgscan.lvm1.
# They will stop working once the lvm2 on-disk metadata format is used.
# This configuration option has an automatic default value.
# fallback_to_lvm1 = 1
# Configuration option global/format.
# The default metadata format that commands should use.
# The -M 1|2 option overrides this setting.
#
# Accepted values:
# lvm1
# lvm2
#
# This configuration option has an automatic default value.
# format = "lvm2"
# Configuration option global/format_libraries.
# Shared libraries that process different metadata formats.
# If support for LVM1 metadata was compiled as a shared library use
# format_libraries = "liblvm2format1.so"
# This configuration option does not have a default value defined.
# Configuration option global/segment_libraries.
# This configuration option does not have a default value defined.
# Configuration option global/proc.
# Location of proc filesystem.
# This configuration option is advanced.
proc = "/proc"
# Configuration option global/etc.
# Location of /etc system configuration directory.
etc = "/etc"
# Configuration option global/locking_type.
# Type of locking to use.
#
# Accepted values:
# 0
# Turns off locking. Warning: this risks metadata corruption if
# commands run concurrently.
# 1
# LVM uses local file-based locking, the standard mode.
# 2
# LVM uses the external shared library locking_library.
# 3
# LVM uses built-in clustered locking with clvmd.
# This is incompatible with lvmetad. If use_lvmetad is enabled,
# LVM prints a warning and disables lvmetad use.
# 4
# LVM uses read-only locking which forbids any operations that
# might change metadata.
# 5
# Offers dummy locking for tools that do not need any locks.
# You should not need to set this directly; the tools will select
# when to use it instead of the configured locking_type.
# Do not use lvmetad or the kernel device-mapper driver with this
# locking type. It is used by the --readonly option that offers
# read-only access to Volume Group metadata that cannot be locked
# safely because it belongs to an inaccessible domain and might be
# in use, for example a virtual machine image or a disk that is
# shared by a clustered machine.
#
locking_type = 1
# Configuration option global/wait_for_locks.
# When disabled, fail if a lock request would block.
wait_for_locks = 1
# Configuration option global/fallback_to_clustered_locking.
# Attempt to use built-in cluster locking if locking_type 2 fails.
# If using external locking (type 2) and initialisation fails, with
# this enabled, an attempt will be made to use the built-in clustered
# locking. Disable this if using a customised locking_library.
fallback_to_clustered_locking = 1
# Configuration option global/fallback_to_local_locking.
# Use locking_type 1 (local) if locking_type 2 or 3 fail.
# If an attempt to initialise type 2 or type 3 locking failed, perhaps
# because cluster components such as clvmd are not running, with this
# enabled, an attempt will be made to use local file-based locking
# (type 1). If this succeeds, only commands against local VGs will
# proceed. VGs marked as clustered will be ignored.
fallback_to_local_locking = 1
# Configuration option global/locking_dir.
# Directory to use for LVM command file locks.
# Local non-LV directory that holds file-based locks while commands are
# in progress. A directory like /tmp that may get wiped on reboot is OK.
locking_dir = "/run/lock/lvm"
# Configuration option global/prioritise_write_locks.
# Allow quicker VG write access during high volume read access.
# When there are competing read-only and read-write access requests for
# a volume group's metadata, instead of always granting the read-only
# requests immediately, delay them to allow the read-write requests to
# be serviced. Without this setting, write access may be stalled by a
# high volume of read-only requests. This option only affects
# locking_type 1 viz. local file-based locking.
prioritise_write_locks = 1
# Configuration option global/library_dir.
# Search this directory first for shared libraries.
# This configuration option does not have a default value defined.
# Configuration option global/locking_library.
# The external locking library to use for locking_type 2.
# This configuration option has an automatic default value.
# locking_library = "liblvm2clusterlock.so"
# Configuration option global/abort_on_internal_errors.
# Abort a command that encounters an internal error.
# Treat any internal errors as fatal errors, aborting the process that
# encountered the internal error. Please only enable for debugging.
abort_on_internal_errors = 0
# Configuration option global/detect_internal_vg_cache_corruption.
# Internal verification of VG structures.
# Check if CRC matches when a parsed VG is used multiple times. This
# is useful to catch unexpected changes to cached VG structures.
# Please only enable for debugging.
detect_internal_vg_cache_corruption = 0
# Configuration option global/metadata_read_only.
# No operations that change on-disk metadata are permitted.
# Additionally, read-only commands that encounter metadata in need of
# repair will still be allowed to proceed exactly as if the repair had
# been performed (except for the unchanged vg_seqno). Inappropriate
# use could mess up your system, so seek advice first!
metadata_read_only = 0
# Configuration option global/mirror_segtype_default.
# The segment type used by the short mirroring option -m.
# The --type mirror|raid1 option overrides this setting.
#
# Accepted values:
# mirror
# The original RAID1 implementation from LVM/DM. It is
# characterized by a flexible log solution (core, disk, mirrored),
# and by the necessity to block I/O while handling a failure.
# There is an inherent race in the dmeventd failure handling logic
# with snapshots of devices using this type of RAID1 that in the
# worst case could cause a deadlock. (Also see
# devices/ignore_lvm_mirrors.)
# raid1
# This is a newer RAID1 implementation using the MD RAID1
# personality through device-mapper. It is characterized by a
# lack of log options. (A log is always allocated for every
# device and they are placed on the same device as the image,
# so no separate devices are required.) This mirror
# implementation does not require I/O to be blocked while
# handling a failure. This mirror implementation is not
# cluster-aware and cannot be used in a shared (active/active)
# fashion in a cluster.
#
mirror_segtype_default = "raid1"
# Configuration option global/raid10_segtype_default.
# The segment type used by the -i -m combination.
# The --type raid10|mirror option overrides this setting.
# The --stripes/-i and --mirrors/-m options can both be specified
# during the creation of a logical volume to use both striping and
# mirroring for the LV. There are two different implementations.
#
# Accepted values:
# raid10
# LVM uses MD's RAID10 personality through DM. This is the
# preferred option.
# mirror
# LVM layers the 'mirror' and 'stripe' segment types. The layering
# is done by creating a mirror LV on top of striped sub-LVs,
# effectively creating a RAID 0+1 array. The layering is suboptimal
# in terms of providing redundancy and performance.
#
raid10_segtype_default = "raid10"
# Configuration option global/sparse_segtype_default.
# The segment type used by the -V -L combination.
# The --type snapshot|thin option overrides this setting.
# The combination of -V and -L options creates a sparse LV. There are
# two different implementations.
#
# Accepted values:
# snapshot
# The original snapshot implementation from LVM/DM. It uses an old
# snapshot that mixes data and metadata within a single COW
# storage volume and performs poorly when the size of stored data
# passes hundreds of MB.
# thin
# A newer implementation that uses thin provisioning. It has a
# bigger minimal chunk size (64KiB) and uses a separate volume for
# metadata. It has better performance, especially when more data
# is used. It also supports full snapshots.
#
sparse_segtype_default = "thin"
# Configuration option global/lvdisplay_shows_full_device_path.
# Enable this to reinstate the previous lvdisplay name format.
# The default format for displaying LV names in lvdisplay was changed
# in version 2.02.89 to show the LV name and path separately.
# Previously this was always shown as /dev/vgname/lvname even when that
# was never a valid path in the /dev filesystem.
# This configuration option has an automatic default value.
# lvdisplay_shows_full_device_path = 0
# Configuration option global/use_lvmetad.
# Use lvmetad to cache metadata and reduce disk scanning.
# When enabled (and running), lvmetad provides LVM commands with VG
# metadata and PV state. LVM commands then avoid reading this
# information from disks which can be slow. When disabled (or not
# running), LVM commands fall back to scanning disks to obtain VG
# metadata. lvmetad is kept updated via udev rules which must be set
# up for LVM to work correctly. (The udev rules should be installed
# by default.) Without a proper udev setup, changes in the system's
# block device configuration will be unknown to LVM, and ignored
# until a manual 'pvscan --cache' is run. If lvmetad was running
# while use_lvmetad was disabled, it must be stopped, use_lvmetad
# enabled, and then started. When using lvmetad, LV activation is
# switched to an automatic, event-based mode. In this mode, LVs are
# activated based on incoming udev events that inform lvmetad when
# PVs appear on the system. When a VG is complete (all PVs present),
# it is auto-activated. The auto_activation_volume_list setting
# controls which LVs are auto-activated (all by default.)
# When lvmetad is updated (automatically by udev events, or directly
# by pvscan --cache), devices/filter is ignored and all devices are
# scanned by default. lvmetad always keeps unfiltered information
# which is provided to LVM commands. Each LVM command then filters
# based on devices/filter. This does not apply to other, non-regexp,
# filtering settings: component filters such as multipath and MD
# are checked during pvscan --cache. To filter a device and prevent
# scanning from the LVM system entirely, including lvmetad, use
# devices/global_filter.
use_lvmetad = 0
# Configuration option global/lvmetad_update_wait_time.
# Number of seconds a command will wait for lvmetad update to finish.
# After waiting for this period, a command will not use lvmetad, and
# will revert to disk scanning.
# This configuration option has an automatic default value.
# lvmetad_update_wait_time = 10
# Configuration option global/use_lvmlockd.
# Use lvmlockd for locking among hosts using LVM on shared storage.
# Applicable only if LVM is compiled with lockd support in which
# case there is also lvmlockd(8) man page available for more
# information.
use_lvmlockd = 0
# Configuration option global/lvmlockd_lock_retries.
# Retry lvmlockd lock requests this many times.
# Applicable only if LVM is compiled with lockd support
# This configuration option has an automatic default value.
# lvmlockd_lock_retries = 3
# Configuration option global/sanlock_lv_extend.
# Size in MiB to extend the internal LV holding sanlock locks.
# The internal LV holds locks for each LV in the VG, and after enough
# LVs have been created, the internal LV needs to be extended. lvcreate
# will automatically extend the internal LV when needed by the amount
# specified here. Setting this to 0 disables the automatic extension
# and can cause lvcreate to fail. Applicable only if LVM is compiled
# with lockd support
# This configuration option has an automatic default value.
# sanlock_lv_extend = 256
# Configuration option global/thin_check_executable.
# The full path to the thin_check command.
# LVM uses this command to check that a thin metadata device is in a
# usable state. When a thin pool is activated and after it is
# deactivated, this command is run. Activation will only proceed if
# the command has an exit status of 0. Set to "" to skip this check.
# (Not recommended.) Also see thin_check_options.
# (See package device-mapper-persistent-data or thin-provisioning-tools)
# This configuration option has an automatic default value.
# thin_check_executable = "/usr/sbin/thin_check"
# Configuration option global/thin_dump_executable.
# The full path to the thin_dump command.
# LVM uses this command to dump thin pool metadata.
# (See package device-mapper-persistent-data or thin-provisioning-tools)
# This configuration option has an automatic default value.
# thin_dump_executable = "/usr/sbin/thin_dump"
# Configuration option global/thin_repair_executable.
# The full path to the thin_repair command.
# LVM uses this command to repair a thin metadata device if it is in
# an unusable state. Also see thin_repair_options.
# (See package device-mapper-persistent-data or thin-provisioning-tools)
# This configuration option has an automatic default value.
# thin_repair_executable = "/usr/sbin/thin_repair"
# Configuration option global/thin_check_options.
# List of options passed to the thin_check command.
# With thin_check version 2.1 or newer you can add the option
# --ignore-non-fatal-errors to let it pass through ignorable errors
# and fix them later. With thin_check version 3.2 or newer you should
# include the option --clear-needs-check-flag.
# This configuration option has an automatic default value.
# thin_check_options = [ "-q", "--clear-needs-check-flag" ]
# Configuration option global/thin_repair_options.
# List of options passed to the thin_repair command.
# This configuration option has an automatic default value.
# thin_repair_options = [ "" ]
# Configuration option global/thin_disabled_features.
# Features to not use in the thin driver.
# This can be helpful for testing, or to avoid using a feature that is
# causing problems. Features include: block_size, discards,
# discards_non_power_2, external_origin, metadata_resize,
# external_origin_extend, error_if_no_space.
#
# Example
# thin_disabled_features = [ "discards", "block_size" ]
#
# This configuration option does not have a default value defined.
# Configuration option global/cache_disabled_features.
# Features to not use in the cache driver.
# This can be helpful for testing, or to avoid using a feature that is
# causing problems. Features include: policy_mq, policy_smq, metadata2.
#
# Example
# cache_disabled_features = [ "policy_smq" ]
#
# This configuration option does not have a default value defined.
# Configuration option global/cache_check_executable.
# The full path to the cache_check command.
# LVM uses this command to check that a cache metadata device is in a
# usable state. When a cached LV is activated and after it is
# deactivated, this command is run. Activation will only proceed if the
# command has an exit status of 0. Set to "" to skip this check.
# (Not recommended.) Also see cache_check_options.
# (See package device-mapper-persistent-data or thin-provisioning-tools)
# This configuration option has an automatic default value.
# cache_check_executable = "/usr/sbin/cache_check"
# Configuration option global/cache_dump_executable.
# The full path to the cache_dump command.
# LVM uses this command to dump cache pool metadata.
# (See package device-mapper-persistent-data or thin-provisioning-tools)
# This configuration option has an automatic default value.
# cache_dump_executable = "/usr/sbin/cache_dump"
# Configuration option global/cache_repair_executable.
# The full path to the cache_repair command.
# LVM uses this command to repair a cache metadata device if it is in
# an unusable state. Also see cache_repair_options.
# (See package device-mapper-persistent-data or thin-provisioning-tools)
# This configuration option has an automatic default value.
# cache_repair_executable = "/usr/sbin/cache_repair"
# Configuration option global/cache_check_options.
# List of options passed to the cache_check command.
# With cache_check version 5.0 or newer you should include the option
# --clear-needs-check-flag.
# This configuration option has an automatic default value.
# cache_check_options = [ "-q", "--clear-needs-check-flag" ]
# Configuration option global/cache_repair_options.
# List of options passed to the cache_repair command.
# This configuration option has an automatic default value.
# cache_repair_options = [ "" ]
# Configuration option global/fsadm_executable.
# The full path to the fsadm command.
# LVM uses this command to help with lvresize -r operations.
# This configuration option has an automatic default value.
# fsadm_executable = "/usr/sbin/fsadm"
# Configuration option global/system_id_source.
# The method LVM uses to set the local system ID.
# Volume Groups can also be given a system ID (by vgcreate, vgchange,
# or vgimport.) A VG on shared storage devices is accessible only to
# the host with a matching system ID. See 'man lvmsystemid' for
# information on limitations and correct usage.
#
# Accepted values:
# none
# The host has no system ID.
# lvmlocal
# Obtain the system ID from the system_id setting in the 'local'
# section of an lvm configuration file, e.g. lvmlocal.conf.
# uname
# Set the system ID from the hostname (uname) of the system.
# System IDs beginning localhost are not permitted.
# machineid
# Use the contents of the machine-id file to set the system ID.
# Some systems create this file at installation time.
# See 'man machine-id' and global/etc.
# file
# Use the contents of another file (system_id_file) to set the
# system ID.
#
system_id_source = "none"
# Configuration option global/system_id_file.
# The full path to the file containing a system ID.
# This is used when system_id_source is set to 'file'.
# Comments starting with the character # are ignored.
# This configuration option does not have a default value defined.
# Configuration option global/use_lvmpolld.
# Use lvmpolld to supervise long running LVM commands.
# When enabled, control of long running LVM commands is transferred
# from the original LVM command to the lvmpolld daemon. This allows
# the operation to continue independent of the original LVM command.
# After lvmpolld takes over, the LVM command displays the progress
# of the ongoing operation. lvmpolld itself runs LVM commands to
# manage the progress of ongoing operations. lvmpolld can be used as
# a native systemd service, which allows it to be started on demand,
# and to use its own control group. When this option is disabled, LVM
# commands will supervise long running operations by forking themselves.
# Applicable only if LVM is compiled with lvmpolld support.
use_lvmpolld = 1
# Configuration option global/notify_dbus.
# Enable D-Bus notification from LVM commands.
# When enabled, an LVM command that changes PVs, changes VG metadata,
# or changes the activation state of an LV will send a notification.
notify_dbus = 1
}
# Configuration section activation.
activation {
# Configuration option activation/checks.
# Perform internal checks of libdevmapper operations.
# Useful for debugging problems with activation. Some of the checks may
# be expensive, so it's best to use this only when there seems to be a
# problem.
checks = 0
# Configuration option activation/udev_sync.
# Use udev notifications to synchronize udev and LVM.
# The --nodevsync option overrides this setting.
# When disabled, LVM commands will not wait for notifications from
# udev, but continue irrespective of any possible udev processing in
# the background. Only use this if udev is not running or has rules
# that ignore the devices LVM creates. If enabled when udev is not
# running, and LVM processes are waiting for udev, run the command
# 'dmsetup udevcomplete_all' to wake them up.
udev_sync = 1
# Configuration option activation/udev_rules.
# Use udev rules to manage LV device nodes and symlinks.
# When disabled, LVM will manage the device nodes and symlinks for
# active LVs itself. Manual intervention may be required if this
# setting is changed while LVs are active.
udev_rules = 1
# Configuration option activation/verify_udev_operations.
# Use extra checks in LVM to verify udev operations.
# This enables additional checks (and if necessary, repairs) on entries
# in the device directory after udev has completed processing its
# events. Useful for diagnosing problems with LVM/udev interactions.
verify_udev_operations = 0
# Configuration option activation/retry_deactivation.
# Retry failed LV deactivation.
# If LV deactivation fails, LVM will retry for a few seconds before
# failing. This may happen because a process run from a quick udev rule
# temporarily opened the device.
retry_deactivation = 1
# Configuration option activation/missing_stripe_filler.
# Method to fill missing stripes when activating an incomplete LV.
# Using 'error' will make inaccessible parts of the device return I/O
# errors on access. Using 'zero' will return success (and zero) on I/O
# You can instead use a device path, in which case,
# that device will be used in place of missing stripes. Using anything
# other than 'error' with mirrored or snapshotted volumes is likely to
# result in data corruption.
# This configuration option is advanced.
missing_stripe_filler = "error"
# Configuration option activation/use_linear_target.
# Use the linear target to optimize single stripe LVs.
# When disabled, the striped target is used. The linear target is an
# optimised version of the striped target that only handles a single
# stripe.
use_linear_target = 1
# Configuration option activation/reserved_stack.
# Stack size in KiB to reserve for use while devices are suspended.
# Insufficent reserve risks I/O deadlock during device suspension.
reserved_stack = 64
# Configuration option activation/reserved_memory.
# Memory size in KiB to reserve for use while devices are suspended.
# Insufficent reserve risks I/O deadlock during device suspension.
reserved_memory = 8192
# Configuration option activation/process_priority.
# Nice value used while devices are suspended.
# Use a high priority so that LVs are suspended
# for the shortest possible time.
process_priority = -18
# Configuration option activation/volume_list.
# Only LVs selected by this list are activated.
# If this list is defined, an LV is only activated if it matches an
# entry in this list. If this list is undefined, it imposes no limits
# on LV activation (all are allowed).
#
# Accepted values:
# vgname
# The VG name is matched exactly and selects all LVs in the VG.
# vgname/lvname
# The VG name and LV name are matched exactly and selects the LV.
# @tag
# Selects an LV if the specified tag matches a tag set on the LV
# or VG.
# @*
# Selects an LV if a tag defined on the host is also set on the LV
# or VG. See tags/hosttags. If any host tags exist but volume_list
# is not defined, a default single-entry list containing '@*'
# is assumed.
#
# Example
# volume_list = [ "vg1", "vg2/lvol1", "@tag1", "@*" ]
#
# This configuration option does not have a default value defined.
# Configuration option activation/auto_activation_volume_list.
# Only LVs selected by this list are auto-activated.
# This list works like volume_list, but it is used only by
# auto-activation commands. It does not apply to direct activation
# commands. If this list is defined, an LV is only auto-activated
# if it matches an entry in this list. If this list is undefined, it
# imposes no limits on LV auto-activation (all are allowed.) If this
# list is defined and empty, i.e. "[]", then no LVs are selected for
# auto-activation. An LV that is selected by this list for
# auto-activation, must also be selected by volume_list (if defined)
# before it is activated. Auto-activation is an activation command that
# includes the 'a' argument: --activate ay or -a ay. The 'a' (auto)
# argument for auto-activation is meant to be used by activation
# commands that are run automatically by the system, as opposed to LVM
# commands run directly by a user. A user may also use the 'a' flag
# directly to perform auto-activation. Also see pvscan(8) for more
# information about auto-activation.
#
# Accepted values:
# vgname
# The VG name is matched exactly and selects all LVs in the VG.
# vgname/lvname
# The VG name and LV name are matched exactly and selects the LV.
# @tag
# Selects an LV if the specified tag matches a tag set on the LV
# or VG.
# @*
# Selects an LV if a tag defined on the host is also set on the LV
# or VG. See tags/hosttags. If any host tags exist but volume_list
# is not defined, a default single-entry list containing '@*'
# is assumed.
#
# Example
# auto_activation_volume_list = [ "vg1", "vg2/lvol1", "@tag1", "@*" ]
#
# This configuration option does not have a default value defined.
# Configuration option activation/read_only_volume_list.
# LVs in this list are activated in read-only mode.
# If this list is defined, each LV that is to be activated is checked
# against this list, and if it matches, it is activated in read-only
# mode. This overrides the permission setting stored in the metadata,
# e.g. from --permission rw.
#
# Accepted values:
# vgname
# The VG name is matched exactly and selects all LVs in the VG.
# vgname/lvname
# The VG name and LV name are matched exactly and selects the LV.
# @tag
# Selects an LV if the specified tag matches a tag set on the LV
# or VG.
# @*
# Selects an LV if a tag defined on the host is also set on the LV
# or VG. See tags/hosttags. If any host tags exist but volume_list
# is not defined, a default single-entry list containing '@*'
# is assumed.
#
# Example
# read_only_volume_list = [ "vg1", "vg2/lvol1", "@tag1", "@*" ]
#
# This configuration option does not have a default value defined.
# Configuration option activation/raid_region_size.
# Size in KiB of each raid or mirror synchronization region.
# The clean/dirty state of data is tracked for each region.
# The value is rounded down to a power of two if necessary, and
# is ignored if it is not a multiple of the machine memory page size.
raid_region_size = 2048
# Configuration option activation/error_when_full.
# Return errors if a thin pool runs out of space.
# The --errorwhenfull option overrides this setting.
# When enabled, writes to thin LVs immediately return an error if the
# thin pool is out of data space. When disabled, writes to thin LVs
# are queued if the thin pool is out of space, and processed when the
# thin pool data space is extended. New thin pools are assigned the
# behavior defined here.
# This configuration option has an automatic default value.
# error_when_full = 0
# Configuration option activation/readahead.
# Setting to use when there is no readahead setting in metadata.
#
# Accepted values:
# none
# Disable readahead.
# auto
# Use default value chosen by kernel.
#
readahead = "auto"
# Configuration option activation/raid_fault_policy.
# Defines how a device failure in a RAID LV is handled.
# This includes LVs that have the following segment types:
# raid1, raid4, raid5*, and raid6*.
# If a device in the LV fails, the policy determines the steps
# performed by dmeventd automatically, and the steps perfomed by the
# manual command lvconvert --repair --use-policies.
# Automatic handling requires dmeventd to be monitoring the LV.
#
# Accepted values:
# warn
# Use the system log to warn the user that a device in the RAID LV
# has failed. It is left to the user to run lvconvert --repair
# manually to remove or replace the failed device. As long as the
# number of failed devices does not exceed the redundancy of the LV
# (1 device for raid4/5, 2 for raid6), the LV will remain usable.
# allocate
# Attempt to use any extra physical volumes in the VG as spares and
# replace faulty devices.
#
raid_fault_policy = "warn"
# Configuration option activation/mirror_image_fault_policy.
# Defines how a device failure in a 'mirror' LV is handled.
# An LV with the 'mirror' segment type is composed of mirror images
# (copies) and a mirror log. A disk log ensures that a mirror LV does
# not need to be re-synced (all copies made the same) every time a
# machine reboots or crashes. If a device in the LV fails, this policy
# determines the steps perfomed by dmeventd automatically, and the steps
# performed by the manual command lvconvert --repair --use-policies.
# Automatic handling requires dmeventd to be monitoring the LV.
#
# Accepted values:
# remove
# Simply remove the faulty device and run without it. If the log
# device fails, the mirror would convert to using an in-memory log.
# This means the mirror will not remember its sync status across
# crashes/reboots and the entire mirror will be re-synced. If a
# mirror image fails, the mirror will convert to a non-mirrored
# device if there is only one remaining good copy.
# allocate
# Remove the faulty device and try to allocate space on a new
# device to be a replacement for the failed device. Using this
# policy for the log is fast and maintains the ability to remember
# sync state through crashes/reboots. Using this policy for a
# mirror device is slow, as it requires the mirror to resynchronize
# the devices, but it will preserve the mirror characteristic of
# the device. This policy acts like 'remove' if no suitable device
# and space can be allocated for the replacement.
# allocate_anywhere
# Not yet implemented. Useful to place the log device temporarily
# on the same physical volume as one of the mirror images. This
# policy is not recommended for mirror devices since it would break
# the redundant nature of the mirror. This policy acts like
# 'remove' if no suitable device and space can be allocated for the
# replacement.
#
mirror_image_fault_policy = "remove"
# Configuration option activation/mirror_log_fault_policy.
# Defines how a device failure in a 'mirror' log LV is handled.
# The mirror_image_fault_policy description for mirrored LVs also
# applies to mirrored log LVs.
mirror_log_fault_policy = "allocate"
# Configuration option activation/snapshot_autoextend_threshold.
# Auto-extend a snapshot when its usage exceeds this percent.
# Setting this to 100 disables automatic extension.
# The minimum value is 50 (a smaller value is treated as 50.)
# Also see snapshot_autoextend_percent.
# Automatic extension requires dmeventd to be monitoring the LV.
#
# Example
# Using 70% autoextend threshold and 20% autoextend size, when a 1G
# snapshot exceeds 700M, it is extended to 1.2G, and when it exceeds
# 840M, it is extended to 1.44G:
# snapshot_autoextend_threshold = 70
#
snapshot_autoextend_threshold = 100
# Configuration option activation/snapshot_autoextend_percent.
# Auto-extending a snapshot adds this percent extra space.
# The amount of additional space added to a snapshot is this
# percent of its current size.
#
# Example
# Using 70% autoextend threshold and 20% autoextend size, when a 1G
# snapshot exceeds 700M, it is extended to 1.2G, and when it exceeds
# 840M, it is extended to 1.44G:
# snapshot_autoextend_percent = 20
#
snapshot_autoextend_percent = 20
# Configuration option activation/thin_pool_autoextend_threshold.
# Auto-extend a thin pool when its usage exceeds this percent.
# Setting this to 100 disables automatic extension.
# The minimum value is 50 (a smaller value is treated as 50.)
# Also see thin_pool_autoextend_percent.
# Automatic extension requires dmeventd to be monitoring the LV.
#
# Example
# Using 70% autoextend threshold and 20% autoextend size, when a 1G
# thin pool exceeds 700M, it is extended to 1.2G, and when it exceeds
# 840M, it is extended to 1.44G:
# thin_pool_autoextend_threshold = 70
#
thin_pool_autoextend_threshold = 100
# Configuration option activation/thin_pool_autoextend_percent.
# Auto-extending a thin pool adds this percent extra space.
# The amount of additional space added to a thin pool is this
# percent of its current size.
#
# Example
# Using 70% autoextend threshold and 20% autoextend size, when a 1G
# thin pool exceeds 700M, it is extended to 1.2G, and when it exceeds
# 840M, it is extended to 1.44G:
# thin_pool_autoextend_percent = 20
#
thin_pool_autoextend_percent = 20
# Configuration option activation/mlock_filter.
# Do not mlock these memory areas.
# While activating devices, I/O to devices being (re)configured is
# suspended. As a precaution against deadlocks, LVM pins memory it is
# using so it is not paged out, and will not require I/O to reread.
# Groups of pages that are known not to be accessed during activation
# do not need to be pinned into memory. Each string listed in this
# setting is compared against each line in /proc/self/maps, and the
# pages corresponding to lines that match are not pinned. On some
# systems, locale-archive was found to make up over 80% of the memory
# used by the process.
#
# Example
# mlock_filter = [ "locale/locale-archive", "gconv/gconv-modules.cache" ]
#
# This configuration option is advanced.
# This configuration option does not have a default value defined.
# Configuration option activation/use_mlockall.
# Use the old behavior of mlockall to pin all memory.
# Prior to version 2.02.62, LVM used mlockall() to pin the whole
# process's memory while activating devices.
use_mlockall = 0
# Configuration option activation/monitoring.
# Monitor LVs that are activated.
# The --ignoremonitoring option overrides this setting.
# When enabled, LVM will ask dmeventd to monitor activated LVs.
monitoring = 1
# Configuration option activation/polling_interval.
# Check pvmove or lvconvert progress at this interval (seconds).
# When pvmove or lvconvert must wait for the kernel to finish
# synchronising or merging data, they check and report progress at
# intervals of this number of seconds. If this is set to 0 and there
# is only one thing to wait for, there are no progress reports, but
# the process is awoken immediately once the operation is complete.
polling_interval = 15
# Configuration option activation/auto_set_activation_skip.
# Set the activation skip flag on new thin snapshot LVs.
# The --setactivationskip option overrides this setting.
# An LV can have a persistent 'activation skip' flag. The flag causes
# the LV to be skipped during normal activation. The lvchange/vgchange
# -K option is required to activate LVs that have the activation skip
# flag set. When this setting is enabled, the activation skip flag is
# set on new thin snapshot LVs.
# This configuration option has an automatic default value.
# auto_set_activation_skip = 1
# Configuration option activation/activation_mode.
# How LVs with missing devices are activated.
# The --activationmode option overrides this setting.
#
# Accepted values:
# complete
# Only allow activation of an LV if all of the Physical Volumes it
# uses are present. Other PVs in the Volume Group may be missing.
# degraded
# Like complete, but additionally RAID LVs of segment type raid1,
# raid4, raid5, radid6 and raid10 will be activated if there is no
# data loss, i.e. they have sufficient redundancy to present the
# entire addressable range of the Logical Volume.
# partial
# Allows the activation of any LV even if a missing or failed PV
# could cause data loss with a portion of the LV inaccessible.
# This setting should not normally be used, but may sometimes
# assist with data recovery.
#
activation_mode = "degraded"
# Configuration option activation/lock_start_list.
# Locking is started only for VGs selected by this list.
# The rules are the same as those for volume_list.
# This configuration option does not have a default value defined.
# Configuration option activation/auto_lock_start_list.
# Locking is auto-started only for VGs selected by this list.
# The rules are the same as those for auto_activation_volume_list.
# This configuration option does not have a default value defined.
}
# Configuration section metadata.
# This configuration section has an automatic default value.
# metadata {
# Configuration option metadata/check_pv_device_sizes.
# Check device sizes are not smaller than corresponding PV sizes.
# If device size is less than corresponding PV size found in metadata,
# there is always a risk of data loss. If this option is set, then LVM
# issues a warning message each time it finds that the device size is
# less than corresponding PV size. You should not disable this unless
# you are absolutely sure about what you are doing!
# This configuration option is advanced.
# This configuration option has an automatic default value.
# check_pv_device_sizes = 1
# Configuration option metadata/record_lvs_history.
# When enabled, LVM keeps history records about removed LVs in
# metadata. The information that is recorded in metadata for
# historical LVs is reduced when compared to original
# information kept in metadata for live LVs. Currently, this
# feature is supported for thin and thin snapshot LVs only.
# This configuration option has an automatic default value.
# record_lvs_history = 0
# Configuration option metadata/lvs_history_retention_time.
# Retention time in seconds after which a record about individual
# historical logical volume is automatically destroyed.
# A value of 0 disables this feature.
# This configuration option has an automatic default value.
# lvs_history_retention_time = 0
# Configuration option metadata/pvmetadatacopies.
# Number of copies of metadata to store on each PV.
# The --pvmetadatacopies option overrides this setting.
#
# Accepted values:
# 2
# Two copies of the VG metadata are stored on the PV, one at the
# front of the PV, and one at the end.
# 1
# One copy of VG metadata is stored at the front of the PV.
# 0
# No copies of VG metadata are stored on the PV. This may be
# useful for VGs containing large numbers of PVs.
#
# This configuration option is advanced.
# This configuration option has an automatic default value.
# pvmetadatacopies = 1
# Configuration option metadata/vgmetadatacopies.
# Number of copies of metadata to maintain for each VG.
# The --vgmetadatacopies option overrides this setting.
# If set to a non-zero value, LVM automatically chooses which of the
# available metadata areas to use to achieve the requested number of
# copies of the VG metadata. If you set a value larger than the the
# total number of metadata areas available, then metadata is stored in
# them all. The value 0 (unmanaged) disables this automatic management
# and allows you to control which metadata areas are used at the
# individual PV level using pvchange --metadataignore y|n.
# This configuration option has an automatic default value.
# vgmetadatacopies = 0
# Configuration option metadata/pvmetadatasize.
# Approximate number of sectors to use for each metadata copy.
# VGs with large numbers of PVs or LVs, or VGs containing complex LV
# structures, may need additional space for VG metadata. The metadata
# areas are treated as circular buffers, so unused space becomes filled
# with an archive of the most recent previous versions of the metadata.
# This configuration option has an automatic default value.
# pvmetadatasize = 255
# Configuration option metadata/pvmetadataignore.
# Ignore metadata areas on a new PV.
# The --metadataignore option overrides this setting.
# If metadata areas on a PV are ignored, LVM will not store metadata
# in them.
# This configuration option is advanced.
# This configuration option has an automatic default value.
# pvmetadataignore = 0
# Configuration option metadata/stripesize.
# This configuration option is advanced.
# This configuration option has an automatic default value.
# stripesize = 64
# Configuration option metadata/dirs.
# Directories holding live copies of text format metadata.
# These directories must not be on logical volumes!
# It's possible to use LVM with a couple of directories here,
# preferably on different (non-LV) filesystems, and with no other
# on-disk metadata (pvmetadatacopies = 0). Or this can be in addition
# to on-disk metadata areas. The feature was originally added to
# simplify testing and is not supported under low memory situations -
# the machine could lock up. Never edit any files in these directories
# by hand unless you are absolutely sure you know what you are doing!
# Use the supplied toolset to make changes (e.g. vgcfgrestore).
#
# Example
# dirs = [ "/etc/lvm/metadata", "/mnt/disk2/lvm/metadata2" ]
#
# This configuration option is advanced.
# This configuration option does not have a default value defined.
# }
# Configuration section report.
# LVM report command output formatting.
# This configuration section has an automatic default value.
# report {
# Configuration option report/output_format.
# Format of LVM command's report output.
# If there is more than one report per command, then the format
# is applied for all reports. You can also change output format
# directly on command line using --reportformat option which
# has precedence over log/output_format setting.
# Accepted values:
# basic
# Original format with columns and rows. If there is more than
# one report per command, each report is prefixed with report's
# name for identification.
# json
# JSON format.
# This configuration option has an automatic default value.
# output_format = "basic"
# Configuration option report/compact_output.
# Do not print empty values for all report fields.
# If enabled, all fields that don't have a value set for any of the
# rows reported are skipped and not printed. Compact output is
# applicable only if report/buffered is enabled. If you need to
# compact only specified fields, use compact_output=0 and define
# report/compact_output_cols configuration setting instead.
# This configuration option has an automatic default value.
# compact_output = 0
# Configuration option report/compact_output_cols.
# Do not print empty values for specified report fields.
# If defined, specified fields that don't have a value set for any
# of the rows reported are skipped and not printed. Compact output
# is applicable only if report/buffered is enabled. If you need to
# compact all fields, use compact_output=1 instead in which case
# the compact_output_cols setting is then ignored.
# This configuration option has an automatic default value.
# compact_output_cols = ""
# Configuration option report/aligned.
# Align columns in report output.
# This configuration option has an automatic default value.
# aligned = 1
# Configuration option report/buffered.
# Buffer report output.
# When buffered reporting is used, the report's content is appended
# incrementally to include each object being reported until the report
# is flushed to output which normally happens at the end of command
# execution. Otherwise, if buffering is not used, each object is
# reported as soon as its processing is finished.
# This configuration option has an automatic default value.
# buffered = 1
# Configuration option report/headings.
# Show headings for columns on report.
# This configuration option has an automatic default value.
# headings = 1
# Configuration option report/separator.
# A separator to use on report after each field.
# This configuration option has an automatic default value.
# separator = " "
# Configuration option report/list_item_separator.
# A separator to use for list items when reported.
# This configuration option has an automatic default value.
# list_item_separator = ","
# Configuration option report/prefixes.
# Use a field name prefix for each field reported.
# This configuration option has an automatic default value.
# prefixes = 0
# Configuration option report/quoted.
# Quote field values when using field name prefixes.
# This configuration option has an automatic default value.
# quoted = 1
# Configuration option report/columns_as_rows.
# Output each column as a row.
# If set, this also implies report/prefixes=1.
# This configuration option has an automatic default value.
# columns_as_rows = 0
# Configuration option report/binary_values_as_numeric.
# Use binary values 0 or 1 instead of descriptive literal values.
# For columns that have exactly two valid values to report
# (not counting the 'unknown' value which denotes that the
# value could not be determined).
# This configuration option has an automatic default value.
# binary_values_as_numeric = 0
# Configuration option report/time_format.
# Set time format for fields reporting time values.
# Format specification is a string which may contain special character
# sequences and ordinary character sequences. Ordinary character
# sequences are copied verbatim. Each special character sequence is
# introduced by the '%' character and such sequence is then
# substituted with a value as described below.
#
# Accepted values:
# %a
# The abbreviated name of the day of the week according to the
# current locale.
# %A
# The full name of the day of the week according to the current
# locale.
# %b
# The abbreviated month name according to the current locale.
# %B
# The full month name according to the current locale.
# %c
# The preferred date and time representation for the current
# locale (alt E)
# %C
# The century number (year/100) as a 2-digit integer. (alt E)
# %d
# The day of the month as a decimal number (range 01 to 31).
# (alt O)
# %D
# Equivalent to %m/%d/%y. (For Americans only. Americans should
# note that in other countries%d/%m/%y is rather common. This
# means that in international context this format is ambiguous and
# should not be used.
# %e
# Like %d, the day of the month as a decimal number, but a leading
# zero is replaced by a space. (alt O)
# %E
# Modifier: use alternative local-dependent representation if
# available.
# %F
# Equivalent to %Y-%m-%d (the ISO 8601 date format).
# %G
# The ISO 8601 week-based year with century as adecimal number.
# The 4-digit year corresponding to the ISO week number (see %V).
# This has the same format and value as %Y, except that if the
# ISO week number belongs to the previous or next year, that year
# is used instead.
# %g
# Like %G, but without century, that is, with a 2-digit year
# (00-99).
# %h
# Equivalent to %b.
# %H
# The hour as a decimal number using a 24-hour clock
# (range 00 to 23). (alt O)
# %I
# The hour as a decimal number using a 12-hour clock
# (range 01 to 12). (alt O)
# %j
# The day of the year as a decimal number (range 001 to 366).
# %k
# The hour (24-hour clock) as a decimal number (range 0 to 23);
# single digits are preceded by a blank. (See also %H.)
# %l
# The hour (12-hour clock) as a decimal number (range 1 to 12);
# single digits are preceded by a blank. (See also %I.)
# %m
# The month as a decimal number (range 01 to 12). (alt O)
# %M
# The minute as a decimal number (range 00 to 59). (alt O)
# %O
# Modifier: use alternative numeric symbols.
# %p
# Either "AM" or "PM" according to the given time value,
# or the corresponding strings for the current locale. Noon is
# treated as "PM" and midnight as "AM".
# %P
# Like %p but in lowercase: "am" or "pm" or a corresponding
# string for the current locale.
# %r
# The time in a.m. or p.m. notation. In the POSIX locale this is
# equivalent to %I:%M:%S %p.
# %R
# The time in 24-hour notation (%H:%M). For a version including
# the seconds, see %T below.
# %s
# The number of seconds since the Epoch,
# 1970-01-01 00:00:00 +0000 (UTC)
# %S
# The second as a decimal number (range 00 to 60). (The range is
# up to 60 to allow for occasional leap seconds.) (alt O)
# %t
# A tab character.
# %T
# The time in 24-hour notation (%H:%M:%S).
# %u
# The day of the week as a decimal, range 1 to 7, Monday being 1.
# See also %w. (alt O)
# %U
# The week number of the current year as a decimal number,
# range 00 to 53, starting with the first Sunday as the first
# day of week 01. See also %V and %W. (alt O)
# %V
# The ISO 8601 week number of the current year as a decimal number,
# range 01 to 53, where week 1 is the first week that has at least
# 4 days in the new year. See also %U and %W. (alt O)
# %w
# The day of the week as a decimal, range 0 to 6, Sunday being 0.
# See also %u. (alt O)
# %W
# The week number of the current year as a decimal number,
# range 00 to 53, starting with the first Monday as the first day
# of week 01. (alt O)
# %x
# The preferred date representation for the current locale without
# the time. (alt E)
# %X
# The preferred time representation for the current locale without
# the date. (alt E)
# %y
# The year as a decimal number without a century (range 00 to 99).
# (alt E, alt O)
# %Y
# The year as a decimal number including the century. (alt E)
# %z
# The +hhmm or -hhmm numeric timezone (that is, the hour and minute
# offset from UTC).
# %Z
# The timezone name or abbreviation.
# %%
# A literal '%' character.
#
# This configuration option has an automatic default value.
# time_format = "%Y-%m-%d %T %z"
# Configuration option report/devtypes_sort.
# List of columns to sort by when reporting 'lvm devtypes' command.
# See 'lvm devtypes -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# devtypes_sort = "devtype_name"
# Configuration option report/devtypes_cols.
# List of columns to report for 'lvm devtypes' command.
# See 'lvm devtypes -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# devtypes_cols = "devtype_name,devtype_max_partitions,devtype_description"
# Configuration option report/devtypes_cols_verbose.
# List of columns to report for 'lvm devtypes' command in verbose mode.
# See 'lvm devtypes -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# devtypes_cols_verbose = "devtype_name,devtype_max_partitions,devtype_description"
# Configuration option report/lvs_sort.
# List of columns to sort by when reporting 'lvs' command.
# See 'lvs -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# lvs_sort = "vg_name,lv_name"
# Configuration option report/lvs_cols.
# List of columns to report for 'lvs' command.
# See 'lvs -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# lvs_cols = "lv_name,vg_name,lv_attr,lv_size,pool_lv,origin,data_percent,metadata_percent,move_pv,mirror_log,copy_percent,convert_lv"
# Configuration option report/lvs_cols_verbose.
# List of columns to report for 'lvs' command in verbose mode.
# See 'lvs -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# lvs_cols_verbose = "lv_name,vg_name,seg_count,lv_attr,lv_size,lv_major,lv_minor,lv_kernel_major,lv_kernel_minor,pool_lv,origin,data_percent,metadata_percent,move_pv,copy_percent,mirror_log,convert_lv,lv_uuid,lv_profile"
# Configuration option report/vgs_sort.
# List of columns to sort by when reporting 'vgs' command.
# See 'vgs -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# vgs_sort = "vg_name"
# Configuration option report/vgs_cols.
# List of columns to report for 'vgs' command.
# See 'vgs -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# vgs_cols = "vg_name,pv_count,lv_count,snap_count,vg_attr,vg_size,vg_free"
# Configuration option report/vgs_cols_verbose.
# List of columns to report for 'vgs' command in verbose mode.
# See 'vgs -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# vgs_cols_verbose = "vg_name,vg_attr,vg_extent_size,pv_count,lv_count,snap_count,vg_size,vg_free,vg_uuid,vg_profile"
# Configuration option report/pvs_sort.
# List of columns to sort by when reporting 'pvs' command.
# See 'pvs -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# pvs_sort = "pv_name"
# Configuration option report/pvs_cols.
# List of columns to report for 'pvs' command.
# See 'pvs -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# pvs_cols = "pv_name,vg_name,pv_fmt,pv_attr,pv_size,pv_free"
# Configuration option report/pvs_cols_verbose.
# List of columns to report for 'pvs' command in verbose mode.
# See 'pvs -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# pvs_cols_verbose = "pv_name,vg_name,pv_fmt,pv_attr,pv_size,pv_free,dev_size,pv_uuid"
# Configuration option report/segs_sort.
# List of columns to sort by when reporting 'lvs --segments' command.
# See 'lvs --segments -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# segs_sort = "vg_name,lv_name,seg_start"
# Configuration option report/segs_cols.
# List of columns to report for 'lvs --segments' command.
# See 'lvs --segments -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# segs_cols = "lv_name,vg_name,lv_attr,stripes,segtype,seg_size"
# Configuration option report/segs_cols_verbose.
# List of columns to report for 'lvs --segments' command in verbose mode.
# See 'lvs --segments -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# segs_cols_verbose = "lv_name,vg_name,lv_attr,seg_start,seg_size,stripes,segtype,stripesize,chunksize"
# Configuration option report/pvsegs_sort.
# List of columns to sort by when reporting 'pvs --segments' command.
# See 'pvs --segments -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# pvsegs_sort = "pv_name,pvseg_start"
# Configuration option report/pvsegs_cols.
# List of columns to sort by when reporting 'pvs --segments' command.
# See 'pvs --segments -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# pvsegs_cols = "pv_name,vg_name,pv_fmt,pv_attr,pv_size,pv_free,pvseg_start,pvseg_size"
# Configuration option report/pvsegs_cols_verbose.
# List of columns to sort by when reporting 'pvs --segments' command in verbose mode.
# See 'pvs --segments -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# pvsegs_cols_verbose = "pv_name,vg_name,pv_fmt,pv_attr,pv_size,pv_free,pvseg_start,pvseg_size,lv_name,seg_start_pe,segtype,seg_pe_ranges"
# Configuration option report/vgs_cols_full.
# List of columns to report for lvm fullreport's 'vgs' subreport.
# See 'vgs -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# vgs_cols_full = "vg_all"
# Configuration option report/pvs_cols_full.
# List of columns to report for lvm fullreport's 'vgs' subreport.
# See 'pvs -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# pvs_cols_full = "pv_all"
# Configuration option report/lvs_cols_full.
# List of columns to report for lvm fullreport's 'lvs' subreport.
# See 'lvs -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# lvs_cols_full = "lv_all"
# Configuration option report/pvsegs_cols_full.
# List of columns to report for lvm fullreport's 'pvseg' subreport.
# See 'pvs --segments -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# pvsegs_cols_full = "pvseg_all,pv_uuid,lv_uuid"
# Configuration option report/segs_cols_full.
# List of columns to report for lvm fullreport's 'seg' subreport.
# See 'lvs --segments -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# segs_cols_full = "seg_all,lv_uuid"
# Configuration option report/vgs_sort_full.
# List of columns to sort by when reporting lvm fullreport's 'vgs' subreport.
# See 'vgs -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# vgs_sort_full = "vg_name"
# Configuration option report/pvs_sort_full.
# List of columns to sort by when reporting lvm fullreport's 'vgs' subreport.
# See 'pvs -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# pvs_sort_full = "pv_name"
# Configuration option report/lvs_sort_full.
# List of columns to sort by when reporting lvm fullreport's 'lvs' subreport.
# See 'lvs -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# lvs_sort_full = "vg_name,lv_name"
# Configuration option report/pvsegs_sort_full.
# List of columns to sort by when reporting for lvm fullreport's 'pvseg' subreport.
# See 'pvs --segments -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# pvsegs_sort_full = "pv_uuid,pvseg_start"
# Configuration option report/segs_sort_full.
# List of columns to sort by when reporting lvm fullreport's 'seg' subreport.
# See 'lvs --segments -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# segs_sort_full = "lv_uuid,seg_start"
# Configuration option report/mark_hidden_devices.
# Use brackets [] to mark hidden devices.
# This configuration option has an automatic default value.
# mark_hidden_devices = 1
# Configuration option report/two_word_unknown_device.
# Use the two words 'unknown device' in place of '[unknown]'.
# This is displayed when the device for a PV is not known.
# This configuration option has an automatic default value.
# two_word_unknown_device = 0
# }
# Configuration section dmeventd.
# Settings for the LVM event daemon.
dmeventd {
# Configuration option dmeventd/mirror_library.
# The library dmeventd uses when monitoring a mirror device.
# libdevmapper-event-lvm2mirror.so attempts to recover from
# failures. It removes failed devices from a volume group and
# reconfigures a mirror as necessary. If no mirror library is
# provided, mirrors are not monitored through dmeventd.
mirror_library = "libdevmapper-event-lvm2mirror.so"
# Configuration option dmeventd/raid_library.
# This configuration option has an automatic default value.
# raid_library = "libdevmapper-event-lvm2raid.so"
# Configuration option dmeventd/snapshot_library.
# The library dmeventd uses when monitoring a snapshot device.
# libdevmapper-event-lvm2snapshot.so monitors the filling of snapshots
# and emits a warning through syslog when the usage exceeds 80%. The
# warning is repeated when 85%, 90% and 95% of the snapshot is filled.
snapshot_library = "libdevmapper-event-lvm2snapshot.so"
# Configuration option dmeventd/thin_library.
# The library dmeventd uses when monitoring a thin device.
# libdevmapper-event-lvm2thin.so monitors the filling of a pool
# and emits a warning through syslog when the usage exceeds 80%. The
# warning is repeated when 85%, 90% and 95% of the pool is filled.
thin_library = "libdevmapper-event-lvm2thin.so"
# Configuration option dmeventd/thin_command.
# The plugin runs command with each 5% increment when thin-pool data volume
# or metadata volume gets above 50%.
# Command which starts with 'lvm ' prefix is internal lvm command.
# You can write your own handler to customise behaviour in more details.
# User handler is specified with the full path starting with '/'.
# This configuration option has an automatic default value.
# thin_command = "lvm lvextend --use-policies"
# Configuration option dmeventd/executable.
# The full path to the dmeventd binary.
# This configuration option has an automatic default value.
# executable = "/usr/sbin/dmeventd"
}
# Configuration section tags.
# Host tag settings.
# This configuration section has an automatic default value.
# tags {
# Configuration option tags/hosttags.
# Create a host tag using the machine name.
# The machine name is nodename returned by uname(2).
# This configuration option has an automatic default value.
# hosttags = 0
# Configuration section tags/.
# Replace this subsection name with a custom tag name.
# Multiple subsections like this can be created. The '@' prefix for
# tags is optional. This subsection can contain host_list, which is a
# list of machine names. If the name of the local machine is found in
# host_list, then the name of this subsection is used as a tag and is
# applied to the local machine as a 'host tag'. If this subsection is
# empty (has no host_list), then the subsection name is always applied
# as a 'host tag'.
#
# Example
# The host tag foo is given to all hosts, and the host tag
# bar is given to the hosts named machine1 and machine2.
# tags { foo { } bar { host_list = [ "machine1", "machine2" ] } }
#
# This configuration section has variable name.
# This configuration section has an automatic default value.
# tag {
# Configuration option tags//host_list.
# A list of machine names.
# These machine names are compared to the nodename returned
# by uname(2). If the local machine name matches an entry in
# this list, the name of the subsection is applied to the
# machine as a 'host tag'.
# This configuration option does not have a default value defined.
# }
# }
kiwi-boxed-plugin-0.2.31/boxes/ubuntu/root/etc/network/ 0000775 0000000 0000000 00000000000 14516463774 0023045 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/ubuntu/root/etc/network/interfaces.d/ 0000775 0000000 0000000 00000000000 14516463774 0025412 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/ubuntu/root/etc/network/interfaces.d/lan0 0000664 0000000 0000000 00000000062 14516463774 0026165 0 ustar 00root root 0000000 0000000 auto lan0
allow-hotplug lan0
iface lan0 inet dhcp
kiwi-boxed-plugin-0.2.31/boxes/ubuntu/root/etc/systemd/ 0000775 0000000 0000000 00000000000 14516463774 0023044 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/ubuntu/root/etc/systemd/system/ 0000775 0000000 0000000 00000000000 14516463774 0024370 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/ubuntu/root/etc/systemd/system/serial-getty@hvc0.service.d/ 0000775 0000000 0000000 00000000000 14516463774 0031543 5 ustar 00root root 0000000 0000000 override.conf 0000664 0000000 0000000 00000000161 14516463774 0034150 0 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/ubuntu/root/etc/systemd/system/serial-getty@hvc0.service.d [Service]
ExecStart=
ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud 115200,38400,9600 hvc0 $TERM
kiwi-boxed-plugin-0.2.31/boxes/ubuntu/root/etc/systemd/system/serial-getty@ttyS0.service.d/ 0000775 0000000 0000000 00000000000 14516463774 0031726 5 ustar 00root root 0000000 0000000 override.conf 0000664 0000000 0000000 00000000162 14516463774 0034334 0 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/ubuntu/root/etc/systemd/system/serial-getty@ttyS0.service.d [Service]
ExecStart=
ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud 115200,38400,9600 ttyS0 $TERM
kiwi-boxed-plugin-0.2.31/boxes/ubuntu/root/etc/systemd/system/symlink-resolvconf.service 0000664 0000000 0000000 00000000472 14516463774 0031621 0 ustar 00root root 0000000 0000000 [Unit]
Description=Make the resolv.conf symlink during first boot
ConditionPathExists=!/etc/resolv.conf
ConditionPathExists=/etc/firstboot
[Service]
Type=oneshot
ExecStart=/bin/ln -s /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
ExecStartPost=/bin/rm /etc/firstboot
[Install]
WantedBy=multi-user.target
kiwi-boxed-plugin-0.2.31/boxes/ubuntu/root/etc/udev/ 0000775 0000000 0000000 00000000000 14516463774 0022317 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/ubuntu/root/etc/udev/rules.d/ 0000775 0000000 0000000 00000000000 14516463774 0023673 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/ubuntu/root/etc/udev/rules.d/70-persistent-net.rules 0000664 0000000 0000000 00000000205 14516463774 0030154 0 ustar 00root root 0000000 0000000 SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="?*", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="?*", NAME="lan0"
kiwi-boxed-plugin-0.2.31/boxes/ubuntu/root/usr/ 0000775 0000000 0000000 00000000000 14516463774 0021412 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/ubuntu/root/usr/lib/ 0000775 0000000 0000000 00000000000 14516463774 0022160 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/ubuntu/root/usr/lib/systemd/ 0000775 0000000 0000000 00000000000 14516463774 0023650 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/ubuntu/root/usr/lib/systemd/system/ 0000775 0000000 0000000 00000000000 14516463774 0025174 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/ubuntu/root/usr/lib/systemd/system/kiwi.service 0000664 0000000 0000000 00000000263 14516463774 0027522 0 ustar 00root root 0000000 0000000 [Unit]
Description=Start kiwi build process
After=network.target
Requires=network-online.target
[Service]
ExecStart=/usr/local/bin/run_kiwi
[Install]
WantedBy=multi-user.target
kiwi-boxed-plugin-0.2.31/boxes/ubuntu/root/usr/local/ 0000775 0000000 0000000 00000000000 14516463774 0022504 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/ubuntu/root/usr/local/bin/ 0000775 0000000 0000000 00000000000 14516463774 0023254 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/ubuntu/root/usr/local/bin/gfxboot 0000775 0000000 0000000 00000000024 14516463774 0024646 0 ustar 00root root 0000000 0000000 #!/bin/bash
exit 0
kiwi-boxed-plugin-0.2.31/boxes/universal/ 0000775 0000000 0000000 00000000000 14516463774 0020304 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/universal/appliance.kiwi 0000664 0000000 0000000 00000007322 14516463774 0023131 0 ustar 00root root 0000000 0000000
Marcus Schäferms@suse.comUniversal VM for kiwi boxed build (Fedora based)1.37.1dnfen_USusUTCtruefalsefalse50
kiwi-boxed-plugin-0.2.31/boxes/universal/config.sh 0000664 0000000 0000000 00000001473 14516463774 0022112 0 ustar 00root root 0000000 0000000 #!/bin/bash
set -ex
test -f /.kconfig && . /.kconfig
test -f /.profile && . /.profile
#======================================
# Setup default target, multi-user
#--------------------------------------
baseSetRunlevel 3
#==================================
# Disable services
#----------------------------------
systemctl mask systemd-logind.service
systemctl mask systemd-update-utmp.service
systemctl mask auditd.service
systemctl mask systemd-update-utmp-runlevel.service
systemctl mask systemd-user-sessions.service
#======================================
# Activate kiwi service
#--------------------------------------
baseInsertService sshd
baseInsertService kiwi
#======================================
# Fedora uses systemd-resolved for DNS
#--------------------------------------
systemctl enable systemd-resolved
kiwi-boxed-plugin-0.2.31/boxes/universal/root/ 0000775 0000000 0000000 00000000000 14516463774 0021267 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/universal/root/etc/ 0000775 0000000 0000000 00000000000 14516463774 0022042 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/universal/root/etc/fstab.script 0000775 0000000 0000000 00000000077 14516463774 0024376 0 ustar 00root root 0000000 0000000 #!/bin/bash
echo "/dev/vda1 / ext2 defaults 0 0" > /etc/fstab
kiwi-boxed-plugin-0.2.31/boxes/universal/root/etc/kiwi.yml 0000664 0000000 0000000 00000000037 14516463774 0023530 0 ustar 00root root 0000000 0000000 oci:
- archive_tool: buildah
kiwi-boxed-plugin-0.2.31/boxes/universal/root/etc/lvm/ 0000775 0000000 0000000 00000000000 14516463774 0022640 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/universal/root/etc/lvm/lvm.conf 0000664 0000000 0000000 00000270545 14516463774 0024322 0 ustar 00root root 0000000 0000000 # This is an example configuration file for the LVM2 system.
# It contains the default settings that would be used if there was no
# /etc/lvm/lvm.conf file.
#
# Refer to 'man lvm.conf' for further information including the file layout.
#
# Refer to 'man lvm.conf' for information about how settings configured in
# this file are combined with built-in values and command line options to
# arrive at the final values used by LVM.
#
# Refer to 'man lvmconfig' for information about displaying the built-in
# and configured values used by LVM.
#
# If a default value is set in this file (not commented out), then a
# new version of LVM using this file will continue using that value,
# even if the new version of LVM changes the built-in default value.
#
# To put this file in a different directory and override /etc/lvm set
# the environment variable LVM_SYSTEM_DIR before running the tools.
#
# N.B. Take care that each setting only appears once if uncommenting
# example settings in this file.
#hello
# Configuration section config.
# How LVM configuration settings are handled.
config {
# Configuration option config/checks.
# If enabled, any LVM configuration mismatch is reported.
# This implies checking that the configuration key is understood by
# LVM and that the value of the key is the proper type. If disabled,
# any configuration mismatch is ignored and the default value is used
# without any warning (a message about the configuration key not being
# found is issued in verbose mode only).
checks = 1
# Configuration option config/abort_on_errors.
# Abort the LVM process if a configuration mismatch is found.
abort_on_errors = 0
# Configuration option config/profile_dir.
# Directory where LVM looks for configuration profiles.
profile_dir = "/etc/lvm/profile"
}
# Configuration section devices.
# How LVM uses block devices.
devices {
# Configuration option devices/dir.
# Directory in which to create volume group device nodes.
# Commands also accept this as a prefix on volume group names.
# This configuration option is advanced.
dir = "/dev"
# Configuration option devices/scan.
# Directories containing device nodes to use with LVM.
# This configuration option is advanced.
scan = [ "/dev" ]
# Configuration option devices/obtain_device_list_from_udev.
# Obtain the list of available devices from udev.
# This avoids opening or using any inapplicable non-block devices or
# subdirectories found in the udev directory. Any device node or
# symlink not managed by udev in the udev directory is ignored. This
# setting applies only to the udev-managed device directory; other
# directories will be scanned fully. LVM needs to be compiled with
# udev support for this setting to apply.
obtain_device_list_from_udev = 1
# Configuration option devices/external_device_info_source.
# Select an external device information source.
# Some information may already be available in the system and LVM can
# use this information to determine the exact type or use of devices it
# processes. Using an existing external device information source can
# speed up device processing as LVM does not need to run its own native
# routines to acquire this information. For example, this information
# is used to drive LVM filtering like MD component detection, multipath
# component detection, partition detection and others.
#
# Accepted values:
# none
# No external device information source is used.
# udev
# Reuse existing udev database records. Applicable only if LVM is
# compiled with udev support.
#
external_device_info_source = "none"
# Configuration option devices/preferred_names.
# Select which path name to display for a block device.
# If multiple path names exist for a block device, and LVM needs to
# display a name for the device, the path names are matched against
# each item in this list of regular expressions. The first match is
# used. Try to avoid using undescriptive /dev/dm-N names, if present.
# If no preferred name matches, or if preferred_names are not defined,
# the following built-in preferences are applied in order until one
# produces a preferred name:
# Prefer names with path prefixes in the order of:
# /dev/mapper, /dev/disk, /dev/dm-*, /dev/block.
# Prefer the name with the least number of slashes.
# Prefer a name that is a symlink.
# Prefer the path with least value in lexicographical order.
#
# Example
# preferred_names = [ "^/dev/mpath/", "^/dev/mapper/mpath", "^/dev/[hs]d" ]
#
preferred_names = [ "^/dev/mpath/", "^/dev/mapper/mpath", "^/dev/[hs]d" ]
# Configuration option devices/filter.
# Limit the block devices that are used by LVM commands.
# This is a list of regular expressions used to accept or reject block
# device path names. Each regex is delimited by a vertical bar '|'
# (or any character) and is preceded by 'a' to accept the path, or
# by 'r' to reject the path. The first regex in the list to match the
# path is used, producing the 'a' or 'r' result for the device.
# When multiple path names exist for a block device, if any path name
# matches an 'a' pattern before an 'r' pattern, then the device is
# accepted. If all the path names match an 'r' pattern first, then the
# device is rejected. Unmatching path names do not affect the accept
# or reject decision. If no path names for a device match a pattern,
# then the device is accepted. Be careful mixing 'a' and 'r' patterns,
# as the combination might produce unexpected results (test changes.)
# Run vgscan after changing the filter to regenerate the cache.
# See the use_lvmetad comment for a special case regarding filters.
#
# Example
# Accept every block device:
# filter = [ "a|.*/|" ]
# Reject the cdrom drive:
# filter = [ "r|/dev/cdrom|" ]
# Work with just loopback devices, e.g. for testing:
# filter = [ "a|loop|", "r|.*|" ]
# Accept all loop devices and ide drives except hdc:
# filter = [ "a|loop|", "r|/dev/hdc|", "a|/dev/ide|", "r|.*|" ]
# Use anchors to be very specific:
# filter = [ "a|^/dev/hda8$|", "r|.*/|" ]
#
# This configuration option has an automatic default value.
# filter = [ "a|.*/|" ]
filter = [ "r|/dev/.*/by-path/.*|", "r|/dev/.*/by-id/.*|", "r|/dev/fd.*|", "r|/dev/cdrom|", "a/.*/" ]
# Configuration option devices/global_filter.
# Limit the block devices that are used by LVM system components.
# Because devices/filter may be overridden from the command line, it is
# not suitable for system-wide device filtering, e.g. udev and lvmetad.
# Use global_filter to hide devices from these LVM system components.
# The syntax is the same as devices/filter. Devices rejected by
# global_filter are not opened by LVM.
# This configuration option has an automatic default value.
# global_filter = [ "a|.*/|" ]
# Configuration option devices/cache_dir.
# Directory in which to store the device cache file.
# The results of filtering are cached on disk to avoid rescanning dud
# devices (which can take a very long time). By default this cache is
# stored in a file named .cache. It is safe to delete this file; the
# tools regenerate it. If obtain_device_list_from_udev is enabled, the
# list of devices is obtained from udev and any existing .cache file
# is removed.
cache_dir = "/etc/lvm/cache"
# Configuration option devices/cache_file_prefix.
# A prefix used before the .cache file name. See devices/cache_dir.
cache_file_prefix = ""
# Configuration option devices/write_cache_state.
# Enable/disable writing the cache file. See devices/cache_dir.
write_cache_state = 1
# Configuration option devices/types.
# List of additional acceptable block device types.
# These are of device type names from /proc/devices, followed by the
# maximum number of partitions.
#
# Example
# types = [ "fd", 16 ]
#
# This configuration option is advanced.
# This configuration option does not have a default value defined.
# Configuration option devices/sysfs_scan.
# Restrict device scanning to block devices appearing in sysfs.
# This is a quick way of filtering out block devices that are not
# present on the system. sysfs must be part of the kernel and mounted.)
sysfs_scan = 1
# Configuration option devices/multipath_component_detection.
# Ignore devices that are components of DM multipath devices.
multipath_component_detection = 1
# Configuration option devices/md_component_detection.
# Ignore devices that are components of software RAID (md) devices.
md_component_detection = 1
# Configuration option devices/fw_raid_component_detection.
# Ignore devices that are components of firmware RAID devices.
# LVM must use an external_device_info_source other than none for this
# detection to execute.
fw_raid_component_detection = 0
# Configuration option devices/md_chunk_alignment.
# Align PV data blocks with md device's stripe-width.
# This applies if a PV is placed directly on an md device.
md_chunk_alignment = 1
# Configuration option devices/default_data_alignment.
# Default alignment of the start of a PV data area in MB.
# If set to 0, a value of 64KiB will be used.
# Set to 1 for 1MiB, 2 for 2MiB, etc.
# This configuration option has an automatic default value.
# default_data_alignment = 1
# Configuration option devices/data_alignment_detection.
# Detect PV data alignment based on sysfs device information.
# The start of a PV data area will be a multiple of minimum_io_size or
# optimal_io_size exposed in sysfs. minimum_io_size is the smallest
# request the device can perform without incurring a read-modify-write
# penalty, e.g. MD chunk size. optimal_io_size is the device's
# preferred unit of receiving I/O, e.g. MD stripe width.
# minimum_io_size is used if optimal_io_size is undefined (0).
# If md_chunk_alignment is enabled, that detects the optimal_io_size.
# This setting takes precedence over md_chunk_alignment.
data_alignment_detection = 1
# Configuration option devices/data_alignment.
# Alignment of the start of a PV data area in KiB.
# If a PV is placed directly on an md device and md_chunk_alignment or
# data_alignment_detection are enabled, then this setting is ignored.
# Otherwise, md_chunk_alignment and data_alignment_detection are
# disabled if this is set. Set to 0 to use the default alignment or the
# page size, if larger.
data_alignment = 0
# Configuration option devices/data_alignment_offset_detection.
# Detect PV data alignment offset based on sysfs device information.
# The start of a PV aligned data area will be shifted by the
# alignment_offset exposed in sysfs. This offset is often 0, but may
# be non-zero. Certain 4KiB sector drives that compensate for windows
# partitioning will have an alignment_offset of 3584 bytes (sector 7
# is the lowest aligned logical block, the 4KiB sectors start at
# LBA -1, and consequently sector 63 is aligned on a 4KiB boundary).
# pvcreate --dataalignmentoffset will skip this detection.
data_alignment_offset_detection = 1
# Configuration option devices/ignore_suspended_devices.
# Ignore DM devices that have I/O suspended while scanning devices.
# Otherwise, LVM waits for a suspended device to become accessible.
# This should only be needed in recovery situations.
ignore_suspended_devices = 0
# Configuration option devices/ignore_lvm_mirrors.
# Do not scan 'mirror' LVs to avoid possible deadlocks.
# This avoids possible deadlocks when using the 'mirror' segment type.
# This setting determines whether LVs using the 'mirror' segment type
# are scanned for LVM labels. This affects the ability of mirrors to
# be used as physical volumes. If this setting is enabled, it is
# impossible to create VGs on top of mirror LVs, i.e. to stack VGs on
# mirror LVs. If this setting is disabled, allowing mirror LVs to be
# scanned, it may cause LVM processes and I/O to the mirror to become
# blocked. This is due to the way that the mirror segment type handles
# failures. In order for the hang to occur, an LVM command must be run
# just after a failure and before the automatic LVM repair process
# takes place, or there must be failures in multiple mirrors in the
# same VG at the same time with write failures occurring moments before
# a scan of the mirror's labels. The 'mirror' scanning problems do not
# apply to LVM RAID types like 'raid1' which handle failures in a
# different way, making them a better choice for VG stacking.
ignore_lvm_mirrors = 1
# Configuration option devices/disable_after_error_count.
# Number of I/O errors after which a device is skipped.
# During each LVM operation, errors received from each device are
# counted. If the counter of a device exceeds the limit set here,
# no further I/O is sent to that device for the remainder of the
# operation. Setting this to 0 disables the counters altogether.
disable_after_error_count = 0
# Configuration option devices/require_restorefile_with_uuid.
# Allow use of pvcreate --uuid without requiring --restorefile.
require_restorefile_with_uuid = 1
# Configuration option devices/pv_min_size.
# Minimum size in KiB of block devices which can be used as PVs.
# In a clustered environment all nodes must use the same value.
# Any value smaller than 512KiB is ignored. The previous built-in
# value was 512.
pv_min_size = 2048
# Configuration option devices/issue_discards.
# Issue discards to PVs that are no longer used by an LV.
# Discards are sent to an LV's underlying physical volumes when the LV
# is no longer using the physical volumes' space, e.g. lvremove,
# lvreduce. Discards inform the storage that a region is no longer
# used. Storage that supports discards advertise the protocol-specific
# way discards should be issued by the kernel (TRIM, UNMAP, or
# WRITE SAME with UNMAP bit set). Not all storage will support or
# benefit from discards, but SSDs and thinly provisioned LUNs
# generally do. If enabled, discards will only be issued if both the
# storage and kernel provide support.
issue_discards = 0
# Configuration option devices/allow_changes_with_duplicate_pvs.
# Allow VG modification while a PV appears on multiple devices.
# When a PV appears on multiple devices, LVM attempts to choose the
# best device to use for the PV. If the devices represent the same
# underlying storage, the choice has minimal consequence. If the
# devices represent different underlying storage, the wrong choice
# can result in data loss if the VG is modified. Disabling this
# setting is the safest option because it prevents modifying a VG
# or activating LVs in it while a PV appears on multiple devices.
# Enabling this setting allows the VG to be used as usual even with
# uncertain devices.
allow_changes_with_duplicate_pvs = 0
}
# Configuration section allocation.
# How LVM selects space and applies properties to LVs.
allocation {
# Configuration option allocation/cling_tag_list.
# Advise LVM which PVs to use when searching for new space.
# When searching for free space to extend an LV, the 'cling' allocation
# policy will choose space on the same PVs as the last segment of the
# existing LV. If there is insufficient space and a list of tags is
# defined here, it will check whether any of them are attached to the
# PVs concerned and then seek to match those PV tags between existing
# extents and new extents.
#
# Example
# Use the special tag "@*" as a wildcard to match any PV tag:
# cling_tag_list = [ "@*" ]
# LVs are mirrored between two sites within a single VG, and
# PVs are tagged with either @site1 or @site2 to indicate where
# they are situated:
# cling_tag_list = [ "@site1", "@site2" ]
#
# This configuration option does not have a default value defined.
# Configuration option allocation/maximise_cling.
# Use a previous allocation algorithm.
# Changes made in version 2.02.85 extended the reach of the 'cling'
# policies to detect more situations where data can be grouped onto
# the same disks. This setting can be used to disable the changes
# and revert to the previous algorithm.
maximise_cling = 1
# Configuration option allocation/use_blkid_wiping.
# Use blkid to detect existing signatures on new PVs and LVs.
# The blkid library can detect more signatures than the native LVM
# detection code, but may take longer. LVM needs to be compiled with
# blkid wiping support for this setting to apply. LVM native detection
# code is currently able to recognize: MD device signatures,
# swap signature, and LUKS signatures. To see the list of signatures
# recognized by blkid, check the output of the 'blkid -k' command.
use_blkid_wiping = 1
# Configuration option allocation/wipe_signatures_when_zeroing_new_lvs.
# Look for and erase any signatures while zeroing a new LV.
# The --wipesignatures option overrides this setting.
# Zeroing is controlled by the -Z/--zero option, and if not specified,
# zeroing is used by default if possible. Zeroing simply overwrites the
# first 4KiB of a new LV with zeroes and does no signature detection or
# wiping. Signature wiping goes beyond zeroing and detects exact types
# and positions of signatures within the whole LV. It provides a
# cleaner LV after creation as all known signatures are wiped. The LV
# is not claimed incorrectly by other tools because of old signatures
# from previous use. The number of signatures that LVM can detect
# depends on the detection code that is selected (see
# use_blkid_wiping.) Wiping each detected signature must be confirmed.
# When this setting is disabled, signatures on new LVs are not detected
# or erased unless the --wipesignatures option is used directly.
wipe_signatures_when_zeroing_new_lvs = 1
# Configuration option allocation/mirror_logs_require_separate_pvs.
# Mirror logs and images will always use different PVs.
# The default setting changed in version 2.02.85.
mirror_logs_require_separate_pvs = 0
# Configuration option allocation/raid_stripe_all_devices.
# Stripe across all PVs when RAID stripes are not specified.
# If enabled, all PVs in the VG or on the command line are used for
# raid0/4/5/6/10 when the command does not specify the number of
# stripes to use.
# This was the default behaviour until release 2.02.162.
# This configuration option has an automatic default value.
# raid_stripe_all_devices = 0
# Configuration option allocation/cache_pool_metadata_require_separate_pvs.
# Cache pool metadata and data will always use different PVs.
cache_pool_metadata_require_separate_pvs = 0
# Configuration option allocation/cache_metadata_format.
# Sets default metadata format for new cache.
#
# Accepted values:
# 0 Automatically detected best available format
# 1 Original format
# 2 Improved 2nd. generation format
#
# This configuration option has an automatic default value.
# cache_metadata_format = 0
# Configuration option allocation/cache_mode.
# The default cache mode used for new cache.
#
# Accepted values:
# writethrough
# Data blocks are immediately written from the cache to disk.
# writeback
# Data blocks are written from the cache back to disk after some
# delay to improve performance.
#
# This setting replaces allocation/cache_pool_cachemode.
# This configuration option has an automatic default value.
# cache_mode = "writethrough"
# Configuration option allocation/cache_policy.
# The default cache policy used for new cache volume.
# Since kernel 4.2 the default policy is smq (Stochastic multiqueue),
# otherwise the older mq (Multiqueue) policy is selected.
# This configuration option does not have a default value defined.
# Configuration section allocation/cache_settings.
# Settings for the cache policy.
# See documentation for individual cache policies for more info.
# This configuration section has an automatic default value.
# cache_settings {
# }
# Configuration option allocation/cache_pool_chunk_size.
# The minimal chunk size in KiB for cache pool volumes.
# Using a chunk_size that is too large can result in wasteful use of
# the cache, where small reads and writes can cause large sections of
# an LV to be mapped into the cache. However, choosing a chunk_size
# that is too small can result in more overhead trying to manage the
# numerous chunks that become mapped into the cache. The former is
# more of a problem than the latter in most cases, so the default is
# on the smaller end of the spectrum. Supported values range from
# 32KiB to 1GiB in multiples of 32.
# This configuration option does not have a default value defined.
# Configuration option allocation/cache_pool_max_chunks.
# The maximum number of chunks in a cache pool.
# For cache target v1.9 the recommended maximumm is 1000000 chunks.
# Using cache pool with more chunks may degrade cache performance.
# This configuration option does not have a default value defined.
# Configuration option allocation/thin_pool_metadata_require_separate_pvs.
# Thin pool metdata and data will always use different PVs.
thin_pool_metadata_require_separate_pvs = 0
# Configuration option allocation/thin_pool_zero.
# Thin pool data chunks are zeroed before they are first used.
# Zeroing with a larger thin pool chunk size reduces performance.
# This configuration option has an automatic default value.
# thin_pool_zero = 1
# Configuration option allocation/thin_pool_discards.
# The discards behaviour of thin pool volumes.
#
# Accepted values:
# ignore
# nopassdown
# passdown
#
# This configuration option has an automatic default value.
# thin_pool_discards = "passdown"
# Configuration option allocation/thin_pool_chunk_size_policy.
# The chunk size calculation policy for thin pool volumes.
#
# Accepted values:
# generic
# If thin_pool_chunk_size is defined, use it. Otherwise, calculate
# the chunk size based on estimation and device hints exposed in
# sysfs - the minimum_io_size. The chunk size is always at least
# 64KiB.
# performance
# If thin_pool_chunk_size is defined, use it. Otherwise, calculate
# the chunk size for performance based on device hints exposed in
# sysfs - the optimal_io_size. The chunk size is always at least
# 512KiB.
#
# This configuration option has an automatic default value.
# thin_pool_chunk_size_policy = "generic"
# Configuration option allocation/thin_pool_chunk_size.
# The minimal chunk size in KiB for thin pool volumes.
# Larger chunk sizes may improve performance for plain thin volumes,
# however using them for snapshot volumes is less efficient, as it
# consumes more space and takes extra time for copying. When unset,
# lvm tries to estimate chunk size starting from 64KiB. Supported
# values are in the range 64KiB to 1GiB.
# This configuration option does not have a default value defined.
# Configuration option allocation/physical_extent_size.
# Default physical extent size in KiB to use for new VGs.
# This configuration option has an automatic default value.
# physical_extent_size = 4096
}
# Configuration section log.
# How LVM log information is reported.
log {
# Configuration option log/report_command_log.
# Enable or disable LVM log reporting.
# If enabled, LVM will collect a log of operations, messages,
# per-object return codes with object identification and associated
# error numbers (errnos) during LVM command processing. Then the
# log is either reported solely or in addition to any existing
# reports, depending on LVM command used. If it is a reporting command
# (e.g. pvs, vgs, lvs, lvm fullreport), then the log is reported in
# addition to any existing reports. Otherwise, there's only log report
# on output. For all applicable LVM commands, you can request that
# the output has only log report by using --logonly command line
# option. Use log/command_log_cols and log/command_log_sort settings
# to define fields to display and sort fields for the log report.
# You can also use log/command_log_selection to define selection
# criteria used each time the log is reported.
# This configuration option has an automatic default value.
# report_command_log = 0
# Configuration option log/command_log_sort.
# List of columns to sort by when reporting command log.
# See --logonly --configreport log -o help
# for the list of possible fields.
# This configuration option has an automatic default value.
# command_log_sort = "log_seq_num"
# Configuration option log/command_log_cols.
# List of columns to report when reporting command log.
# See --logonly --configreport log -o help
# for the list of possible fields.
# This configuration option has an automatic default value.
# command_log_cols = "log_seq_num,log_type,log_context,log_object_type,log_object_name,log_object_id,log_object_group,log_object_group_id,log_message,log_errno,log_ret_code"
# Configuration option log/command_log_selection.
# Selection criteria used when reporting command log.
# You can define selection criteria that are applied each
# time log is reported. This way, it is possible to control the
# amount of log that is displayed on output and you can select
# only parts of the log that are important for you. To define
# selection criteria, use fields from log report. See also
# --logonly --configreport log -S help for the
# list of possible fields and selection operators. You can also
# define selection criteria for log report on command line directly
# using --configreport log -S
# which has precedence over log/command_log_selection setting.
# For more information about selection criteria in general, see
# lvm(8) man page.
# This configuration option has an automatic default value.
# command_log_selection = "!(log_type=status && message=success)"
# Configuration option log/verbose.
# Controls the messages sent to stdout or stderr.
verbose = 0
# Configuration option log/silent.
# Suppress all non-essential messages from stdout.
# This has the same effect as -qq. When enabled, the following commands
# still produce output: dumpconfig, lvdisplay, lvmdiskscan, lvs, pvck,
# pvdisplay, pvs, version, vgcfgrestore -l, vgdisplay, vgs.
# Non-essential messages are shifted from log level 4 to log level 5
# for syslog and lvm2_log_fn purposes.
# Any 'yes' or 'no' questions not overridden by other arguments are
# suppressed and default to 'no'.
silent = 0
# Configuration option log/syslog.
# Send log messages through syslog.
syslog = 1
# Configuration option log/file.
# Write error and debug log messages to a file specified here.
# This configuration option does not have a default value defined.
# file = "/var/log/lvm2.log"
# Configuration option log/overwrite.
# Overwrite the log file each time the program is run.
overwrite = 0
# Configuration option log/level.
# The level of log messages that are sent to the log file or syslog.
# There are 6 syslog-like log levels currently in use: 2 to 7 inclusive.
# 7 is the most verbose (LOG_DEBUG).
level = 0
# Configuration option log/indent.
# Indent messages according to their severity.
indent = 1
# Configuration option log/command_names.
# Display the command name on each line of output.
command_names = 0
# Configuration option log/prefix.
# A prefix to use before the log message text.
# (After the command name, if selected).
# Two spaces allows you to see/grep the severity of each message.
# To make the messages look similar to the original LVM tools use:
# indent = 0, command_names = 1, prefix = " -- "
prefix = " "
# Configuration option log/activation.
# Log messages during activation.
# Don't use this in low memory situations (can deadlock).
activation = 0
# Configuration option log/debug_classes.
# Select log messages by class.
# Some debugging messages are assigned to a class and only appear in
# debug output if the class is listed here. Classes currently
# available: memory, devices, activation, allocation, lvmetad,
# metadata, cache, locking, lvmpolld. Use "all" to see everything.
debug_classes = [ "memory", "devices", "activation", "allocation", "lvmetad", "metadata", "cache", "locking", "lvmpolld", "dbus" ]
}
# Configuration section backup.
# How LVM metadata is backed up and archived.
# In LVM, a 'backup' is a copy of the metadata for the current system,
# and an 'archive' contains old metadata configurations. They are
# stored in a human readable text format.
backup {
# Configuration option backup/backup.
# Maintain a backup of the current metadata configuration.
# Think very hard before turning this off!
backup = 1
# Configuration option backup/backup_dir.
# Location of the metadata backup files.
# Remember to back up this directory regularly!
backup_dir = "/etc/lvm/backup"
# Configuration option backup/archive.
# Maintain an archive of old metadata configurations.
# Think very hard before turning this off.
archive = 1
# Configuration option backup/archive_dir.
# Location of the metdata archive files.
# Remember to back up this directory regularly!
archive_dir = "/etc/lvm/archive"
# Configuration option backup/retain_min.
# Minimum number of archives to keep.
retain_min = 10
# Configuration option backup/retain_days.
# Minimum number of days to keep archive files.
retain_days = 30
}
# Configuration section shell.
# Settings for running LVM in shell (readline) mode.
shell {
# Configuration option shell/history_size.
# Number of lines of history to store in ~/.lvm_history.
history_size = 100
}
# Configuration section global.
# Miscellaneous global LVM settings.
global {
# Configuration option global/umask.
# The file creation mask for any files and directories created.
# Interpreted as octal if the first digit is zero.
umask = 077
# Configuration option global/test.
# No on-disk metadata changes will be made in test mode.
# Equivalent to having the -t option on every command.
test = 0
# Configuration option global/units.
# Default value for --units argument.
units = "h"
# Configuration option global/si_unit_consistency.
# Distinguish between powers of 1024 and 1000 bytes.
# The LVM commands distinguish between powers of 1024 bytes,
# e.g. KiB, MiB, GiB, and powers of 1000 bytes, e.g. KB, MB, GB.
# If scripts depend on the old behaviour, disable this setting
# temporarily until they are updated.
si_unit_consistency = 1
# Configuration option global/suffix.
# Display unit suffix for sizes.
# This setting has no effect if the units are in human-readable form
# (global/units = "h") in which case the suffix is always displayed.
suffix = 1
# Configuration option global/activation.
# Enable/disable communication with the kernel device-mapper.
# Disable to use the tools to manipulate LVM metadata without
# activating any logical volumes. If the device-mapper driver
# is not present in the kernel, disabling this should suppress
# the error messages.
activation = 1
# Configuration option global/fallback_to_lvm1.
# Try running LVM1 tools if LVM cannot communicate with DM.
# This option only applies to 2.4 kernels and is provided to help
# switch between device-mapper kernels and LVM1 kernels. The LVM1
# tools need to be installed with .lvm1 suffices, e.g. vgscan.lvm1.
# They will stop working once the lvm2 on-disk metadata format is used.
# This configuration option has an automatic default value.
# fallback_to_lvm1 = 1
# Configuration option global/format.
# The default metadata format that commands should use.
# The -M 1|2 option overrides this setting.
#
# Accepted values:
# lvm1
# lvm2
#
# This configuration option has an automatic default value.
# format = "lvm2"
# Configuration option global/format_libraries.
# Shared libraries that process different metadata formats.
# If support for LVM1 metadata was compiled as a shared library use
# format_libraries = "liblvm2format1.so"
# This configuration option does not have a default value defined.
# Configuration option global/segment_libraries.
# This configuration option does not have a default value defined.
# Configuration option global/proc.
# Location of proc filesystem.
# This configuration option is advanced.
proc = "/proc"
# Configuration option global/etc.
# Location of /etc system configuration directory.
etc = "/etc"
# Configuration option global/locking_type.
# Type of locking to use.
#
# Accepted values:
# 0
# Turns off locking. Warning: this risks metadata corruption if
# commands run concurrently.
# 1
# LVM uses local file-based locking, the standard mode.
# 2
# LVM uses the external shared library locking_library.
# 3
# LVM uses built-in clustered locking with clvmd.
# This is incompatible with lvmetad. If use_lvmetad is enabled,
# LVM prints a warning and disables lvmetad use.
# 4
# LVM uses read-only locking which forbids any operations that
# might change metadata.
# 5
# Offers dummy locking for tools that do not need any locks.
# You should not need to set this directly; the tools will select
# when to use it instead of the configured locking_type.
# Do not use lvmetad or the kernel device-mapper driver with this
# locking type. It is used by the --readonly option that offers
# read-only access to Volume Group metadata that cannot be locked
# safely because it belongs to an inaccessible domain and might be
# in use, for example a virtual machine image or a disk that is
# shared by a clustered machine.
#
locking_type = 1
# Configuration option global/wait_for_locks.
# When disabled, fail if a lock request would block.
wait_for_locks = 1
# Configuration option global/fallback_to_clustered_locking.
# Attempt to use built-in cluster locking if locking_type 2 fails.
# If using external locking (type 2) and initialisation fails, with
# this enabled, an attempt will be made to use the built-in clustered
# locking. Disable this if using a customised locking_library.
fallback_to_clustered_locking = 1
# Configuration option global/fallback_to_local_locking.
# Use locking_type 1 (local) if locking_type 2 or 3 fail.
# If an attempt to initialise type 2 or type 3 locking failed, perhaps
# because cluster components such as clvmd are not running, with this
# enabled, an attempt will be made to use local file-based locking
# (type 1). If this succeeds, only commands against local VGs will
# proceed. VGs marked as clustered will be ignored.
fallback_to_local_locking = 1
# Configuration option global/locking_dir.
# Directory to use for LVM command file locks.
# Local non-LV directory that holds file-based locks while commands are
# in progress. A directory like /tmp that may get wiped on reboot is OK.
locking_dir = "/run/lock/lvm"
# Configuration option global/prioritise_write_locks.
# Allow quicker VG write access during high volume read access.
# When there are competing read-only and read-write access requests for
# a volume group's metadata, instead of always granting the read-only
# requests immediately, delay them to allow the read-write requests to
# be serviced. Without this setting, write access may be stalled by a
# high volume of read-only requests. This option only affects
# locking_type 1 viz. local file-based locking.
prioritise_write_locks = 1
# Configuration option global/library_dir.
# Search this directory first for shared libraries.
# This configuration option does not have a default value defined.
# Configuration option global/locking_library.
# The external locking library to use for locking_type 2.
# This configuration option has an automatic default value.
# locking_library = "liblvm2clusterlock.so"
# Configuration option global/abort_on_internal_errors.
# Abort a command that encounters an internal error.
# Treat any internal errors as fatal errors, aborting the process that
# encountered the internal error. Please only enable for debugging.
abort_on_internal_errors = 0
# Configuration option global/detect_internal_vg_cache_corruption.
# Internal verification of VG structures.
# Check if CRC matches when a parsed VG is used multiple times. This
# is useful to catch unexpected changes to cached VG structures.
# Please only enable for debugging.
detect_internal_vg_cache_corruption = 0
# Configuration option global/metadata_read_only.
# No operations that change on-disk metadata are permitted.
# Additionally, read-only commands that encounter metadata in need of
# repair will still be allowed to proceed exactly as if the repair had
# been performed (except for the unchanged vg_seqno). Inappropriate
# use could mess up your system, so seek advice first!
metadata_read_only = 0
# Configuration option global/mirror_segtype_default.
# The segment type used by the short mirroring option -m.
# The --type mirror|raid1 option overrides this setting.
#
# Accepted values:
# mirror
# The original RAID1 implementation from LVM/DM. It is
# characterized by a flexible log solution (core, disk, mirrored),
# and by the necessity to block I/O while handling a failure.
# There is an inherent race in the dmeventd failure handling logic
# with snapshots of devices using this type of RAID1 that in the
# worst case could cause a deadlock. (Also see
# devices/ignore_lvm_mirrors.)
# raid1
# This is a newer RAID1 implementation using the MD RAID1
# personality through device-mapper. It is characterized by a
# lack of log options. (A log is always allocated for every
# device and they are placed on the same device as the image,
# so no separate devices are required.) This mirror
# implementation does not require I/O to be blocked while
# handling a failure. This mirror implementation is not
# cluster-aware and cannot be used in a shared (active/active)
# fashion in a cluster.
#
mirror_segtype_default = "raid1"
# Configuration option global/raid10_segtype_default.
# The segment type used by the -i -m combination.
# The --type raid10|mirror option overrides this setting.
# The --stripes/-i and --mirrors/-m options can both be specified
# during the creation of a logical volume to use both striping and
# mirroring for the LV. There are two different implementations.
#
# Accepted values:
# raid10
# LVM uses MD's RAID10 personality through DM. This is the
# preferred option.
# mirror
# LVM layers the 'mirror' and 'stripe' segment types. The layering
# is done by creating a mirror LV on top of striped sub-LVs,
# effectively creating a RAID 0+1 array. The layering is suboptimal
# in terms of providing redundancy and performance.
#
raid10_segtype_default = "raid10"
# Configuration option global/sparse_segtype_default.
# The segment type used by the -V -L combination.
# The --type snapshot|thin option overrides this setting.
# The combination of -V and -L options creates a sparse LV. There are
# two different implementations.
#
# Accepted values:
# snapshot
# The original snapshot implementation from LVM/DM. It uses an old
# snapshot that mixes data and metadata within a single COW
# storage volume and performs poorly when the size of stored data
# passes hundreds of MB.
# thin
# A newer implementation that uses thin provisioning. It has a
# bigger minimal chunk size (64KiB) and uses a separate volume for
# metadata. It has better performance, especially when more data
# is used. It also supports full snapshots.
#
sparse_segtype_default = "thin"
# Configuration option global/lvdisplay_shows_full_device_path.
# Enable this to reinstate the previous lvdisplay name format.
# The default format for displaying LV names in lvdisplay was changed
# in version 2.02.89 to show the LV name and path separately.
# Previously this was always shown as /dev/vgname/lvname even when that
# was never a valid path in the /dev filesystem.
# This configuration option has an automatic default value.
# lvdisplay_shows_full_device_path = 0
# Configuration option global/use_lvmetad.
# Use lvmetad to cache metadata and reduce disk scanning.
# When enabled (and running), lvmetad provides LVM commands with VG
# metadata and PV state. LVM commands then avoid reading this
# information from disks which can be slow. When disabled (or not
# running), LVM commands fall back to scanning disks to obtain VG
# metadata. lvmetad is kept updated via udev rules which must be set
# up for LVM to work correctly. (The udev rules should be installed
# by default.) Without a proper udev setup, changes in the system's
# block device configuration will be unknown to LVM, and ignored
# until a manual 'pvscan --cache' is run. If lvmetad was running
# while use_lvmetad was disabled, it must be stopped, use_lvmetad
# enabled, and then started. When using lvmetad, LV activation is
# switched to an automatic, event-based mode. In this mode, LVs are
# activated based on incoming udev events that inform lvmetad when
# PVs appear on the system. When a VG is complete (all PVs present),
# it is auto-activated. The auto_activation_volume_list setting
# controls which LVs are auto-activated (all by default.)
# When lvmetad is updated (automatically by udev events, or directly
# by pvscan --cache), devices/filter is ignored and all devices are
# scanned by default. lvmetad always keeps unfiltered information
# which is provided to LVM commands. Each LVM command then filters
# based on devices/filter. This does not apply to other, non-regexp,
# filtering settings: component filters such as multipath and MD
# are checked during pvscan --cache. To filter a device and prevent
# scanning from the LVM system entirely, including lvmetad, use
# devices/global_filter.
use_lvmetad = 0
# Configuration option global/lvmetad_update_wait_time.
# Number of seconds a command will wait for lvmetad update to finish.
# After waiting for this period, a command will not use lvmetad, and
# will revert to disk scanning.
# This configuration option has an automatic default value.
# lvmetad_update_wait_time = 10
# Configuration option global/use_lvmlockd.
# Use lvmlockd for locking among hosts using LVM on shared storage.
# Applicable only if LVM is compiled with lockd support in which
# case there is also lvmlockd(8) man page available for more
# information.
use_lvmlockd = 0
# Configuration option global/lvmlockd_lock_retries.
# Retry lvmlockd lock requests this many times.
# Applicable only if LVM is compiled with lockd support
# This configuration option has an automatic default value.
# lvmlockd_lock_retries = 3
# Configuration option global/sanlock_lv_extend.
# Size in MiB to extend the internal LV holding sanlock locks.
# The internal LV holds locks for each LV in the VG, and after enough
# LVs have been created, the internal LV needs to be extended. lvcreate
# will automatically extend the internal LV when needed by the amount
# specified here. Setting this to 0 disables the automatic extension
# and can cause lvcreate to fail. Applicable only if LVM is compiled
# with lockd support
# This configuration option has an automatic default value.
# sanlock_lv_extend = 256
# Configuration option global/thin_check_executable.
# The full path to the thin_check command.
# LVM uses this command to check that a thin metadata device is in a
# usable state. When a thin pool is activated and after it is
# deactivated, this command is run. Activation will only proceed if
# the command has an exit status of 0. Set to "" to skip this check.
# (Not recommended.) Also see thin_check_options.
# (See package device-mapper-persistent-data or thin-provisioning-tools)
# This configuration option has an automatic default value.
# thin_check_executable = "/usr/sbin/thin_check"
# Configuration option global/thin_dump_executable.
# The full path to the thin_dump command.
# LVM uses this command to dump thin pool metadata.
# (See package device-mapper-persistent-data or thin-provisioning-tools)
# This configuration option has an automatic default value.
# thin_dump_executable = "/usr/sbin/thin_dump"
# Configuration option global/thin_repair_executable.
# The full path to the thin_repair command.
# LVM uses this command to repair a thin metadata device if it is in
# an unusable state. Also see thin_repair_options.
# (See package device-mapper-persistent-data or thin-provisioning-tools)
# This configuration option has an automatic default value.
# thin_repair_executable = "/usr/sbin/thin_repair"
# Configuration option global/thin_check_options.
# List of options passed to the thin_check command.
# With thin_check version 2.1 or newer you can add the option
# --ignore-non-fatal-errors to let it pass through ignorable errors
# and fix them later. With thin_check version 3.2 or newer you should
# include the option --clear-needs-check-flag.
# This configuration option has an automatic default value.
# thin_check_options = [ "-q", "--clear-needs-check-flag" ]
# Configuration option global/thin_repair_options.
# List of options passed to the thin_repair command.
# This configuration option has an automatic default value.
# thin_repair_options = [ "" ]
# Configuration option global/thin_disabled_features.
# Features to not use in the thin driver.
# This can be helpful for testing, or to avoid using a feature that is
# causing problems. Features include: block_size, discards,
# discards_non_power_2, external_origin, metadata_resize,
# external_origin_extend, error_if_no_space.
#
# Example
# thin_disabled_features = [ "discards", "block_size" ]
#
# This configuration option does not have a default value defined.
# Configuration option global/cache_disabled_features.
# Features to not use in the cache driver.
# This can be helpful for testing, or to avoid using a feature that is
# causing problems. Features include: policy_mq, policy_smq, metadata2.
#
# Example
# cache_disabled_features = [ "policy_smq" ]
#
# This configuration option does not have a default value defined.
# Configuration option global/cache_check_executable.
# The full path to the cache_check command.
# LVM uses this command to check that a cache metadata device is in a
# usable state. When a cached LV is activated and after it is
# deactivated, this command is run. Activation will only proceed if the
# command has an exit status of 0. Set to "" to skip this check.
# (Not recommended.) Also see cache_check_options.
# (See package device-mapper-persistent-data or thin-provisioning-tools)
# This configuration option has an automatic default value.
# cache_check_executable = "/usr/sbin/cache_check"
# Configuration option global/cache_dump_executable.
# The full path to the cache_dump command.
# LVM uses this command to dump cache pool metadata.
# (See package device-mapper-persistent-data or thin-provisioning-tools)
# This configuration option has an automatic default value.
# cache_dump_executable = "/usr/sbin/cache_dump"
# Configuration option global/cache_repair_executable.
# The full path to the cache_repair command.
# LVM uses this command to repair a cache metadata device if it is in
# an unusable state. Also see cache_repair_options.
# (See package device-mapper-persistent-data or thin-provisioning-tools)
# This configuration option has an automatic default value.
# cache_repair_executable = "/usr/sbin/cache_repair"
# Configuration option global/cache_check_options.
# List of options passed to the cache_check command.
# With cache_check version 5.0 or newer you should include the option
# --clear-needs-check-flag.
# This configuration option has an automatic default value.
# cache_check_options = [ "-q", "--clear-needs-check-flag" ]
# Configuration option global/cache_repair_options.
# List of options passed to the cache_repair command.
# This configuration option has an automatic default value.
# cache_repair_options = [ "" ]
# Configuration option global/fsadm_executable.
# The full path to the fsadm command.
# LVM uses this command to help with lvresize -r operations.
# This configuration option has an automatic default value.
# fsadm_executable = "/usr/sbin/fsadm"
# Configuration option global/system_id_source.
# The method LVM uses to set the local system ID.
# Volume Groups can also be given a system ID (by vgcreate, vgchange,
# or vgimport.) A VG on shared storage devices is accessible only to
# the host with a matching system ID. See 'man lvmsystemid' for
# information on limitations and correct usage.
#
# Accepted values:
# none
# The host has no system ID.
# lvmlocal
# Obtain the system ID from the system_id setting in the 'local'
# section of an lvm configuration file, e.g. lvmlocal.conf.
# uname
# Set the system ID from the hostname (uname) of the system.
# System IDs beginning localhost are not permitted.
# machineid
# Use the contents of the machine-id file to set the system ID.
# Some systems create this file at installation time.
# See 'man machine-id' and global/etc.
# file
# Use the contents of another file (system_id_file) to set the
# system ID.
#
system_id_source = "none"
# Configuration option global/system_id_file.
# The full path to the file containing a system ID.
# This is used when system_id_source is set to 'file'.
# Comments starting with the character # are ignored.
# This configuration option does not have a default value defined.
# Configuration option global/use_lvmpolld.
# Use lvmpolld to supervise long running LVM commands.
# When enabled, control of long running LVM commands is transferred
# from the original LVM command to the lvmpolld daemon. This allows
# the operation to continue independent of the original LVM command.
# After lvmpolld takes over, the LVM command displays the progress
# of the ongoing operation. lvmpolld itself runs LVM commands to
# manage the progress of ongoing operations. lvmpolld can be used as
# a native systemd service, which allows it to be started on demand,
# and to use its own control group. When this option is disabled, LVM
# commands will supervise long running operations by forking themselves.
# Applicable only if LVM is compiled with lvmpolld support.
use_lvmpolld = 1
# Configuration option global/notify_dbus.
# Enable D-Bus notification from LVM commands.
# When enabled, an LVM command that changes PVs, changes VG metadata,
# or changes the activation state of an LV will send a notification.
notify_dbus = 1
}
# Configuration section activation.
activation {
# Configuration option activation/checks.
# Perform internal checks of libdevmapper operations.
# Useful for debugging problems with activation. Some of the checks may
# be expensive, so it's best to use this only when there seems to be a
# problem.
checks = 0
# Configuration option activation/udev_sync.
# Use udev notifications to synchronize udev and LVM.
# The --nodevsync option overrides this setting.
# When disabled, LVM commands will not wait for notifications from
# udev, but continue irrespective of any possible udev processing in
# the background. Only use this if udev is not running or has rules
# that ignore the devices LVM creates. If enabled when udev is not
# running, and LVM processes are waiting for udev, run the command
# 'dmsetup udevcomplete_all' to wake them up.
udev_sync = 1
# Configuration option activation/udev_rules.
# Use udev rules to manage LV device nodes and symlinks.
# When disabled, LVM will manage the device nodes and symlinks for
# active LVs itself. Manual intervention may be required if this
# setting is changed while LVs are active.
udev_rules = 1
# Configuration option activation/verify_udev_operations.
# Use extra checks in LVM to verify udev operations.
# This enables additional checks (and if necessary, repairs) on entries
# in the device directory after udev has completed processing its
# events. Useful for diagnosing problems with LVM/udev interactions.
verify_udev_operations = 0
# Configuration option activation/retry_deactivation.
# Retry failed LV deactivation.
# If LV deactivation fails, LVM will retry for a few seconds before
# failing. This may happen because a process run from a quick udev rule
# temporarily opened the device.
retry_deactivation = 1
# Configuration option activation/missing_stripe_filler.
# Method to fill missing stripes when activating an incomplete LV.
# Using 'error' will make inaccessible parts of the device return I/O
# errors on access. Using 'zero' will return success (and zero) on I/O
# You can instead use a device path, in which case,
# that device will be used in place of missing stripes. Using anything
# other than 'error' with mirrored or snapshotted volumes is likely to
# result in data corruption.
# This configuration option is advanced.
missing_stripe_filler = "error"
# Configuration option activation/use_linear_target.
# Use the linear target to optimize single stripe LVs.
# When disabled, the striped target is used. The linear target is an
# optimised version of the striped target that only handles a single
# stripe.
use_linear_target = 1
# Configuration option activation/reserved_stack.
# Stack size in KiB to reserve for use while devices are suspended.
# Insufficent reserve risks I/O deadlock during device suspension.
reserved_stack = 64
# Configuration option activation/reserved_memory.
# Memory size in KiB to reserve for use while devices are suspended.
# Insufficent reserve risks I/O deadlock during device suspension.
reserved_memory = 8192
# Configuration option activation/process_priority.
# Nice value used while devices are suspended.
# Use a high priority so that LVs are suspended
# for the shortest possible time.
process_priority = -18
# Configuration option activation/volume_list.
# Only LVs selected by this list are activated.
# If this list is defined, an LV is only activated if it matches an
# entry in this list. If this list is undefined, it imposes no limits
# on LV activation (all are allowed).
#
# Accepted values:
# vgname
# The VG name is matched exactly and selects all LVs in the VG.
# vgname/lvname
# The VG name and LV name are matched exactly and selects the LV.
# @tag
# Selects an LV if the specified tag matches a tag set on the LV
# or VG.
# @*
# Selects an LV if a tag defined on the host is also set on the LV
# or VG. See tags/hosttags. If any host tags exist but volume_list
# is not defined, a default single-entry list containing '@*'
# is assumed.
#
# Example
# volume_list = [ "vg1", "vg2/lvol1", "@tag1", "@*" ]
#
# This configuration option does not have a default value defined.
# Configuration option activation/auto_activation_volume_list.
# Only LVs selected by this list are auto-activated.
# This list works like volume_list, but it is used only by
# auto-activation commands. It does not apply to direct activation
# commands. If this list is defined, an LV is only auto-activated
# if it matches an entry in this list. If this list is undefined, it
# imposes no limits on LV auto-activation (all are allowed.) If this
# list is defined and empty, i.e. "[]", then no LVs are selected for
# auto-activation. An LV that is selected by this list for
# auto-activation, must also be selected by volume_list (if defined)
# before it is activated. Auto-activation is an activation command that
# includes the 'a' argument: --activate ay or -a ay. The 'a' (auto)
# argument for auto-activation is meant to be used by activation
# commands that are run automatically by the system, as opposed to LVM
# commands run directly by a user. A user may also use the 'a' flag
# directly to perform auto-activation. Also see pvscan(8) for more
# information about auto-activation.
#
# Accepted values:
# vgname
# The VG name is matched exactly and selects all LVs in the VG.
# vgname/lvname
# The VG name and LV name are matched exactly and selects the LV.
# @tag
# Selects an LV if the specified tag matches a tag set on the LV
# or VG.
# @*
# Selects an LV if a tag defined on the host is also set on the LV
# or VG. See tags/hosttags. If any host tags exist but volume_list
# is not defined, a default single-entry list containing '@*'
# is assumed.
#
# Example
# auto_activation_volume_list = [ "vg1", "vg2/lvol1", "@tag1", "@*" ]
#
# This configuration option does not have a default value defined.
# Configuration option activation/read_only_volume_list.
# LVs in this list are activated in read-only mode.
# If this list is defined, each LV that is to be activated is checked
# against this list, and if it matches, it is activated in read-only
# mode. This overrides the permission setting stored in the metadata,
# e.g. from --permission rw.
#
# Accepted values:
# vgname
# The VG name is matched exactly and selects all LVs in the VG.
# vgname/lvname
# The VG name and LV name are matched exactly and selects the LV.
# @tag
# Selects an LV if the specified tag matches a tag set on the LV
# or VG.
# @*
# Selects an LV if a tag defined on the host is also set on the LV
# or VG. See tags/hosttags. If any host tags exist but volume_list
# is not defined, a default single-entry list containing '@*'
# is assumed.
#
# Example
# read_only_volume_list = [ "vg1", "vg2/lvol1", "@tag1", "@*" ]
#
# This configuration option does not have a default value defined.
# Configuration option activation/raid_region_size.
# Size in KiB of each raid or mirror synchronization region.
# The clean/dirty state of data is tracked for each region.
# The value is rounded down to a power of two if necessary, and
# is ignored if it is not a multiple of the machine memory page size.
raid_region_size = 2048
# Configuration option activation/error_when_full.
# Return errors if a thin pool runs out of space.
# The --errorwhenfull option overrides this setting.
# When enabled, writes to thin LVs immediately return an error if the
# thin pool is out of data space. When disabled, writes to thin LVs
# are queued if the thin pool is out of space, and processed when the
# thin pool data space is extended. New thin pools are assigned the
# behavior defined here.
# This configuration option has an automatic default value.
# error_when_full = 0
# Configuration option activation/readahead.
# Setting to use when there is no readahead setting in metadata.
#
# Accepted values:
# none
# Disable readahead.
# auto
# Use default value chosen by kernel.
#
readahead = "auto"
# Configuration option activation/raid_fault_policy.
# Defines how a device failure in a RAID LV is handled.
# This includes LVs that have the following segment types:
# raid1, raid4, raid5*, and raid6*.
# If a device in the LV fails, the policy determines the steps
# performed by dmeventd automatically, and the steps perfomed by the
# manual command lvconvert --repair --use-policies.
# Automatic handling requires dmeventd to be monitoring the LV.
#
# Accepted values:
# warn
# Use the system log to warn the user that a device in the RAID LV
# has failed. It is left to the user to run lvconvert --repair
# manually to remove or replace the failed device. As long as the
# number of failed devices does not exceed the redundancy of the LV
# (1 device for raid4/5, 2 for raid6), the LV will remain usable.
# allocate
# Attempt to use any extra physical volumes in the VG as spares and
# replace faulty devices.
#
raid_fault_policy = "warn"
# Configuration option activation/mirror_image_fault_policy.
# Defines how a device failure in a 'mirror' LV is handled.
# An LV with the 'mirror' segment type is composed of mirror images
# (copies) and a mirror log. A disk log ensures that a mirror LV does
# not need to be re-synced (all copies made the same) every time a
# machine reboots or crashes. If a device in the LV fails, this policy
# determines the steps perfomed by dmeventd automatically, and the steps
# performed by the manual command lvconvert --repair --use-policies.
# Automatic handling requires dmeventd to be monitoring the LV.
#
# Accepted values:
# remove
# Simply remove the faulty device and run without it. If the log
# device fails, the mirror would convert to using an in-memory log.
# This means the mirror will not remember its sync status across
# crashes/reboots and the entire mirror will be re-synced. If a
# mirror image fails, the mirror will convert to a non-mirrored
# device if there is only one remaining good copy.
# allocate
# Remove the faulty device and try to allocate space on a new
# device to be a replacement for the failed device. Using this
# policy for the log is fast and maintains the ability to remember
# sync state through crashes/reboots. Using this policy for a
# mirror device is slow, as it requires the mirror to resynchronize
# the devices, but it will preserve the mirror characteristic of
# the device. This policy acts like 'remove' if no suitable device
# and space can be allocated for the replacement.
# allocate_anywhere
# Not yet implemented. Useful to place the log device temporarily
# on the same physical volume as one of the mirror images. This
# policy is not recommended for mirror devices since it would break
# the redundant nature of the mirror. This policy acts like
# 'remove' if no suitable device and space can be allocated for the
# replacement.
#
mirror_image_fault_policy = "remove"
# Configuration option activation/mirror_log_fault_policy.
# Defines how a device failure in a 'mirror' log LV is handled.
# The mirror_image_fault_policy description for mirrored LVs also
# applies to mirrored log LVs.
mirror_log_fault_policy = "allocate"
# Configuration option activation/snapshot_autoextend_threshold.
# Auto-extend a snapshot when its usage exceeds this percent.
# Setting this to 100 disables automatic extension.
# The minimum value is 50 (a smaller value is treated as 50.)
# Also see snapshot_autoextend_percent.
# Automatic extension requires dmeventd to be monitoring the LV.
#
# Example
# Using 70% autoextend threshold and 20% autoextend size, when a 1G
# snapshot exceeds 700M, it is extended to 1.2G, and when it exceeds
# 840M, it is extended to 1.44G:
# snapshot_autoextend_threshold = 70
#
snapshot_autoextend_threshold = 100
# Configuration option activation/snapshot_autoextend_percent.
# Auto-extending a snapshot adds this percent extra space.
# The amount of additional space added to a snapshot is this
# percent of its current size.
#
# Example
# Using 70% autoextend threshold and 20% autoextend size, when a 1G
# snapshot exceeds 700M, it is extended to 1.2G, and when it exceeds
# 840M, it is extended to 1.44G:
# snapshot_autoextend_percent = 20
#
snapshot_autoextend_percent = 20
# Configuration option activation/thin_pool_autoextend_threshold.
# Auto-extend a thin pool when its usage exceeds this percent.
# Setting this to 100 disables automatic extension.
# The minimum value is 50 (a smaller value is treated as 50.)
# Also see thin_pool_autoextend_percent.
# Automatic extension requires dmeventd to be monitoring the LV.
#
# Example
# Using 70% autoextend threshold and 20% autoextend size, when a 1G
# thin pool exceeds 700M, it is extended to 1.2G, and when it exceeds
# 840M, it is extended to 1.44G:
# thin_pool_autoextend_threshold = 70
#
thin_pool_autoextend_threshold = 100
# Configuration option activation/thin_pool_autoextend_percent.
# Auto-extending a thin pool adds this percent extra space.
# The amount of additional space added to a thin pool is this
# percent of its current size.
#
# Example
# Using 70% autoextend threshold and 20% autoextend size, when a 1G
# thin pool exceeds 700M, it is extended to 1.2G, and when it exceeds
# 840M, it is extended to 1.44G:
# thin_pool_autoextend_percent = 20
#
thin_pool_autoextend_percent = 20
# Configuration option activation/mlock_filter.
# Do not mlock these memory areas.
# While activating devices, I/O to devices being (re)configured is
# suspended. As a precaution against deadlocks, LVM pins memory it is
# using so it is not paged out, and will not require I/O to reread.
# Groups of pages that are known not to be accessed during activation
# do not need to be pinned into memory. Each string listed in this
# setting is compared against each line in /proc/self/maps, and the
# pages corresponding to lines that match are not pinned. On some
# systems, locale-archive was found to make up over 80% of the memory
# used by the process.
#
# Example
# mlock_filter = [ "locale/locale-archive", "gconv/gconv-modules.cache" ]
#
# This configuration option is advanced.
# This configuration option does not have a default value defined.
# Configuration option activation/use_mlockall.
# Use the old behavior of mlockall to pin all memory.
# Prior to version 2.02.62, LVM used mlockall() to pin the whole
# process's memory while activating devices.
use_mlockall = 0
# Configuration option activation/monitoring.
# Monitor LVs that are activated.
# The --ignoremonitoring option overrides this setting.
# When enabled, LVM will ask dmeventd to monitor activated LVs.
monitoring = 1
# Configuration option activation/polling_interval.
# Check pvmove or lvconvert progress at this interval (seconds).
# When pvmove or lvconvert must wait for the kernel to finish
# synchronising or merging data, they check and report progress at
# intervals of this number of seconds. If this is set to 0 and there
# is only one thing to wait for, there are no progress reports, but
# the process is awoken immediately once the operation is complete.
polling_interval = 15
# Configuration option activation/auto_set_activation_skip.
# Set the activation skip flag on new thin snapshot LVs.
# The --setactivationskip option overrides this setting.
# An LV can have a persistent 'activation skip' flag. The flag causes
# the LV to be skipped during normal activation. The lvchange/vgchange
# -K option is required to activate LVs that have the activation skip
# flag set. When this setting is enabled, the activation skip flag is
# set on new thin snapshot LVs.
# This configuration option has an automatic default value.
# auto_set_activation_skip = 1
# Configuration option activation/activation_mode.
# How LVs with missing devices are activated.
# The --activationmode option overrides this setting.
#
# Accepted values:
# complete
# Only allow activation of an LV if all of the Physical Volumes it
# uses are present. Other PVs in the Volume Group may be missing.
# degraded
# Like complete, but additionally RAID LVs of segment type raid1,
# raid4, raid5, radid6 and raid10 will be activated if there is no
# data loss, i.e. they have sufficient redundancy to present the
# entire addressable range of the Logical Volume.
# partial
# Allows the activation of any LV even if a missing or failed PV
# could cause data loss with a portion of the LV inaccessible.
# This setting should not normally be used, but may sometimes
# assist with data recovery.
#
activation_mode = "degraded"
# Configuration option activation/lock_start_list.
# Locking is started only for VGs selected by this list.
# The rules are the same as those for volume_list.
# This configuration option does not have a default value defined.
# Configuration option activation/auto_lock_start_list.
# Locking is auto-started only for VGs selected by this list.
# The rules are the same as those for auto_activation_volume_list.
# This configuration option does not have a default value defined.
}
# Configuration section metadata.
# This configuration section has an automatic default value.
# metadata {
# Configuration option metadata/check_pv_device_sizes.
# Check device sizes are not smaller than corresponding PV sizes.
# If device size is less than corresponding PV size found in metadata,
# there is always a risk of data loss. If this option is set, then LVM
# issues a warning message each time it finds that the device size is
# less than corresponding PV size. You should not disable this unless
# you are absolutely sure about what you are doing!
# This configuration option is advanced.
# This configuration option has an automatic default value.
# check_pv_device_sizes = 1
# Configuration option metadata/record_lvs_history.
# When enabled, LVM keeps history records about removed LVs in
# metadata. The information that is recorded in metadata for
# historical LVs is reduced when compared to original
# information kept in metadata for live LVs. Currently, this
# feature is supported for thin and thin snapshot LVs only.
# This configuration option has an automatic default value.
# record_lvs_history = 0
# Configuration option metadata/lvs_history_retention_time.
# Retention time in seconds after which a record about individual
# historical logical volume is automatically destroyed.
# A value of 0 disables this feature.
# This configuration option has an automatic default value.
# lvs_history_retention_time = 0
# Configuration option metadata/pvmetadatacopies.
# Number of copies of metadata to store on each PV.
# The --pvmetadatacopies option overrides this setting.
#
# Accepted values:
# 2
# Two copies of the VG metadata are stored on the PV, one at the
# front of the PV, and one at the end.
# 1
# One copy of VG metadata is stored at the front of the PV.
# 0
# No copies of VG metadata are stored on the PV. This may be
# useful for VGs containing large numbers of PVs.
#
# This configuration option is advanced.
# This configuration option has an automatic default value.
# pvmetadatacopies = 1
# Configuration option metadata/vgmetadatacopies.
# Number of copies of metadata to maintain for each VG.
# The --vgmetadatacopies option overrides this setting.
# If set to a non-zero value, LVM automatically chooses which of the
# available metadata areas to use to achieve the requested number of
# copies of the VG metadata. If you set a value larger than the the
# total number of metadata areas available, then metadata is stored in
# them all. The value 0 (unmanaged) disables this automatic management
# and allows you to control which metadata areas are used at the
# individual PV level using pvchange --metadataignore y|n.
# This configuration option has an automatic default value.
# vgmetadatacopies = 0
# Configuration option metadata/pvmetadatasize.
# Approximate number of sectors to use for each metadata copy.
# VGs with large numbers of PVs or LVs, or VGs containing complex LV
# structures, may need additional space for VG metadata. The metadata
# areas are treated as circular buffers, so unused space becomes filled
# with an archive of the most recent previous versions of the metadata.
# This configuration option has an automatic default value.
# pvmetadatasize = 255
# Configuration option metadata/pvmetadataignore.
# Ignore metadata areas on a new PV.
# The --metadataignore option overrides this setting.
# If metadata areas on a PV are ignored, LVM will not store metadata
# in them.
# This configuration option is advanced.
# This configuration option has an automatic default value.
# pvmetadataignore = 0
# Configuration option metadata/stripesize.
# This configuration option is advanced.
# This configuration option has an automatic default value.
# stripesize = 64
# Configuration option metadata/dirs.
# Directories holding live copies of text format metadata.
# These directories must not be on logical volumes!
# It's possible to use LVM with a couple of directories here,
# preferably on different (non-LV) filesystems, and with no other
# on-disk metadata (pvmetadatacopies = 0). Or this can be in addition
# to on-disk metadata areas. The feature was originally added to
# simplify testing and is not supported under low memory situations -
# the machine could lock up. Never edit any files in these directories
# by hand unless you are absolutely sure you know what you are doing!
# Use the supplied toolset to make changes (e.g. vgcfgrestore).
#
# Example
# dirs = [ "/etc/lvm/metadata", "/mnt/disk2/lvm/metadata2" ]
#
# This configuration option is advanced.
# This configuration option does not have a default value defined.
# }
# Configuration section report.
# LVM report command output formatting.
# This configuration section has an automatic default value.
# report {
# Configuration option report/output_format.
# Format of LVM command's report output.
# If there is more than one report per command, then the format
# is applied for all reports. You can also change output format
# directly on command line using --reportformat option which
# has precedence over log/output_format setting.
# Accepted values:
# basic
# Original format with columns and rows. If there is more than
# one report per command, each report is prefixed with report's
# name for identification.
# json
# JSON format.
# This configuration option has an automatic default value.
# output_format = "basic"
# Configuration option report/compact_output.
# Do not print empty values for all report fields.
# If enabled, all fields that don't have a value set for any of the
# rows reported are skipped and not printed. Compact output is
# applicable only if report/buffered is enabled. If you need to
# compact only specified fields, use compact_output=0 and define
# report/compact_output_cols configuration setting instead.
# This configuration option has an automatic default value.
# compact_output = 0
# Configuration option report/compact_output_cols.
# Do not print empty values for specified report fields.
# If defined, specified fields that don't have a value set for any
# of the rows reported are skipped and not printed. Compact output
# is applicable only if report/buffered is enabled. If you need to
# compact all fields, use compact_output=1 instead in which case
# the compact_output_cols setting is then ignored.
# This configuration option has an automatic default value.
# compact_output_cols = ""
# Configuration option report/aligned.
# Align columns in report output.
# This configuration option has an automatic default value.
# aligned = 1
# Configuration option report/buffered.
# Buffer report output.
# When buffered reporting is used, the report's content is appended
# incrementally to include each object being reported until the report
# is flushed to output which normally happens at the end of command
# execution. Otherwise, if buffering is not used, each object is
# reported as soon as its processing is finished.
# This configuration option has an automatic default value.
# buffered = 1
# Configuration option report/headings.
# Show headings for columns on report.
# This configuration option has an automatic default value.
# headings = 1
# Configuration option report/separator.
# A separator to use on report after each field.
# This configuration option has an automatic default value.
# separator = " "
# Configuration option report/list_item_separator.
# A separator to use for list items when reported.
# This configuration option has an automatic default value.
# list_item_separator = ","
# Configuration option report/prefixes.
# Use a field name prefix for each field reported.
# This configuration option has an automatic default value.
# prefixes = 0
# Configuration option report/quoted.
# Quote field values when using field name prefixes.
# This configuration option has an automatic default value.
# quoted = 1
# Configuration option report/columns_as_rows.
# Output each column as a row.
# If set, this also implies report/prefixes=1.
# This configuration option has an automatic default value.
# columns_as_rows = 0
# Configuration option report/binary_values_as_numeric.
# Use binary values 0 or 1 instead of descriptive literal values.
# For columns that have exactly two valid values to report
# (not counting the 'unknown' value which denotes that the
# value could not be determined).
# This configuration option has an automatic default value.
# binary_values_as_numeric = 0
# Configuration option report/time_format.
# Set time format for fields reporting time values.
# Format specification is a string which may contain special character
# sequences and ordinary character sequences. Ordinary character
# sequences are copied verbatim. Each special character sequence is
# introduced by the '%' character and such sequence is then
# substituted with a value as described below.
#
# Accepted values:
# %a
# The abbreviated name of the day of the week according to the
# current locale.
# %A
# The full name of the day of the week according to the current
# locale.
# %b
# The abbreviated month name according to the current locale.
# %B
# The full month name according to the current locale.
# %c
# The preferred date and time representation for the current
# locale (alt E)
# %C
# The century number (year/100) as a 2-digit integer. (alt E)
# %d
# The day of the month as a decimal number (range 01 to 31).
# (alt O)
# %D
# Equivalent to %m/%d/%y. (For Americans only. Americans should
# note that in other countries%d/%m/%y is rather common. This
# means that in international context this format is ambiguous and
# should not be used.
# %e
# Like %d, the day of the month as a decimal number, but a leading
# zero is replaced by a space. (alt O)
# %E
# Modifier: use alternative local-dependent representation if
# available.
# %F
# Equivalent to %Y-%m-%d (the ISO 8601 date format).
# %G
# The ISO 8601 week-based year with century as adecimal number.
# The 4-digit year corresponding to the ISO week number (see %V).
# This has the same format and value as %Y, except that if the
# ISO week number belongs to the previous or next year, that year
# is used instead.
# %g
# Like %G, but without century, that is, with a 2-digit year
# (00-99).
# %h
# Equivalent to %b.
# %H
# The hour as a decimal number using a 24-hour clock
# (range 00 to 23). (alt O)
# %I
# The hour as a decimal number using a 12-hour clock
# (range 01 to 12). (alt O)
# %j
# The day of the year as a decimal number (range 001 to 366).
# %k
# The hour (24-hour clock) as a decimal number (range 0 to 23);
# single digits are preceded by a blank. (See also %H.)
# %l
# The hour (12-hour clock) as a decimal number (range 1 to 12);
# single digits are preceded by a blank. (See also %I.)
# %m
# The month as a decimal number (range 01 to 12). (alt O)
# %M
# The minute as a decimal number (range 00 to 59). (alt O)
# %O
# Modifier: use alternative numeric symbols.
# %p
# Either "AM" or "PM" according to the given time value,
# or the corresponding strings for the current locale. Noon is
# treated as "PM" and midnight as "AM".
# %P
# Like %p but in lowercase: "am" or "pm" or a corresponding
# string for the current locale.
# %r
# The time in a.m. or p.m. notation. In the POSIX locale this is
# equivalent to %I:%M:%S %p.
# %R
# The time in 24-hour notation (%H:%M). For a version including
# the seconds, see %T below.
# %s
# The number of seconds since the Epoch,
# 1970-01-01 00:00:00 +0000 (UTC)
# %S
# The second as a decimal number (range 00 to 60). (The range is
# up to 60 to allow for occasional leap seconds.) (alt O)
# %t
# A tab character.
# %T
# The time in 24-hour notation (%H:%M:%S).
# %u
# The day of the week as a decimal, range 1 to 7, Monday being 1.
# See also %w. (alt O)
# %U
# The week number of the current year as a decimal number,
# range 00 to 53, starting with the first Sunday as the first
# day of week 01. See also %V and %W. (alt O)
# %V
# The ISO 8601 week number of the current year as a decimal number,
# range 01 to 53, where week 1 is the first week that has at least
# 4 days in the new year. See also %U and %W. (alt O)
# %w
# The day of the week as a decimal, range 0 to 6, Sunday being 0.
# See also %u. (alt O)
# %W
# The week number of the current year as a decimal number,
# range 00 to 53, starting with the first Monday as the first day
# of week 01. (alt O)
# %x
# The preferred date representation for the current locale without
# the time. (alt E)
# %X
# The preferred time representation for the current locale without
# the date. (alt E)
# %y
# The year as a decimal number without a century (range 00 to 99).
# (alt E, alt O)
# %Y
# The year as a decimal number including the century. (alt E)
# %z
# The +hhmm or -hhmm numeric timezone (that is, the hour and minute
# offset from UTC).
# %Z
# The timezone name or abbreviation.
# %%
# A literal '%' character.
#
# This configuration option has an automatic default value.
# time_format = "%Y-%m-%d %T %z"
# Configuration option report/devtypes_sort.
# List of columns to sort by when reporting 'lvm devtypes' command.
# See 'lvm devtypes -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# devtypes_sort = "devtype_name"
# Configuration option report/devtypes_cols.
# List of columns to report for 'lvm devtypes' command.
# See 'lvm devtypes -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# devtypes_cols = "devtype_name,devtype_max_partitions,devtype_description"
# Configuration option report/devtypes_cols_verbose.
# List of columns to report for 'lvm devtypes' command in verbose mode.
# See 'lvm devtypes -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# devtypes_cols_verbose = "devtype_name,devtype_max_partitions,devtype_description"
# Configuration option report/lvs_sort.
# List of columns to sort by when reporting 'lvs' command.
# See 'lvs -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# lvs_sort = "vg_name,lv_name"
# Configuration option report/lvs_cols.
# List of columns to report for 'lvs' command.
# See 'lvs -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# lvs_cols = "lv_name,vg_name,lv_attr,lv_size,pool_lv,origin,data_percent,metadata_percent,move_pv,mirror_log,copy_percent,convert_lv"
# Configuration option report/lvs_cols_verbose.
# List of columns to report for 'lvs' command in verbose mode.
# See 'lvs -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# lvs_cols_verbose = "lv_name,vg_name,seg_count,lv_attr,lv_size,lv_major,lv_minor,lv_kernel_major,lv_kernel_minor,pool_lv,origin,data_percent,metadata_percent,move_pv,copy_percent,mirror_log,convert_lv,lv_uuid,lv_profile"
# Configuration option report/vgs_sort.
# List of columns to sort by when reporting 'vgs' command.
# See 'vgs -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# vgs_sort = "vg_name"
# Configuration option report/vgs_cols.
# List of columns to report for 'vgs' command.
# See 'vgs -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# vgs_cols = "vg_name,pv_count,lv_count,snap_count,vg_attr,vg_size,vg_free"
# Configuration option report/vgs_cols_verbose.
# List of columns to report for 'vgs' command in verbose mode.
# See 'vgs -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# vgs_cols_verbose = "vg_name,vg_attr,vg_extent_size,pv_count,lv_count,snap_count,vg_size,vg_free,vg_uuid,vg_profile"
# Configuration option report/pvs_sort.
# List of columns to sort by when reporting 'pvs' command.
# See 'pvs -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# pvs_sort = "pv_name"
# Configuration option report/pvs_cols.
# List of columns to report for 'pvs' command.
# See 'pvs -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# pvs_cols = "pv_name,vg_name,pv_fmt,pv_attr,pv_size,pv_free"
# Configuration option report/pvs_cols_verbose.
# List of columns to report for 'pvs' command in verbose mode.
# See 'pvs -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# pvs_cols_verbose = "pv_name,vg_name,pv_fmt,pv_attr,pv_size,pv_free,dev_size,pv_uuid"
# Configuration option report/segs_sort.
# List of columns to sort by when reporting 'lvs --segments' command.
# See 'lvs --segments -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# segs_sort = "vg_name,lv_name,seg_start"
# Configuration option report/segs_cols.
# List of columns to report for 'lvs --segments' command.
# See 'lvs --segments -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# segs_cols = "lv_name,vg_name,lv_attr,stripes,segtype,seg_size"
# Configuration option report/segs_cols_verbose.
# List of columns to report for 'lvs --segments' command in verbose mode.
# See 'lvs --segments -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# segs_cols_verbose = "lv_name,vg_name,lv_attr,seg_start,seg_size,stripes,segtype,stripesize,chunksize"
# Configuration option report/pvsegs_sort.
# List of columns to sort by when reporting 'pvs --segments' command.
# See 'pvs --segments -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# pvsegs_sort = "pv_name,pvseg_start"
# Configuration option report/pvsegs_cols.
# List of columns to sort by when reporting 'pvs --segments' command.
# See 'pvs --segments -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# pvsegs_cols = "pv_name,vg_name,pv_fmt,pv_attr,pv_size,pv_free,pvseg_start,pvseg_size"
# Configuration option report/pvsegs_cols_verbose.
# List of columns to sort by when reporting 'pvs --segments' command in verbose mode.
# See 'pvs --segments -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# pvsegs_cols_verbose = "pv_name,vg_name,pv_fmt,pv_attr,pv_size,pv_free,pvseg_start,pvseg_size,lv_name,seg_start_pe,segtype,seg_pe_ranges"
# Configuration option report/vgs_cols_full.
# List of columns to report for lvm fullreport's 'vgs' subreport.
# See 'vgs -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# vgs_cols_full = "vg_all"
# Configuration option report/pvs_cols_full.
# List of columns to report for lvm fullreport's 'vgs' subreport.
# See 'pvs -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# pvs_cols_full = "pv_all"
# Configuration option report/lvs_cols_full.
# List of columns to report for lvm fullreport's 'lvs' subreport.
# See 'lvs -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# lvs_cols_full = "lv_all"
# Configuration option report/pvsegs_cols_full.
# List of columns to report for lvm fullreport's 'pvseg' subreport.
# See 'pvs --segments -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# pvsegs_cols_full = "pvseg_all,pv_uuid,lv_uuid"
# Configuration option report/segs_cols_full.
# List of columns to report for lvm fullreport's 'seg' subreport.
# See 'lvs --segments -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# segs_cols_full = "seg_all,lv_uuid"
# Configuration option report/vgs_sort_full.
# List of columns to sort by when reporting lvm fullreport's 'vgs' subreport.
# See 'vgs -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# vgs_sort_full = "vg_name"
# Configuration option report/pvs_sort_full.
# List of columns to sort by when reporting lvm fullreport's 'vgs' subreport.
# See 'pvs -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# pvs_sort_full = "pv_name"
# Configuration option report/lvs_sort_full.
# List of columns to sort by when reporting lvm fullreport's 'lvs' subreport.
# See 'lvs -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# lvs_sort_full = "vg_name,lv_name"
# Configuration option report/pvsegs_sort_full.
# List of columns to sort by when reporting for lvm fullreport's 'pvseg' subreport.
# See 'pvs --segments -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# pvsegs_sort_full = "pv_uuid,pvseg_start"
# Configuration option report/segs_sort_full.
# List of columns to sort by when reporting lvm fullreport's 'seg' subreport.
# See 'lvs --segments -o help' for the list of possible fields.
# This configuration option has an automatic default value.
# segs_sort_full = "lv_uuid,seg_start"
# Configuration option report/mark_hidden_devices.
# Use brackets [] to mark hidden devices.
# This configuration option has an automatic default value.
# mark_hidden_devices = 1
# Configuration option report/two_word_unknown_device.
# Use the two words 'unknown device' in place of '[unknown]'.
# This is displayed when the device for a PV is not known.
# This configuration option has an automatic default value.
# two_word_unknown_device = 0
# }
# Configuration section dmeventd.
# Settings for the LVM event daemon.
dmeventd {
# Configuration option dmeventd/mirror_library.
# The library dmeventd uses when monitoring a mirror device.
# libdevmapper-event-lvm2mirror.so attempts to recover from
# failures. It removes failed devices from a volume group and
# reconfigures a mirror as necessary. If no mirror library is
# provided, mirrors are not monitored through dmeventd.
mirror_library = "libdevmapper-event-lvm2mirror.so"
# Configuration option dmeventd/raid_library.
# This configuration option has an automatic default value.
# raid_library = "libdevmapper-event-lvm2raid.so"
# Configuration option dmeventd/snapshot_library.
# The library dmeventd uses when monitoring a snapshot device.
# libdevmapper-event-lvm2snapshot.so monitors the filling of snapshots
# and emits a warning through syslog when the usage exceeds 80%. The
# warning is repeated when 85%, 90% and 95% of the snapshot is filled.
snapshot_library = "libdevmapper-event-lvm2snapshot.so"
# Configuration option dmeventd/thin_library.
# The library dmeventd uses when monitoring a thin device.
# libdevmapper-event-lvm2thin.so monitors the filling of a pool
# and emits a warning through syslog when the usage exceeds 80%. The
# warning is repeated when 85%, 90% and 95% of the pool is filled.
thin_library = "libdevmapper-event-lvm2thin.so"
# Configuration option dmeventd/thin_command.
# The plugin runs command with each 5% increment when thin-pool data volume
# or metadata volume gets above 50%.
# Command which starts with 'lvm ' prefix is internal lvm command.
# You can write your own handler to customise behaviour in more details.
# User handler is specified with the full path starting with '/'.
# This configuration option has an automatic default value.
# thin_command = "lvm lvextend --use-policies"
# Configuration option dmeventd/executable.
# The full path to the dmeventd binary.
# This configuration option has an automatic default value.
# executable = "/usr/sbin/dmeventd"
}
# Configuration section tags.
# Host tag settings.
# This configuration section has an automatic default value.
# tags {
# Configuration option tags/hosttags.
# Create a host tag using the machine name.
# The machine name is nodename returned by uname(2).
# This configuration option has an automatic default value.
# hosttags = 0
# Configuration section tags/.
# Replace this subsection name with a custom tag name.
# Multiple subsections like this can be created. The '@' prefix for
# tags is optional. This subsection can contain host_list, which is a
# list of machine names. If the name of the local machine is found in
# host_list, then the name of this subsection is used as a tag and is
# applied to the local machine as a 'host tag'. If this subsection is
# empty (has no host_list), then the subsection name is always applied
# as a 'host tag'.
#
# Example
# The host tag foo is given to all hosts, and the host tag
# bar is given to the hosts named machine1 and machine2.
# tags { foo { } bar { host_list = [ "machine1", "machine2" ] } }
#
# This configuration section has variable name.
# This configuration section has an automatic default value.
# tag {
# Configuration option tags//host_list.
# A list of machine names.
# These machine names are compared to the nodename returned
# by uname(2). If the local machine name matches an entry in
# this list, the name of the subsection is applied to the
# machine as a 'host tag'.
# This configuration option does not have a default value defined.
# }
# }
kiwi-boxed-plugin-0.2.31/boxes/universal/root/etc/selinux/ 0000775 0000000 0000000 00000000000 14516463774 0023531 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/universal/root/etc/selinux/config 0000664 0000000 0000000 00000000046 14516463774 0024721 0 ustar 00root root 0000000 0000000 SELINUX=disabled
SELINUXTYPE=targeted
kiwi-boxed-plugin-0.2.31/boxes/universal/root/etc/sysconfig/ 0000775 0000000 0000000 00000000000 14516463774 0024046 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/universal/root/etc/sysconfig/network-scripts/ 0000775 0000000 0000000 00000000000 14516463774 0027224 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/universal/root/etc/sysconfig/network-scripts/ifcfg-lan0 0000664 0000000 0000000 00000000126 14516463774 0031054 0 ustar 00root root 0000000 0000000 DEVICE="lan0"
BOOTPROTO="dhcp"
ONBOOT="yes"
TYPE="Ethernet"
PERSISTENT_DHCLIENT="yes"
kiwi-boxed-plugin-0.2.31/boxes/universal/root/etc/systemd/ 0000775 0000000 0000000 00000000000 14516463774 0023532 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/universal/root/etc/systemd/system/ 0000775 0000000 0000000 00000000000 14516463774 0025056 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/universal/root/etc/systemd/system/serial-getty@hvc0.service.d/ 0000775 0000000 0000000 00000000000 14516463774 0032231 5 ustar 00root root 0000000 0000000 override.conf 0000664 0000000 0000000 00000000161 14516463774 0034636 0 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/universal/root/etc/systemd/system/serial-getty@hvc0.service.d [Service]
ExecStart=
ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud 115200,38400,9600 hvc0 $TERM
kiwi-boxed-plugin-0.2.31/boxes/universal/root/etc/systemd/system/serial-getty@ttyS0.service.d/ 0000775 0000000 0000000 00000000000 14516463774 0032414 5 ustar 00root root 0000000 0000000 override.conf 0000664 0000000 0000000 00000000162 14516463774 0035022 0 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/universal/root/etc/systemd/system/serial-getty@ttyS0.service.d [Service]
ExecStart=
ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud 115200,38400,9600 ttyS0 $TERM
kiwi-boxed-plugin-0.2.31/boxes/universal/root/etc/udev/ 0000775 0000000 0000000 00000000000 14516463774 0023005 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/universal/root/etc/udev/rules.d/ 0000775 0000000 0000000 00000000000 14516463774 0024361 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/universal/root/etc/udev/rules.d/70-persistent-net.rules 0000664 0000000 0000000 00000000205 14516463774 0030642 0 ustar 00root root 0000000 0000000 SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="?*", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="?*", NAME="lan0"
kiwi-boxed-plugin-0.2.31/boxes/universal/root/usr/ 0000775 0000000 0000000 00000000000 14516463774 0022100 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/universal/root/usr/lib/ 0000775 0000000 0000000 00000000000 14516463774 0022646 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/universal/root/usr/lib/systemd/ 0000775 0000000 0000000 00000000000 14516463774 0024336 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/universal/root/usr/lib/systemd/system/ 0000775 0000000 0000000 00000000000 14516463774 0025662 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/universal/root/usr/lib/systemd/system/kiwi.service 0000664 0000000 0000000 00000000263 14516463774 0030210 0 ustar 00root root 0000000 0000000 [Unit]
Description=Start kiwi build process
After=network.target
Requires=network-online.target
[Service]
ExecStart=/usr/local/bin/run_kiwi
[Install]
WantedBy=multi-user.target
kiwi-boxed-plugin-0.2.31/boxes/universal/root/usr/local/ 0000775 0000000 0000000 00000000000 14516463774 0023172 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/universal/root/usr/local/bin/ 0000775 0000000 0000000 00000000000 14516463774 0023742 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/boxes/universal/root/usr/local/bin/gfxboot 0000775 0000000 0000000 00000000024 14516463774 0025334 0 ustar 00root root 0000000 0000000 #!/bin/bash
exit 0
kiwi-boxed-plugin-0.2.31/doc/ 0000775 0000000 0000000 00000000000 14516463774 0015721 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/doc/Makefile 0000664 0000000 0000000 00000017415 14516463774 0017371 0 ustar 00root root 0000000 0000000 # Makefile for Sphinx documentation
#
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = build
# User-friendly check for sphinx-build
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
endif
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -W -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
.PHONY: help
help:
@echo "Please use \`make ' where is one of"
@echo " html to make standalone HTML files"
@echo " dirhtml to make HTML files named index.html in directories"
@echo " singlehtml to make a single large HTML file"
@echo " pickle to make pickle files"
@echo " json to make JSON files"
@echo " htmlhelp to make HTML files and a HTML help project"
@echo " qthelp to make HTML files and a qthelp project"
@echo " applehelp to make an Apple Help Book"
@echo " devhelp to make HTML files and a Devhelp project"
@echo " epub to make an epub"
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
@echo " latexpdf to make LaTeX files and run them through pdflatex"
@echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
@echo " text to make text files"
@echo " man to make manual pages"
@echo " texinfo to make Texinfo files"
@echo " info to make Texinfo files and run them through makeinfo"
@echo " gettext to make PO message catalogs"
@echo " changes to make an overview of all changed/added/deprecated items"
@echo " xml to make Docutils-native XML files"
@echo " pseudoxml to make pseudoxml-XML files for display purposes"
@echo " linkcheck to check all external links for integrity"
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
@echo " coverage to run coverage check of the documentation (if enabled)"
@echo " spell to run spell-checking"
.PHONY: clean
clean:
rm -rf $(BUILDDIR)/
.PHONY: html
html:
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html && cp -a source/development/schema/images $(BUILDDIR)/html/development || true
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
.PHONY: dirhtml
dirhtml:
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
.PHONY: singlehtml
singlehtml:
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
@echo
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
.PHONY: pickle
pickle:
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
@echo
@echo "Build finished; now you can process the pickle files."
.PHONY: json
json:
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
@echo
@echo "Build finished; now you can process the JSON files."
.PHONY: htmlhelp
htmlhelp:
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
@echo
@echo "Build finished; now you can run HTML Help Workshop with the" \
".hhp project file in $(BUILDDIR)/htmlhelp."
.PHONY: qthelp
qthelp:
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
@echo
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/kiwi.qhcp"
@echo "To view the help file:"
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/kiwi.qhc"
.PHONY: applehelp
applehelp:
$(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp
@echo
@echo "Build finished. The help book is in $(BUILDDIR)/applehelp."
@echo "N.B. You won't be able to view it unless you put it in" \
"~/Library/Documentation/Help or install it in your application" \
"bundle."
.PHONY: devhelp
devhelp:
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
@echo
@echo "Build finished."
@echo "To view the help file:"
@echo "# mkdir -p $$HOME/.local/share/devhelp/kiwi"
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/kiwi"
@echo "# devhelp"
.PHONY: epub
epub:
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
@echo
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
.PHONY: latex
latex:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
@echo "Run \`make' in that directory to run these through (pdf)latex" \
"(use \`make latexpdf' here to do that automatically)."
.PHONY: latexpdf
latexpdf:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through pdflatex..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
.PHONY: latexpdfja
latexpdfja:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through platex and dvipdfmx..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
.PHONY: text
text:
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
@echo
@echo "Build finished. The text files are in $(BUILDDIR)/text."
.PHONY: man
man:
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
@echo
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
.PHONY: texinfo
texinfo:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo
@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
@echo "Run \`make' in that directory to run these through makeinfo" \
"(use \`make info' here to do that automatically)."
.PHONY: info
info:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo "Running Texinfo files through makeinfo..."
make -C $(BUILDDIR)/texinfo info
@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
.PHONY: gettext
gettext:
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
@echo
@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
.PHONY: changes
changes:
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
@echo
@echo "The overview file is in $(BUILDDIR)/changes."
.PHONY: linkcheck
linkcheck:
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
@echo
@echo "Link check complete; look for any errors in the above output " \
"or in $(BUILDDIR)/linkcheck/output.txt."
.PHONY: doctest
doctest:
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
@echo "Testing of doctests in the sources finished, look at the " \
"results in $(BUILDDIR)/doctest/output.txt."
.PHONY: coverage
coverage:
$(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage
@echo "Testing of coverage in the sources finished, look at the " \
"results in $(BUILDDIR)/coverage/python.txt."
.PHONY: xml
xml:
$(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
@echo
@echo "Build finished. The XML files are in $(BUILDDIR)/xml."
.PHONY: pseudoxml
pseudoxml:
$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
@echo
@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
.PHONY: spell
spell:
$(SPHINXBUILD) -b spelling $(ALLSPHINXOPTS) $(BUILDDIR)/spelling
@echo
@echo "Spell-checking complete. Find results in $(BUILDDIR)/spelling."
kiwi-boxed-plugin-0.2.31/doc/source/ 0000775 0000000 0000000 00000000000 14516463774 0017221 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/doc/source/commands.rst 0000664 0000000 0000000 00000000125 14516463774 0021552 0 ustar 00root root 0000000 0000000 Command Line
============
.. toctree::
:maxdepth: 1
commands/system_boxbuild
kiwi-boxed-plugin-0.2.31/doc/source/commands/ 0000775 0000000 0000000 00000000000 14516463774 0021022 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/doc/source/commands/system_boxbuild.rst 0000664 0000000 0000000 00000013043 14516463774 0024771 0 ustar 00root root 0000000 0000000 kiwi-ng system boxbuild
=======================
SYNOPSIS
--------
.. code:: bash
kiwi-ng [global options] service []
kiwi-ng system boxbuild -h | --help
kiwi-ng system boxbuild --box=
[--box-memory=]
[--box-smp-cpus=]
[--box-debug]
[--kiwi-version=]
[--shared-path=]
[--no-update-check]
[--no-snapshot]
[--no-accel]
[--9p-sharing | --virtiofs-sharing | --sshfs-sharing]
[--ssh-key=]
[--x86_64 | --aarch64]
[--machine=]
[--cpu=]
-- ...
kiwi-ng system boxbuild --list-boxes
kiwi-ng system boxbuild help
DESCRIPTION
-----------
build an image in a self contained environment. The `boxbuild`
command uses KVM to start a virtual machine and run the kiwi
build command inside of that virtual machine. The provided
`--description` and `--target-dir` options are setup as shared
folders between the host and the guest. No other data will be
shared with the host which also allows for cross distribution
builds. The boxbuild command provides the following additional
features over the standard build command:
* Build images independent of the host.
* Build images as normal user not as root.
* Build cross distribution images on one host.
* Build in predefined build VMs called boxes which includes
all components needed to build appliances.
For running the build process in a virtual machine it's required
to provide VM images that are suitable to perform this job. We
call the VM images `boxes` and they contain kiwi itself as well
as all other components needed to build appliances. Those boxes
are hosted in the Open Build Service and are publicly available
on the `Subprojects` tab at:
https://build.opensuse.org/project/show/Virtualization:Appliances:SelfContained
As a user you don't need to work with the boxes because this
is all done by the plugin. The `boxbuild` command knows where to
fetch the box and also cares for an update of the box when it
has changed.
OPTIONS
-------
--box=
Name of the virtual machine that should be used for
the build process.
--list-boxes
show available build boxes.
--box-memory=
Number of GBs to reserve as main memory for the virtual
machine. By default 8GB will be used.
--box-smp-cpus=
Number of CPUs to use in the SMP setup. By default
4 CPUs will be used
--no-update-check
Skip check for available box update. The option has no
effect if the selected box does not yet exist on the host.
--no-snapshot
Run box with snapshot mode switched off. This causes the
box disk file to be modified by the build process and allows
to keep a persistent package cache as part of the box.
The option can be used to increase the build performance
due to data stored in the box which doesn't have to be
reloaded from the network. On the contrary this option
invalidates the immutable box attribute and should be
used with care. On update of the box all data stored
will be wiped. To prevent this combine the option with
the --no-update-check option.
--no-accel
Run box without hardware acceleration. By default KVM
acceleration is activated
--9p-sharing|--virtiofs-sharing|--sshfs-sharing
Select sharing backend to use for sharing data between the
host and the box. This can be either 9p, virtiofs or sshfs.
By default 9p is used
--ssh-key=
Name of ssh key to authorize for connection.
By default 'id_rsa' is used.
--x86_64|--aarch64
Select box for the x86_64 architecture. If no architecture
is selected the host architecture is used for selecting
the box. The selected box architecture also specifies the
target architecture for the image build with that box.
--box-debug
In debug mode the started virtual machine will be kept open
--kiwi-version=
Specify a KIWI version to use for the build. The referenced
KIWI will be fetched from pip and replaces the box installed
KIWI version. Note: If --no-snapshot is used in combination
with this option, the change of the KIWI version will be
permanently stored in the used box.
--shared-path=
Optional host path to share with the box. The same path
as it is present on the host will also be available inside
of the box during build time.
--machine=
Optional machine name used by QEMU. By default no specific
value is used here and qemu selects its default machine type.
For cross arch builds or for system architectures for which
QEMU defines no default like for Arm, it's required to specify
a machine name.
If you don’t care about reproducing the idiosyncrasies of
a particular bit of hardware, the best option is to use
the 'virt' machine type.
--cpu=
Optional CPU type used by QEMU. By default the host CPU
type is used which is only a good selection if the host
and the selected box are from the same architecture. On
cross arch builds it's required to specify the CPU
emulation the box should use
-- ...
List of command parameters as supported by the kiwi-ng
build command. The information given here is passed
along to the kiwi-ng system build command running in
the virtual machine. See the Example below how to provide
options to the build command correctly.
EXAMPLE
-------
.. code:: bash
$ git clone https://github.com/OSInside/kiwi-descriptions
$ kiwi --type vmx system boxbuild --box suse -- \
--description kiwi-descriptions/suse/x86_64/suse-tumbleweed-JeOS \
--target-dir /tmp/myimage
kiwi-boxed-plugin-0.2.31/doc/source/conf.py 0000664 0000000 0000000 00000005760 14516463774 0020530 0 ustar 00root root 0000000 0000000 #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# KIWI NG documentation build configuration file
#
import sys
from os.path import abspath, dirname, join, normpath
import shlex
import sphinx_rtd_theme
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
_path = normpath(join(dirname(__file__), "../.."))
sys.path.insert(0, _path)
# -- General configuration ------------------------------------------------
extensions = [
'sphinx.ext.extlinks',
'sphinx.ext.viewcode',
'sphinx.ext.intersphinx'
]
# Add any paths that contain templates here, relative to this directory.
templates_path = ['.templates']
# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
# source_suffix = ['.rst', '.md']
source_suffix = '.rst'
# The encoding of source files.
source_encoding = 'utf-8-sig'
# The master toctree document.
master_doc = 'index'
default_role="py:obj"
# General information about the project.
project = 'KIWI - Boxed Build Plugin'
copyright = '2020, Marcus Schäfer'
author = 'Marcus Schäfer'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = '0.2.31'
# The full version, including alpha/beta/rc tags.
release = version
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = 'en'
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = []
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = True
autosummary_generate = True
# -- Options for HTML output ----------------------------------------------
html_sidebars = {
'**': [
'localtoc.html', 'relations.html',
'about.html', 'searchbox.html',
]
}
html_theme = "sphinx_rtd_theme"
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
html_theme_options = {
'collapse_navigation': False,
'display_version': False
}
# -- Options for manual page output ---------------------------------------
# The man page toctree documents.
system_boxbuild_doc = 'commands/system_boxbuild'
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(
system_boxbuild_doc,
'kiwi::system::boxbuild',
'Self Contained Image Build',
[author],
8
)
]
intersphinx_mapping = {'python': ('https://docs.python.org/3', None)}
kiwi-boxed-plugin-0.2.31/doc/source/index.rst 0000664 0000000 0000000 00000000052 14516463774 0021057 0 ustar 00root root 0000000 0000000 .. toctree::
:maxdepth: 1
commands
kiwi-boxed-plugin-0.2.31/helper/ 0000775 0000000 0000000 00000000000 14516463774 0016433 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/helper/rebuild_changelog_reference.sh 0000775 0000000 0000000 00000000240 14516463774 0024441 0 ustar 00root root 0000000 0000000 #!/bin/bash
git log --no-merges --format=fuller > package/python-kiwi.changes
git commit -S -m 'Update changelog reference' \
package/python-kiwi.changes
kiwi-boxed-plugin-0.2.31/helper/update_changelog.py 0000775 0000000 0000000 00000007571 14516463774 0022313 0 ustar 00root root 0000000 0000000 #!/usr/bin/python3
"""
usage: update_changelog (--since=|--file=)
[--utc]
arguments:
--since=
changes since the latest entry in the reference file
--utc
print date/time in UTC
"""
import docopt
import os
import subprocess
import sys
from dateutil import parser
from dateutil import tz
# Commandline arguments
arguments = docopt.docopt(__doc__)
# Latest date of the given reference file
date_reference = None
# List of skipped commits older than date_reference
skip_list = []
# hash of git history log entries
log_data = {}
# raw list of log lines from git history or reference file
log_lines = []
# Author and Date
log_author = None
log_date = None
# changelog header line
log_start = '-' * 67 + os.linesep
# date format for rpm changelog
date_format = '%a %b %d %T %Z %Y'
# commit message
commit_message = []
# Open reference log file
reference_file = arguments['--since'] or arguments['--file']
if arguments['--since']:
# Read latest date from reference file
with open(reference_file, 'r') as gitlog:
# read commit and author
gitlog.readline()
gitlog.readline()
# read date
latest_date = gitlog.readline().replace('AuthorDate:', '').strip()
date_reference = parser.parse(latest_date)
# Read git history since latest entry from reference file
process = subprocess.Popen(
[
'git', 'log', '--no-merges', '--format=fuller',
'--since="{0}"'.format(latest_date)
], stdout=subprocess.PIPE
)
for line in iter(process.stdout.readline, b''):
log_lines.append(line)
else:
with open(reference_file, 'rb') as gitlog:
log_lines = gitlog.readlines()
# Iterate over log data and convert to changelog format
for line_data in log_lines:
line = line_data.decode(encoding='utf-8')
if line.startswith('commit'):
if commit_message:
commit_message.pop(0)
message_header = commit_message.pop(0).lstrip()
message_body = []
for line in commit_message:
message_line = line.lstrip()
if not message_line:
message_body.append(os.linesep)
else:
message_body.append(
' {0}{1}'.format(message_line, os.linesep)
)
log_data[log_date] = ''.join(
[
log_start,
'{0} - {1}{2}{2}'.format(
log_date.astimezone(
tz.UTC if arguments['--utc'] else tz.tzlocal()
).strftime(date_format), log_author, os.linesep
),
'- {0}{1}'.format(
message_header, os.linesep
)
] + message_body
)
commit_message = []
elif line.startswith('Author:'):
log_author = line.replace('Author:', '').strip()
elif line.startswith('AuthorDate:'):
log_date = parser.parse(line.replace('AuthorDate:', '').strip())
elif line.startswith('Commit:'):
pass
elif line.startswith('CommitDate:'):
pass
else:
commit_message.append(line.strip())
# print in changelog format on stdout
for author_date in reversed(sorted(log_data.keys())):
if date_reference:
if date_reference < author_date:
sys.stdout.write(log_data[author_date])
else:
skip_list.append(author_date)
else:
sys.stdout.write(log_data[author_date])
# print inconsistencies if any on stderr
if skip_list:
sys.stderr.write(
'Reference Date: {0}{1}'.format(date_reference, os.linesep)
)
for date in skip_list:
sys.stderr.write(
' + Skipped: {0}: past reference{1}'.format(
date, os.linesep
)
)
kiwi-boxed-plugin-0.2.31/kiwi_boxed_plugin/ 0000775 0000000 0000000 00000000000 14516463774 0020656 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/kiwi_boxed_plugin/__init__.py 0000664 0000000 0000000 00000000000 14516463774 0022755 0 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/kiwi_boxed_plugin/box_build.py 0000664 0000000 0000000 00000025407 14516463774 0023207 0 ustar 00root root 0000000 0000000 # Copyright (c) 2020 SUSE Software Solutions Germany GmbH. All rights reserved.
#
# This file is part of kiwi-boxed-build.
#
# kiwi-boxed-build is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# kiwi-boxed-build is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with kiwi-boxed-build. If not, see
#
import os
import pwd
import time
import logging
import platform
from threading import Thread
from typing import (
List, Optional
)
from kiwi.path import Path
from kiwi.command import Command
from kiwi_boxed_plugin.box_download import BoxDownload
from kiwi_boxed_plugin.defaults import Defaults
import kiwi_boxed_plugin.defaults as runtime
from kiwi_boxed_plugin.exceptions import (
KiwiBoxPluginQEMUBinaryNotFound,
KiwiBoxPluginSSHPortInvalid,
KiwiError
)
log = logging.getLogger('kiwi')
class BoxBuild:
"""
**Implements boxbuild command**
Implements an interface to run a kiwi build box using
the KVM virtualization platform
:param str boxname: name of the box from kiwi_boxed_plugin.yml
:param str ram: amount of main memory to use for the box
:param str smp: number of CPUs to use in the SMP setup for the box
:param str arch: arch name for box
:param str machine: machine emulaton type for the box
:param str cpu: CPU emulation type
:param str sharing_backend: guest/host sharing backend type
:param str ssh_port: host port number to use to forward the guest's SSH port
"""
def __init__(
self, boxname: str, ram: str = '', smp: str = '',
arch: str = '', machine: str = '', cpu: str = 'host',
sharing_backend: str = '9p', ssh_key: str = 'id_rsa',
ssh_port: str = '', accel: bool = True
) -> None:
self.ram = ram
self.smp = smp
self.cpu = cpu
self.machine = machine
self.arch = arch or platform.machine()
self.box = BoxDownload(boxname, arch)
self.sharing_backend = sharing_backend
self.ssh_key = ssh_key
self.ssh_port = ssh_port
self.kiwi_exit: Optional[int] = None
self.accel = accel
def run(
self, kiwi_build_command: List[str], update_check: bool = True,
snapshot: bool = True, keep_open: bool = False,
kiwi_version: str = '', custom_shared_path: str = ''
) -> None:
"""
Start the build process in a box VM using KVM
:param list kiwi_build_command:
kiwi build command line Example:
.. code:: python
[
'--type', 'vmx', 'system', 'build',
'--description', 'some/description',
'--target-dir', 'some/target-dir'
]
:param bool update_check: check for box updates True|False
:param bool snapshot: run box in snapshot mode True|False
:param bool keep_open: keep VM running True|False
"""
self.kiwi_build_command = kiwi_build_command
desc = self._pop_arg_param(
'--description'
)
target_dir = self._pop_arg_param(
'--target-dir'
)
Path.create(target_dir)
vm_setup = self.box.fetch(update_check)
vm_append = [
vm_setup.append,
'kiwi=\\"{0}\\"'.format(' '.join(self.kiwi_build_command))
]
if keep_open:
vm_append.append('kiwi-no-halt')
if kiwi_version:
vm_append.append('kiwi_version=_{0}_'.format(kiwi_version))
if custom_shared_path:
vm_append.append('custom_mount=_{0}_'.format(custom_shared_path))
if self.sharing_backend == 'sshfs':
ssh_key_file = os.sep.join(
[os.environ.get('HOME') or '~', '.ssh', f'{self.ssh_key}.pub']
)
if os.path.isfile(ssh_key_file):
with open(ssh_key_file) as key_fd:
ssh_key = key_fd.read().split()
key_type = ssh_key[0]
key_value = ssh_key[1]
vm_append.append(f'ssh_key=_{key_value}_')
vm_append.append(f'ssh_key_type=_{key_type}_')
user = pwd.getpwuid(os.geteuid()).pw_name
vm_append.append(
'host_kiwidescription=_{0}_'.format(
f'{user}@localhost:{desc}'
)
)
vm_append.append(
'host_kiwibundle=_{0}_'.format(
f'{user}@localhost:{target_dir}'
)
)
if custom_shared_path:
vm_append.append(
'host_custompath=_{0}_'.format(
f'{user}@localhost:{custom_shared_path}'
)
)
vm_append.append(
'sharing_backend=_{0}_'.format(self.sharing_backend)
)
vm_machine = []
if self.machine:
vm_machine.append('-machine')
vm_machine.append(self.machine)
if self.accel:
vm_machine.append('-accel')
vm_machine.append('accel=kvm')
if len(self.ssh_port) > 0:
if not self.ssh_port.isdigit():
raise KiwiBoxPluginSSHPortInvalid(
f'Invalid SSH port: {self.ssh_port} (must be a positive \
integer)'
)
Defaults.box_ssh_port_forwarded_to_host = int(self.ssh_port)
vm_machine.append('-cpu')
vm_machine.append(self.cpu)
qemu_binary = self._find_qemu_call_binary()
if not qemu_binary:
raise KiwiBoxPluginQEMUBinaryNotFound(
f'No QEMU binary for {self.arch} found'
)
vm_run = [
qemu_binary,
'-m', format(self.ram or vm_setup.ram)
] + vm_machine + [
] + Defaults.get_qemu_generic_setup() + [
'-kernel', vm_setup.kernel,
'-append', '"{0}"'.format(' '.join(vm_append))
] + Defaults.get_qemu_storage_setup(vm_setup.system, snapshot) + \
Defaults.get_qemu_network_setup() + \
Defaults.get_qemu_console_setup() + \
Defaults.get_qemu_shared_path_setup(
0, desc, 'kiwidescription', self.sharing_backend) + \
Defaults.get_qemu_shared_path_setup(
1, target_dir, 'kiwibundle', self.sharing_backend)
if custom_shared_path:
vm_run += Defaults.get_qemu_shared_path_setup(
2, custom_shared_path, 'custompath', self.sharing_backend
)
if self.sharing_backend == 'virtiofs':
vm_run += [
'-object', '{0},id=mem,size={1},mem-path={2},share=on'.format(
'memory-backend-file', self.ram or vm_setup.ram, '/dev/shm'
),
'-numa', 'node,memdev=mem'
]
if vm_setup.initrd:
vm_run += ['-initrd', vm_setup.initrd]
if vm_setup.smp:
vm_run += ['-smp', format(self.smp or vm_setup.smp)]
os.environ['TMPDIR'] = Defaults.get_local_box_cache_dir()
log.debug(
'Set TMPDIR: {0}'.format(os.environ['TMPDIR'])
)
if self.sharing_backend == 'sshfs':
log.debug('Initiating port forwarding')
# delete eventual existing host key for localhost on
# the kvm forwared box ssh port box_ssh_port_forwarded_to_host
# this is required because the host ssh key changes
# with every kvm box run. ssh identifies this as
# a potential man-in-the-middle attack and will disable
# port forwarding which is required though.
Command.run(
[
'ssh-keygen', '-R',
'[localhost]:{0}'.format(
runtime.Defaults.box_ssh_port_forwarded_to_host
)
], raise_on_error=False
)
# remote forward the host ssh port(22) into the box
# at port HOST_SSH_PORT_FORWARDED_TO_BOX using the kvm forwarded
# box ssh port box_ssh_port_forwarded_to_host. This action only
# completes successfully when the box has started up and is
# ready to operate through ssh
ssh_forward_thread = Thread(
target=self._forward_host_ssh_to_guest,
args=()
)
ssh_forward_thread.start()
log.debug(
'Calling Qemu: {0}'.format(vm_run)
)
os.system(
' '.join(vm_run)
)
for virtiofsd_process in runtime.VIRTIOFSD_PROCESS_LIST:
virtiofsd_process.terminate()
exit_code_file = os.sep.join([target_dir, 'result.code'])
build_log_file = os.sep.join([target_dir, 'result.log'])
self.kiwi_exit = 0
if os.path.exists(exit_code_file):
with open(exit_code_file) as exit_code:
self.kiwi_exit = int(exit_code.readline())
if self.kiwi_exit != 0:
raise KiwiError(
f'Box build failed. Find build log at: {build_log_file!r}'
)
log.info(
f'Box build done. Find build log at: {build_log_file!r}'
)
def _pop_arg_param(self, arg: str) -> str:
arg_index = self.kiwi_build_command.index(arg)
arg_value = ''
if arg_index:
arg_value = self.kiwi_build_command[arg_index + 1]
del self.kiwi_build_command[arg_index + 1]
del self.kiwi_build_command[arg_index]
return arg_value
def _find_qemu_call_binary(self) -> str:
qemu_by_system = Path.which(f'qemu-system-{self.arch}')
if qemu_by_system:
return qemu_by_system
return Path.which('qemu-kvm') if self.arch == 'x86_64' else ''
def _forward_host_ssh_to_guest(self) -> None:
while self.kiwi_exit is None:
try:
Command.run(
[
'ssh', '-NT',
'-o', 'StrictHostKeyChecking=no',
'root@localhost',
'-p',
format(runtime.Defaults.box_ssh_port_forwarded_to_host),
'-R',
'{0}:localhost:22'.format(
runtime.HOST_SSH_PORT_FORWARDED_TO_BOX
)
]
)
except Exception as issue:
log.debug(issue)
time.sleep(2)
kiwi-boxed-plugin-0.2.31/kiwi_boxed_plugin/box_config.py 0000664 0000000 0000000 00000006366 14516463774 0023360 0 ustar 00root root 0000000 0000000 # Copyright (c) 2020 SUSE Software Solutions Germany GmbH. All rights reserved.
#
# This file is part of kiwi-boxed-build.
#
# kiwi-boxed-build is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# kiwi-boxed-build is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with kiwi-boxed-build. If not, see
#
import platform
from typing import (
List, Dict
)
from kiwi_boxed_plugin.plugin_config import PluginConfig
from kiwi_boxed_plugin.exceptions import (
KiwiBoxPluginBoxNameError,
KiwiBoxPluginArchNotFoundError
)
class BoxConfig:
"""
**Implements reading of box configuration:**
"""
def __init__(self, boxname: str, arch: str = '') -> None:
self.arch = arch or platform.machine()
plugin_config = PluginConfig()
self.box_config = self._get_box_config(
plugin_config.get_config(), boxname
)
if not self.box_config:
raise KiwiBoxPluginBoxNameError(
'Box: {0} not found'.format(boxname)
)
self.box_arch_config = self._get_box_arch_config(
self.box_config, self.arch
)
def get_box_arch(self) -> str:
return self.arch
def get_box_memory_mbytes(self) -> str:
return self.box_config.get('mem_mb') or ''
def get_box_processors(self) -> str:
return self.box_config.get('processors') or ''
def get_box_console(self) -> str:
return self.box_config.get('console') or ''
def get_box_kernel_cmdline(self) -> str:
return ' '.join(self.box_arch_config.get('cmdline') or '')
def get_box_source(self) -> str:
return self.box_arch_config.get('source') or ''
def get_box_packages_file(self) -> str:
return self.box_arch_config.get('packages_file') or ''
def get_box_packages_shasum_file(self) -> str:
packages_file = self.box_arch_config.get('packages_file') or ''
if packages_file:
packages_file += '.sha256'
return packages_file
def get_box_files(self) -> List[str]:
source_files = []
for vm_file in self.box_arch_config.get('boxfiles') or []:
source_files.append(vm_file)
return source_files
def use_initrd(self) -> bool:
return bool(self.box_arch_config.get('use_initrd'))
def _get_box_config(
self, plugin_config: List[Dict], name: str
) -> Dict:
for box in plugin_config:
if box.get('name') == name:
return box
return {}
def _get_box_arch_config(
self, box_config: Dict, arch: str
) -> Dict:
for box_arch in box_config.get('arch') or []:
if box_arch.get('name') == arch:
return box_arch
raise KiwiBoxPluginArchNotFoundError(
f'No box configuration found for architecture: {arch}'
)
kiwi-boxed-plugin-0.2.31/kiwi_boxed_plugin/box_download.py 0000664 0000000 0000000 00000014644 14516463774 0023720 0 ustar 00root root 0000000 0000000 # Copyright (c) 2020 SUSE Software Solutions Germany GmbH. All rights reserved.
#
# This file is part of kiwi-boxed-build.
#
# kiwi-boxed-build is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# kiwi-boxed-build is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with kiwi-boxed-build. If not, see
#
import os
import platform
import logging
from typing import NamedTuple
from kiwi_boxed_plugin.utils.dir_files import DirFiles
from kiwi_boxed_plugin.utils.fetch_files import FetchFiles
from kiwi.command import Command
from kiwi.utils.checksum import Checksum
from kiwi.solver.repository import SolverRepository
from kiwi.system.uri import Uri
from kiwi.path import Path
from kiwi_boxed_plugin.box_config import BoxConfig
from kiwi_boxed_plugin.defaults import Defaults
vm_setup_type = NamedTuple(
'vm_setup_type', [
('system', str),
('kernel', str),
('initrd', str),
('append', str),
('ram', str),
('smp', str)
]
)
log = logging.getLogger('kiwi')
class BoxDownload:
"""
**Implements download of box file(s)**
Reads the box configuration file and provides an interface
to download the box files according to the configuration
:param string boxname: name of the box from kiwi_boxed_plugin.yml
:param string arch: arch name for box
"""
def __init__(self, boxname: str, arch: str = '') -> None:
self.arch = arch or platform.machine()
self.box_config = BoxConfig(boxname, arch)
self.box_dir = os.sep.join(
[Defaults.get_local_box_cache_dir(), boxname]
)
self.box_stage = DirFiles(self.box_dir)
self.system = ''
self.kernel = ''
self.initrd = ''
Path.create(self.box_dir)
def fetch(self, update_check: bool = True) -> vm_setup_type:
"""
Download box from the open build service
:param bool update_check: check for box updates True|False
"""
fetcher = FetchFiles()
download = update_check
repo_source = self.box_config.get_box_source()
if repo_source:
repo = SolverRepository.new(
Uri(repo_source, 'rpm-md')
)
packages_file = self.box_config.get_box_packages_file()
packages_shasum_file = \
self.box_config.get_box_packages_shasum_file()
if update_check and packages_file and packages_shasum_file:
local_packages_file = os.sep.join(
[self.box_dir, packages_file]
)
local_packages_shasum_file = os.sep.join(
[self.box_dir, packages_shasum_file]
)
local_packages_file_tmp = self.box_stage.register(
local_packages_file
)
local_packages_shasum_file_tmp = self.box_stage.register(
local_packages_shasum_file
)
repo.download_from_repository(
packages_file, local_packages_file_tmp
)
checksum = Checksum(local_packages_file_tmp)
shasum = checksum.sha256()
if checksum.matches(shasum, local_packages_shasum_file):
download = False
else:
self._create_packages_checksum(
local_packages_shasum_file_tmp, shasum
)
for box_file in self.box_config.get_box_files():
local_box_file = os.sep.join([self.box_dir, box_file])
if not os.path.exists(local_box_file):
download = True
if download:
log.info('Downloading {0}'.format(box_file))
local_box_file_tmp = self.box_stage.register(
local_box_file
)
box_file_link = os.sep.join(
[repo._get_mime_typed_uri(), box_file]
)
fetcher.wget(
url=box_file_link, filename=local_box_file_tmp
)
if download:
self.box_stage.commit()
for box_file in self.box_config.get_box_files():
local_box_file = os.sep.join([self.box_dir, box_file])
if box_file.endswith('.qcow2'):
self.system = local_box_file
if box_file.endswith('.tar.xz'):
self.kernel = self._extract_kernel_from_tarball(
local_box_file
)
if self.box_config.use_initrd():
self.initrd = self._extract_initrd_from_tarball(
local_box_file
)
return vm_setup_type(
system=self.system,
kernel=self.kernel,
initrd=self.initrd,
append='console={0} {1}'.format(
self.box_config.get_box_console(),
self.box_config.get_box_kernel_cmdline()
),
ram=self.box_config.get_box_memory_mbytes(),
smp=self.box_config.get_box_processors()
)
def _create_packages_checksum(self, filename: str, shasum: str):
with open(filename, 'w') as sha_file:
sha_file.write(shasum)
def _extract_kernel_from_tarball(self, tarfile: str) -> str:
Command.run(
[
'tar', '-C', self.box_dir,
'--transform', f's/.*/kernel.{self.arch}/',
'--wildcards', '-xf', tarfile, '*.kernel'
]
)
return os.sep.join([self.box_dir, f'kernel.{self.arch}'])
def _extract_initrd_from_tarball(self, tarfile: str) -> str:
Command.run(
[
'tar', '-C', self.box_dir,
'--transform', f's/.*/initrd.{self.arch}/',
'--wildcards', '-xf', tarfile, '*.initrd'
]
)
return os.sep.join([self.box_dir, f'initrd.{self.arch}'])
kiwi-boxed-plugin-0.2.31/kiwi_boxed_plugin/config/ 0000775 0000000 0000000 00000000000 14516463774 0022123 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/kiwi_boxed_plugin/config/__init__.py 0000664 0000000 0000000 00000000000 14516463774 0024222 0 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/kiwi_boxed_plugin/config/kiwi_boxed_plugin.yml 0000664 0000000 0000000 00000006570 14516463774 0026360 0 ustar 00root root 0000000 0000000 box:
-
name: tumbleweed
mem_mb: 8096
processors: 4
console: hvc0
arch:
-
name: x86_64
cmdline:
- root=/dev/vda1
- rd.plymouth=0
source: obs://Virtualization:Appliances:SelfContained:tumbleweed/images
packages_file: TumbleWeed-Box.x86_64-1.42.2-System-BuildBox.report
boxfiles:
- TumbleWeed-Box.x86_64-1.42.2-Kernel-BuildBox.tar.xz
- TumbleWeed-Box.x86_64-1.42.2-System-BuildBox.qcow2
use_initrd: true
-
name: leap
mem_mb: 8096
processors: 4
console: hvc0
arch:
-
name: x86_64
cmdline:
- root=/dev/vda1
- rd.plymouth=0
source: obs://Virtualization:Appliances:SelfContained:leap/images
packages_file: Leap-Box.x86_64-1.15.4-System-BuildBox.report
boxfiles:
- Leap-Box.x86_64-1.15.4-Kernel-BuildBox.tar.xz
- Leap-Box.x86_64-1.15.4-System-BuildBox.qcow2
use_initrd: true
-
name: fedora
mem_mb: 8096
processors: 4
console: hvc0
arch:
-
name: x86_64
cmdline:
- root=/dev/vda3
- rd.plymouth=0
- selinux=0
source: obs://Virtualization:Appliances:SelfContained:fedora/images
packages_file: Fedora-Box.x86_64-1.37.1-System-BuildBox.report
boxfiles:
- Fedora-Box.x86_64-1.37.1-Kernel-BuildBox.tar.xz
- Fedora-Box.x86_64-1.37.1-System-BuildBox.qcow2
use_initrd: true
-
name: ubuntu
mem_mb: 8096
processors: 4
console: hvc0
arch:
-
name: x86_64
cmdline:
- root=/dev/vda3
- rd.plymouth=0
- selinux=0
source: obs://Virtualization:Appliances:SelfContained:ubuntu/images
packages_file: Ubuntu-Box.x86_64-1.22.04-System-BuildBox.report
boxfiles:
- Ubuntu-Box.x86_64-1.22.04-Kernel-BuildBox.tar.xz
- Ubuntu-Box.x86_64-1.22.04-System-BuildBox.qcow2
use_initrd: true
-
name: aarch64
cmdline:
- root=/dev/vda2
- rd.plymouth=0
- selinux=0
source: obs://Virtualization:Appliances:SelfContained:ubuntu/images
packages_file: Ubuntu-Box.aarch64-1.22.04-System-BuildBox.report
boxfiles:
- Ubuntu-Box.aarch64-1.22.04-Kernel-BuildBox.tar.xz
- Ubuntu-Box.aarch64-1.22.04-System-BuildBox.qcow2
use_initrd: true
-
name: universal
mem_mb: 8096
processors: 4
console: hvc0
arch:
-
name: x86_64
cmdline:
- root=/dev/vda3
- rd.plymouth=0
- selinux=0
source: obs://Virtualization:Appliances:SelfContained:universal/images
packages_file: Universal-Box.x86_64-1.37.1-System-BuildBox.report
boxfiles:
- Universal-Box.x86_64-1.37.1-Kernel-BuildBox.tar.xz
- Universal-Box.x86_64-1.37.1-System-BuildBox.qcow2
use_initrd: true
-
name: aarch64
cmdline:
- root=/dev/vda2
- rd.plymouth=0
- selinux=0
source: obs://Virtualization:Appliances:SelfContained:universal/images
packages_file: Universal-Box.aarch64-1.37.1-System-BuildBox.report
boxfiles:
- Universal-Box.aarch64-1.37.1-Kernel-BuildBox.tar.xz
- Universal-Box.aarch64-1.37.1-System-BuildBox.qcow2
use_initrd: true
kiwi-boxed-plugin-0.2.31/kiwi_boxed_plugin/defaults.py 0000664 0000000 0000000 00000013544 14516463774 0023046 0 ustar 00root root 0000000 0000000 # Copyright (c) 2020 SUSE Software Solutions Germany GmbH. All rights reserved.
#
# This file is part of kiwi-boxed-build.
#
# kiwi-boxed-build is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# kiwi-boxed-build is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with kiwi-boxed-build. If not, see
#
import os
import pathlib
from typing import List
from kiwi.path import Path
from pkg_resources import resource_filename
import subprocess
from kiwi_boxed_plugin.exceptions import KiwiBoxPluginVirtioFsError
VIRTIOFSD_PROCESS_LIST = []
HOST_SSH_PORT_FORWARDED_TO_BOX = 10000
class Defaults:
"""
**Implements default values**
Provides static methods for default values and state information
"""
box_ssh_port_forwarded_to_host = 10022
@staticmethod
def get_plugin_config_file() -> str:
"""
Config file name: `kiwi_boxed_plugin.yml`
Locations are searched in this order:
1. ENV variable: $KIWI_BOXED_PLUGIN_CFG
full path to file, name is freely selectable
2. $PWD/kiwi_boxed_plugin.yml
3. $HOME/.config/kiwi/kiwi_boxed_plugin.yml
4. /etc/kiwi_boxed_plugin.yml
5. Resource (default config, coming with the package)
"""
config_name = "kiwi_boxed_plugin.yml"
# 1.
config_path_env: str | None = os.environ.get("KIWI_BOXED_PLUGIN_CFG")
if config_path_env is not None and os.path.exists(config_path_env):
return config_path_env
# 2.
config_path_pwd = os.path.abspath(config_name)
if os.path.exists(config_path_pwd):
return config_path_pwd
# 3.
config_path_home: pathlib.Path = pathlib.Path.home().joinpath(
f'.config/kiwi/{config_name}'
)
if config_path_home.exists():
return config_path_home.as_posix()
# 4.
config_path_system = f'/etc/{config_name}'
if os.path.exists(config_path_system):
return config_path_system
# 5.
return resource_filename(
'kiwi_boxed_plugin', f'config/{config_name}'
)
@staticmethod
def get_local_box_cache_dir() -> str:
return f'{os.environ.get("HOME")}/.kiwi_boxes'
@staticmethod
def get_qemu_generic_setup() -> List[str]:
return [
'-nographic',
'-nodefaults',
'-snapshot'
]
@staticmethod
def get_qemu_network_setup() -> List[str]:
return [
'-netdev',
f'user,id=user0,hostfwd=tcp::{Defaults.box_ssh_port_forwarded_to_host}-:22',
'-device', 'virtio-net-pci,netdev=user0'
]
@staticmethod
def get_qemu_shared_path_setup(
index: int, path: str, mount_tag: str, sharing_backend: str = '9p'
) -> List[str]:
shared_setup: List[str] = []
if sharing_backend == '9p':
shared_setup = Defaults.get_qemu_shared_path_setup_9p(
index, path, mount_tag
)
if sharing_backend == 'virtiofs':
shared_setup = Defaults.get_qemu_shared_path_setup_virtiofs(
index, path, mount_tag
)
return shared_setup
@staticmethod
def get_qemu_shared_path_setup_9p(
index: int, path: str, mount_tag: str
) -> List[str]:
return [
'-fsdev',
'local,security_model=mapped,id=fsdev{0},path={1}'.format(
index, path
),
'-device',
'virtio-9p-pci,id=fs{0},fsdev=fsdev{0},mount_tag={1}'.format(
index, mount_tag
)
]
@staticmethod
def get_qemu_shared_path_setup_virtiofs(
index: int, path: str, mount_tag: str
) -> List[str]:
virtiofsd_lookup_paths = ['/usr/lib', '/usr/libexec']
virtiofsd = Path.which(
'virtiofsd', virtiofsd_lookup_paths
)
if not virtiofsd:
raise KiwiBoxPluginVirtioFsError(
'virtiofsd not found in: {0}'.format(virtiofsd_lookup_paths)
)
try:
virtiofsd_process = subprocess.Popen(
[
virtiofsd,
'--socket-path=/tmp/vhostqemu_{0}'.format(index),
'-o', 'allow_root',
'-o', 'source={0}'.format(os.path.abspath(path)),
'-o', 'cache=always'
], close_fds=True
)
except Exception as issue:
raise KiwiBoxPluginVirtioFsError(
'Failed to start virtiofsd: {0}'.format(issue)
)
VIRTIOFSD_PROCESS_LIST.append(virtiofsd_process)
return [
'-chardev',
'socket,id=char{0},path=/tmp/vhostqemu_{0}'.format(index),
'-device',
'vhost-user-fs-pci,queue-size=1024,chardev=char{0},tag={1}'.format(
index, mount_tag
)
]
@staticmethod
def get_qemu_console_setup() -> List[str]:
return [
'-device', 'virtio-serial',
'-chardev', 'stdio,id=virtiocon0',
'-device', 'virtconsole,chardev=virtiocon0'
]
@staticmethod
def get_qemu_storage_setup(
image_file: str, snapshot: bool = True
) -> List[str]:
return [
'-drive',
'file={0},if=virtio,driver=qcow2,cache=off,snapshot={1}'.format(
image_file, 'on' if snapshot else 'off'
)
]
kiwi-boxed-plugin-0.2.31/kiwi_boxed_plugin/exceptions.py 0000664 0000000 0000000 00000003063 14516463774 0023413 0 ustar 00root root 0000000 0000000 # Copyright (c) 2020 SUSE Software Solutions Germany GmbH. All rights reserved.
#
# This file is part of kiwi-boxed-build.
#
# kiwi-boxed-build is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# kiwi-boxed-build is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with kiwi-boxed-build. If not, see
#
from kiwi.exceptions import KiwiError
class KiwiBoxPluginConfigError(KiwiError):
"""
Exception raised if the box config yaml file is invalid
"""
class KiwiBoxPluginBoxNameError(KiwiError):
"""
Exception raised if the boxname could not be found
"""
class KiwiBoxPluginVirtioFsError(KiwiError):
"""
Exception raised if virtiofsd does not start
"""
class KiwiBoxPluginArchNotFoundError(KiwiError):
"""
Exception raised if the selected architecture has no configuration
"""
class KiwiBoxPluginQEMUBinaryNotFound(KiwiError):
"""
Exception raised if no QEMU binary for the desired architecture
could be found
"""
class KiwiBoxPluginSSHPortInvalid(KiwiError):
"""
Exception raised if an invalid SSH port is passed as an argument
"""
kiwi-boxed-plugin-0.2.31/kiwi_boxed_plugin/plugin_config.py 0000664 0000000 0000000 00000004775 14516463774 0024070 0 ustar 00root root 0000000 0000000 # Copyright (c) 2020 SUSE Software Solutions Germany GmbH. All rights reserved.
#
# This file is part of kiwi-boxed-build.
#
# kiwi-boxed-build is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# kiwi-boxed-build is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with kiwi-boxed-build. If not, see
#
from cerberus import Validator
from typing import (
List, Dict
)
import logging
import yaml
from kiwi_boxed_plugin.plugin_config_schema import schema
from kiwi_boxed_plugin.defaults import Defaults
from kiwi_boxed_plugin.exceptions import KiwiBoxPluginConfigError
log = logging.getLogger('kiwi')
class PluginConfig:
"""
**Implements reading of box plugin config file:**
/etc/kiwi_boxed_plugin.yml
The KIWI boxed plugin box configuration file is a yaml
formatted file containing information about available
virtual disk images usable as build boxes
"""
def __init__(self) -> None:
self.config_data = {}
plugin_config_file = Defaults.get_plugin_config_file()
log.info('Reading box plugin config file: {0}'.format(
plugin_config_file)
)
try:
with open(plugin_config_file, 'r') as config:
self.config_data = yaml.safe_load(config)
except Exception as issue:
raise KiwiBoxPluginConfigError(issue)
validator = Validator(schema)
validator.validate(self.config_data, schema)
if validator.errors:
raise KiwiBoxPluginConfigError(
'Failed to validate {0}: {1}'.format(
plugin_config_file, validator.errors
)
)
def get_config(self) -> List[Dict]:
"""
Return config data dictionary
"""
return self.config_data.get('box') or []
def dump_config(self) -> str:
"""
Return config dump as pretty string for the console
"""
config_dump = ''
box_dict = self.config_data.get('box') or {}
if box_dict:
config_dump = yaml.dump(box_dict)
return config_dump
kiwi-boxed-plugin-0.2.31/kiwi_boxed_plugin/plugin_config_schema.py 0000664 0000000 0000000 00000004662 14516463774 0025403 0 ustar 00root root 0000000 0000000 schema = {
'box': {
'required': True,
'type': 'list',
'schema': {
'type': 'dict',
'schema': {
'name': {
'type': 'string',
'required': True,
'empty': False
},
'mem_mb': {
'type': 'number',
'required': True,
'empty': False
},
'processors': {
'type': 'number',
'required': False,
'empty': False
},
'console': {
'type': 'string',
'required': True,
'empty': False
},
'arch': {
'required': True,
'type': 'list',
'schema': {
'type': 'dict',
'schema': {
'name': {
'type': 'string',
'allowed':
['x86_64', 's390x', 'aarch64', 'ppc64'],
'required': True,
'empty': False
},
'cmdline': {
'type': 'list',
'required': True,
'nullable': False
},
'source': {
'type': 'string',
'required': True,
'empty': False
},
'packages_file': {
'type': 'string',
'required': True,
'empty': False
},
'boxfiles': {
'type': 'list',
'required': True,
'nullable': False
},
'use_initrd': {
'type': 'boolean',
'required': True
}
}
}
}
}
}
}
}
kiwi-boxed-plugin-0.2.31/kiwi_boxed_plugin/tasks/ 0000775 0000000 0000000 00000000000 14516463774 0022003 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/kiwi_boxed_plugin/tasks/__init__.py 0000664 0000000 0000000 00000000000 14516463774 0024102 0 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/kiwi_boxed_plugin/tasks/system_boxbuild.py 0000664 0000000 0000000 00000023562 14516463774 0025601 0 ustar 00root root 0000000 0000000 # Copyright (c) 2020 SUSE Software Solutions Germany GmbH. All rights reserved.
#
# This file is part of kiwi-boxed-build.
#
# kiwi-boxed-build is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# kiwi-boxed-build is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with kiwi-boxed-build. If not, see
#
"""
usage: kiwi-ng system boxbuild -h | --help
kiwi-ng system boxbuild --box=
[--box-memory=]
[--box-smp-cpus=]
[--box-debug]
[--kiwi-version=]
[--shared-path=]
[--no-update-check]
[--no-snapshot]
[--no-accel]
[--9p-sharing | --virtiofs-sharing | --sshfs-sharing]
[--ssh-key=]
[--ssh-port=]
[--x86_64 | --aarch64]
[--machine=]
[--cpu=]
-- ...
kiwi-ng system boxbuild --list-boxes
kiwi-ng system boxbuild help
commands:
boxbuild
build a system image in a self contained virtual machine,
where separator -- marks the start of arguments passed to
the build command.
options:
--box=
Name of the virtual machine that should be used for
the build process.
--list-boxes
show available build boxes.
--box-memory=
Number of GBs to reserve as main memory for the virtual
machine. By default 8GB will be used.
--box-smp-cpus=
Number of CPUs to use in the SMP setup. By default
4 CPUs will be used
--no-update-check
Skip check for available box update. The option has no
effect if the selected box does not yet exist on the host.
--no-snapshot
Run box with snapshot mode switched off. This causes the
box disk file to be modified by the build process and allows
to keep a persistent package cache as part of the box.
The option can be used to increase the build performance
due to data stored in the box which doesn't have to be
reloaded from the network. On the contrary this option
invalidates the immutable box attribute and should be
used with care. On update of the box all data stored
will be wiped. To prevent this combine the option with
the --no-update-check option.
--no-accel
Run box without hardware acceleration. By default KVM
acceleration is activated
--9p-sharing|--virtiofs-sharing|--sshfs-sharing
Select sharing backend to use for sharing data between the
host and the box. This can be either 9p, virtiofs or sshfs.
By default 9p is used
--ssh-key=
Name of ssh key to authorize for connection.
By default 'id_rsa' is used.
--ssh-port=
Port number to use to forward the guest's SSH port to the host
By default '10022' is used.
--x86_64|--aarch64
Select box for the given architecture. If no architecture
is selected the host architecture is used for selecting
the box. The selected box architecture also specifies the
target architecture for the image build with that box.
--box-debug
In debug mode the started virtual machine will be kept open
--kiwi-version=
Specify a KIWI version to use for the build. The referenced
KIWI will be fetched from pip and replaces the box installed
KIWI version. Note: If --no-snapshot is used in combination
with this option, the change of the KIWI version will be
permanently stored in the used box.
--shared-path=
Optional host path to share with the box. The same path
as it is present on the host will also be available inside
of the box during build time.
--machine=
Optional machine name used by QEMU. By default no specific
value is used here and qemu selects its default machine type.
For cross arch builds or for system architectures for which
QEMU defines no default like for Arm, it's required to specify
a machine name.
If you don’t care about reproducing the idiosyncrasies of
a particular bit of hardware, the best option is to use
the 'virt' machine type.
--cpu=
Optional CPU type used by QEMU. By default the host CPU
type is used which is only a good selection if the host
and the selected box are from the same architecture. On
cross arch builds it's required to specify the CPU
emulation the box should use
-- ...
List of command parameters as supported by the kiwi-ng
build command. The information given here is passed
along to the kiwi-ng system build command running in
the virtual machine.
"""
import logging
import os
from docopt import docopt
from typing import List
from kiwi.tasks.base import CliTask
from kiwi.help import Help
import kiwi.tasks.system_build
from kiwi_boxed_plugin.box_build import BoxBuild
from kiwi_boxed_plugin.plugin_config import PluginConfig
log = logging.getLogger('kiwi')
class SystemBoxbuildTask(CliTask):
def process(self) -> None:
self.manual = Help()
if self.command_args.get('help') is True:
return self.manual.show('kiwi::system::boxbuild')
elif self.command_args.get('--list-boxes'):
print(PluginConfig().dump_config())
elif self.command_args.get('--box'):
request_update_check = not self.command_args.get(
'--no-update-check'
)
request_snapshot_mode = not self.command_args.get(
'--no-snapshot'
)
keep_open = self.command_args.get('--box-debug')
kiwi_version = self.command_args.get('--kiwi-version')
shared_path = self.command_args.get('--shared-path')
box_build = BoxBuild(
boxname=self.command_args.get('--box'),
ram=self.command_args.get('--box-memory'),
smp=self.command_args.get('--box-smp-cpus'),
arch=self._get_box_arch(),
machine=self.command_args.get('--machine'),
cpu=self.command_args.get('--cpu') or 'host',
sharing_backend=self._get_sharing_backend(),
ssh_key=self.command_args.get('--ssh-key') or 'id_rsa',
ssh_port=self.command_args.get('--ssh-port') or '',
accel=not bool(self.command_args.get('--no-accel'))
)
box_build.run(
self._validate_kiwi_build_command(),
request_update_check,
request_snapshot_mode,
keep_open,
kiwi_version,
shared_path
)
def _validate_kiwi_build_command(self) -> List[str]:
# construct build command from given command line
kiwi_build_command = [
'system', 'build'
]
kiwi_build_command += self.command_args.get(
''
)
if '--' in kiwi_build_command:
kiwi_build_command.remove('--')
# validate build command through docopt from the original
# kiwi.tasks.system_build docopt information
log.info(
'Validating kiwi_build_command_args:{0} {1}'.format(
os.linesep, kiwi_build_command
)
)
validated_build_command = docopt(
doc=kiwi.tasks.system_build.__doc__,
argv=kiwi_build_command
)
# rebuild kiwi build command from validated docopt parser result
kiwi_build_command = [
'system', 'build'
]
for option, value in validated_build_command.items():
if option.startswith('-') and value:
if isinstance(value, bool):
kiwi_build_command.append(option)
elif isinstance(value, str):
kiwi_build_command.extend([option, value])
elif isinstance(value, list):
for element in value:
kiwi_build_command.extend([option, element])
final_kiwi_build_command = []
if self.global_args.get('--debug'):
final_kiwi_build_command.append('--debug')
if self.global_args.get('--type'):
final_kiwi_build_command.append('--type')
final_kiwi_build_command.append(self.global_args.get('--type'))
if self.global_args.get('--profile'):
for profile in sorted(set(self.global_args.get('--profile'))):
final_kiwi_build_command.append('--profile')
final_kiwi_build_command.append(profile)
final_kiwi_build_command += kiwi_build_command
log.info(
'Building with:{0} {1}'.format(
os.linesep, final_kiwi_build_command
)
)
return final_kiwi_build_command
def _get_box_arch(self) -> str:
box_arch = ''
if self.command_args.get('--x86_64'):
box_arch = 'x86_64'
elif self.command_args.get('--aarch64'):
box_arch = 'aarch64'
return box_arch
def _get_sharing_backend(self) -> str:
backend = self.command_args.get('--virtiofs-sharing')
if backend:
return 'virtiofs'
backend = self.command_args.get('--sshfs-sharing')
if backend:
return 'sshfs'
return '9p'
kiwi-boxed-plugin-0.2.31/kiwi_boxed_plugin/utils/ 0000775 0000000 0000000 00000000000 14516463774 0022016 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/kiwi_boxed_plugin/utils/dir_files.py 0000664 0000000 0000000 00000005712 14516463774 0024335 0 ustar 00root root 0000000 0000000 # Copyright (c) 2020 SUSE Software Solutions Germany GmbH. All rights reserved.
#
# This file is part of kiwi-boxed-build.
#
# kiwi-boxed-build is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# kiwi-boxed-build is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with kiwi-boxed-build. If not, see
#
import os
from tempfile import NamedTemporaryFile
from typing import Dict
from kiwi.path import Path
from kiwi.command import Command
class DirFiles:
"""
**Directory File Manager**
Connects registered files to a named temporary file
and updates the contents of the given directory with
the registered files in an atomic operation
"""
def __init__(self, dirname: str) -> None:
self.dirname = dirname
self.dirname_tmp = ''.join(
[self.dirname, '.tmp']
)
self.dirname_wipe = ''.join(
[self.dirname, '.wipe']
)
self.collection: Dict[str, str] = {}
Path.wipe(self.dirname_tmp)
def register(self, filename: str) -> str:
"""
Register given filename to be handled as a temporary
file. The given filename gets overwritten with the
contents of the temporary file on call of the commit
method
:param string filename: file path name
:return: name of created temporary file
:rtype: string
"""
tmpfile = NamedTemporaryFile()
self.collection[os.path.basename(filename)] = tmpfile.name
return tmpfile.name
def commit(self) -> None:
"""
Update instance directory with contents of registered files
Use an atomic operation that prepares a tmp directory with
all registered files and move it to the directory given at
instance creation time. Please note the operation is not
fully atomic as it uses two move commands in a series
"""
Path.create(self.dirname_tmp)
bash_command = [
'cp', '-a', f'{self.dirname}/*', self.dirname_tmp
]
Command.run(
['bash', '-c', ' '.join(bash_command)], raise_on_error=False
)
for origin, tmpname in list(self.collection.items()):
Command.run(
['mv', tmpname, os.sep.join([self.dirname_tmp, origin])]
)
Command.run(
['mv', self.dirname, self.dirname_wipe]
)
Command.run(
['mv', self.dirname_tmp, self.dirname]
)
Command.run(
['rm', '-rf', self.dirname_wipe]
)
kiwi-boxed-plugin-0.2.31/kiwi_boxed_plugin/utils/fetch_files.py 0000664 0000000 0000000 00000004225 14516463774 0024646 0 ustar 00root root 0000000 0000000 # Copyright (c) 2021 SUSE Software Solutions Germany GmbH. All rights reserved.
#
# This file is part of kiwi-boxed-build.
#
# kiwi-boxed-build is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# kiwi-boxed-build is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with kiwi-boxed-build. If not, see
#
import requests
try:
import progressbar2 as progressbar
except ImportError:
import progressbar
import requests.packages.urllib3
class FetchFiles:
"""
**Fetch File Manager**
Fetches file(s) from a given URL to the local system
"""
def __init__(self) -> None:
requests.packages.urllib3.disable_warnings()
def wget(self, url: str, filename: str, chunk_size: int = 4096) -> None:
"""
Download content of given url to filename
:param str url: URI
:param str filename: local file path name
"""
response = requests.request(
'GET', url, stream=True, data=None, headers=None
)
widgets = [
'Loading: ', progressbar.Percentage(), ' ',
progressbar.Bar(marker='#', left='[', right=']'), ' ',
progressbar.ETA(), ' ',
progressbar.FileTransferSpeed()
]
progress = progressbar.ProgressBar(
maxval=int(response.headers.get('Content-Length') or ''),
widgets=widgets
).start()
processed = 0
with open(filename, 'wb') as data:
for chunk in response.iter_content(chunk_size=chunk_size):
if chunk:
data.write(chunk)
data.flush()
processed += len(chunk)
progress.update(processed)
progress.finish()
kiwi-boxed-plugin-0.2.31/kiwi_boxed_plugin/version.py 0000664 0000000 0000000 00000001604 14516463774 0022716 0 ustar 00root root 0000000 0000000 # Copyright (c) 2020 SUSE Software Solutions Germany GmbH. All rights reserved.
#
# This file is part of kiwi-boxed-build.
#
# kiwi-boxed-build is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# kiwi-boxed-build is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with kiwi-boxed-build. If not, see
#
"""
Global version information used in kiwi-boxed-build and the package
"""
__version__ = '0.2.31'
__githash__ = '$Format:%H$'
kiwi-boxed-plugin-0.2.31/package/ 0000775 0000000 0000000 00000000000 14516463774 0016547 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/package/python-kiwi_boxed_plugin-rpmlintrc 0000664 0000000 0000000 00000000504 14516463774 0025522 0 ustar 00root root 0000000 0000000 # don't check for buildroot usage, kiwi's Makefile uses the same var name
addFilter("rpm-buildroot-usage .*")
# don't check position-independent-executable
addFilter("position-independent-executable-suggested .*")
# don't check for file duplicates
addFilter("files-duplicate .*")
addFilter("cross-directory-hard-link .*")
kiwi-boxed-plugin-0.2.31/package/python-kiwi_boxed_plugin-spec-template 0000664 0000000 0000000 00000007363 14516463774 0026265 0 ustar 00root root 0000000 0000000 #
# spec file for package kiwi_boxed_plugin
#
# Copyright (c) 2020 SUSE Software Solutions Germany GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
#
# Please submit bugfixes or comments via:
#
# https://github.com/OSInside/kiwi-boxed-plugin/issues
#
# If they aren't provided by a system installed macro, define them
%{!?_defaultdocdir: %global _defaultdocdir %{_datadir}/doc}
%{!?__python3: %global __python3 /usr/bin/python3}
%if %{undefined python3_sitelib}
%global python3_sitelib %(%{__python3} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")
%endif
%if 0%{?el7}
%global python3_pkgversion 36
%else
%{!?python3_pkgversion:%global python3_pkgversion 3}
%endif
%if 0%{?debian} || 0%{?ubuntu}
%global is_deb 1
%global pygroup python
%global sysgroup admin
%global develsuffix dev
%else
%global pygroup Development/Languages/Python
%global sysgroup System/Management
%global develsuffix devel
%endif
Name: python-kiwi_boxed_plugin
Version: %%VERSION
Release: 0
Url: https://github.com/OSInside/kiwi-boxed-plugin
Summary: KIWI - Boxed Build Plugin
License: GPL-3.0-or-later
%if "%{_vendor}" == "debbuild"
# Needed to set Maintainer in output debs
Packager: Marcus Schaefer
%endif
Group: %{pygroup}
Source: python-kiwi-boxed-plugin.tar.gz
Source1: %{name}-rpmlintrc
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: python%{python3_pkgversion}-%{develsuffix}
BuildRequires: python%{python3_pkgversion}-setuptools
BuildRequires: fdupes
BuildArch: noarch
%description
The KIWI boxed plugin provides support for self contained building
of images based on fast booting VM images
# python3-kiwi_boxed_plugin
%package -n python%{python3_pkgversion}-kiwi_boxed_plugin
Summary: KIWI - Boxed Build Plugin
Group: Development/Languages/Python
Requires: python%{python3_pkgversion}-docopt
Requires: python%{python3_pkgversion}-kiwi >= 9.21.21
Requires: python%{python3_pkgversion}-requests
Requires: python%{python3_pkgversion}-setuptools
Requires: python%{python3_pkgversion}-progressbar2
%if 0%{?ubuntu} || 0%{?debian}
Requires: python%{python3_pkgversion}-yaml
%else
Requires: python%{python3_pkgversion}-PyYAML
%endif
%if 0%{?suse_version}
Requires: python%{python3_pkgversion}-Cerberus
%else
Requires: python%{python3_pkgversion}-cerberus
%endif
Requires: qemu-kvm
%description -n python%{python3_pkgversion}-kiwi_boxed_plugin
The KIWI boxed plugin provides support for self contained building
of images based on fast booting VM images
%prep
%setup -q -n kiwi_boxed_plugin-%{version}
%build
# Build Python 3 version
python3 setup.py build
%install
# Install Python 3 version
python3 setup.py install --prefix=%{_prefix} --root=%{buildroot} %{?is_deb:--install-layout=deb}
# Install man pages and package documentation
make buildroot=%{buildroot}/ docdir=%{_defaultdocdir}/ install
%files -n python%{python3_pkgversion}-kiwi_boxed_plugin
%dir %{_defaultdocdir}/python-kiwi_boxed_plugin
%{python3_sitelib}/kiwi_boxed_plugin*
%{_defaultdocdir}/python-kiwi_boxed_plugin/LICENSE
%{_defaultdocdir}/python-kiwi_boxed_plugin/README
%doc %{_mandir}/man8/*
%changelog
kiwi-boxed-plugin-0.2.31/package/python-kiwi_boxed_plugin.changes 0000664 0000000 0000000 00000000353 14516463774 0025123 0 ustar 00root root 0000000 0000000 commit f6c2360e1c8608094eba198a48cd33b328f5d803
Author: Marcus Schäfer
AuthorDate: Wed Apr 1 10:10:25 2020 +0200
Commit: Marcus Schäfer
CommitDate: Wed Apr 1 10:10:25 2020 +0200
Initial commit
kiwi-boxed-plugin-0.2.31/setup.cfg 0000664 0000000 0000000 00000000735 14516463774 0017002 0 ustar 00root root 0000000 0000000 [sdist]
# Used by setup.py sdist
formats=gztar
[tool:pytest]
norecursedirs = .git build .tox/ .tmp/
addopts = --ignore=.tmp/ --ignore=.git/ --ignore=.tox/ -p no:warnings
testpaths = test/unit
[flake8]
# For error codes, see
# http://pep8.readthedocs.org/en/latest/intro.html#error-codes
#
# we allow long lines (E501)
ignore = E501
[doc8]
max-line-length = 90
verbose = 1
[mypy]
ignore_missing_imports = True
[mypy-requests.packages.urllib3]
ignore_missing_imports = True
kiwi-boxed-plugin-0.2.31/setup.py 0000775 0000000 0000000 00000003214 14516463774 0016671 0 ustar 00root root 0000000 0000000 #!/usr/bin/env python
# -*- encoding: utf-8 -*-
from os import path
from setuptools import setup
from kiwi_boxed_plugin.version import __version__
here = path.abspath(path.dirname(__file__))
with open(path.join(here, 'README.rst'), encoding='utf-8') as readme:
long_description = readme.read()
config = {
'name': 'kiwi_boxed_plugin',
'long_description': long_description,
'long_description_content_type': 'text/x-rst',
'description': 'KIWI - Boxed Build Plugin',
'author': 'Marcus Schaefer',
'url': 'https://github.com/OSInside/kiwi-boxed-plugin',
'download_url':
'https://download.opensuse.org/repositories/'
'Virtualization:/Appliances:/Builder',
'author_email': 'ms@suse.com',
'version': __version__,
'license' : 'GPLv3+',
'install_requires': [
'docopt',
'kiwi>=9.21.21',
'requests',
'PyYAML',
'cerberus',
'progressbar2'
],
'packages': ['kiwi_boxed_plugin'],
'entry_points': {
'kiwi.tasks': [
'system_boxbuild=kiwi_boxed_plugin.tasks.system_boxbuild'
]
},
'include_package_data': True,
'zip_safe': False,
'classifiers': [
# classifier: http://pypi.python.org/pypi?%3Aaction=list_classifiers
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: '
'GNU General Public License v3 or later (GPLv3+)',
'Operating System :: POSIX :: Linux',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Topic :: System :: Operating System',
]
}
setup(**config)
kiwi-boxed-plugin-0.2.31/test/ 0000775 0000000 0000000 00000000000 14516463774 0016133 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/test/data/ 0000775 0000000 0000000 00000000000 14516463774 0017044 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/test/data/kiwi_boxed_plugin.yml 0000664 0000000 0000000 00000002662 14516463774 0023277 0 ustar 00root root 0000000 0000000 box:
-
name: suse
mem_mb: 8096
processors: 4
console: hvc0
arch:
-
name: x86_64
cmdline:
- root=/dev/vda1
- rd.plymouth=0
source: obs://Virtualization:Appliances:SelfContained:suse/images
packages_file: SUSE-Box.x86_64-1.42.1-System-BuildBox.report
boxfiles:
- SUSE-Box.x86_64-1.42.1-Kernel-BuildBox.tar.xz
- SUSE-Box.x86_64-1.42.1-System-BuildBox.qcow2
use_initrd: true
-
name: universal
mem_mb: 8096
processors: 4
console: hvc0
arch:
-
name: x86_64
cmdline:
- root=/dev/vda3
- rd.plymouth=0
- selinux=0
source: obs://Virtualization:Appliances:SelfContained:universal/images
packages_file: Universal-Box.x86_64-1.1.2-System-BuildBox.report
boxfiles:
- Universal-Box.x86_64-1.1.2-Kernel-BuildBox.tar.xz
- Universal-Box.x86_64-1.1.2-System-BuildBox.qcow2
use_initrd: true
-
name: aarch64
cmdline:
- root=/dev/vda2
- rd.plymouth=0
- selinux=0
source: obs://Virtualization:Appliances:SelfContained:universal/images
packages_file: Universal-Box.aarch64-1.1.2-System-BuildBox.report
boxfiles:
- Universal-Box.aarch64-1.1.2-Kernel-BuildBox.tar.xz
- Universal-Box.aarch64-1.1.2-System-BuildBox.qcow2
use_initrd: true
kiwi-boxed-plugin-0.2.31/test/data/kiwi_boxed_plugin_invalid.yml 0000664 0000000 0000000 00000000027 14516463774 0024776 0 ustar 00root root 0000000 0000000 box:
-
foo: suse
kiwi-boxed-plugin-0.2.31/test/data/target/ 0000775 0000000 0000000 00000000000 14516463774 0020332 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/test/data/target/result.code 0000664 0000000 0000000 00000000002 14516463774 0022474 0 ustar 00root root 0000000 0000000 1
kiwi-boxed-plugin-0.2.31/test/unit/ 0000775 0000000 0000000 00000000000 14516463774 0017112 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/test/unit/.coveragerc 0000664 0000000 0000000 00000000100 14516463774 0021222 0 ustar 00root root 0000000 0000000 [run]
omit =
*/version.py
[report]
omit =
*/version.py
kiwi-boxed-plugin-0.2.31/test/unit/__init__.py 0000664 0000000 0000000 00000000000 14516463774 0021211 0 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/test/unit/box_build_test.py 0000664 0000000 0000000 00000036704 14516463774 0022504 0 ustar 00root root 0000000 0000000 import logging
from mock import (
patch, Mock, call
)
from pytest import raises
from kiwi_boxed_plugin.box_build import BoxBuild
import kiwi_boxed_plugin.defaults as defaults
from kiwi_boxed_plugin.exceptions import (
KiwiBoxPluginVirtioFsError,
KiwiBoxPluginQEMUBinaryNotFound,
KiwiBoxPluginSSHPortInvalid,
KiwiError
)
log = logging.getLogger('kiwi')
log.setLevel('INFO')
class TestBoxBuild:
@patch('kiwi_boxed_plugin.box_build.BoxDownload')
def setup(self, mock_BoxDownload):
self.box = Mock()
self.vm_setup = Mock()
self.vm_setup.kernel = 'kernel'
self.vm_setup.append = 'append'
self.vm_setup.system = 'system'
self.vm_setup.initrd = 'initrd'
self.vm_setup.ram = 4096
self.vm_setup.smp = 4
self.box.fetch.return_value = self.vm_setup
mock_BoxDownload.return_value = self.box
self.build = BoxBuild(
boxname='suse', arch='x86_64'
)
self.build_arm = BoxBuild(
boxname='universal', arch='aarch64',
machine='virt', cpu='cortex-a57'
)
@patch('kiwi_boxed_plugin.box_build.BoxDownload')
def setup_method(self, cls, mock_BoxDownload):
self.setup()
@patch('os.environ')
@patch('os.system')
@patch('kiwi_boxed_plugin.box_build.Path.create')
@patch('kiwi_boxed_plugin.box_build.Path.which')
def test_raises_on_kiwi_error(
self, mock_path_which, mock_path_create,
mock_os_system, mock_os_environ
):
mock_path_which.return_value = 'qemu-system-x86_64'
with raises(KiwiError):
self.build.run(
[
'--type', 'oem', 'system', 'build',
'--description', 'desc', '--target-dir', '../data/target'
]
)
@patch('os.environ')
@patch('os.system')
@patch('kiwi_boxed_plugin.box_build.Path.create')
@patch('kiwi_boxed_plugin.box_build.Path.which')
def test_raises_on_invalid_ssh_port(
self, mock_path_which, mock_path_create,
mock_os_system, mock_os_environ
):
mock_path_which.return_value = 'qemu-system-x86_64'
self.build.ssh_port = 'bogus'
with raises(KiwiBoxPluginSSHPortInvalid):
self.build.run(
[
'--debug', '--type', 'oem', 'system', 'build',
'--description', 'desc', '--target-dir', 'target'
]
)
@patch('os.environ')
@patch('os.system')
@patch('kiwi_boxed_plugin.box_build.Path.create')
@patch('kiwi_boxed_plugin.box_build.Path.which')
def test_run_with_9p_sharing(
self, mock_path_which, mock_path_create,
mock_os_system, mock_os_environ
):
mock_path_which.return_value = 'qemu-system-x86_64'
self.build.run(
[
'--debug', '--type', 'oem', 'system', 'build',
'--description', 'desc', '--target-dir', 'target'
],
keep_open=True,
kiwi_version='9.22.1',
custom_shared_path='/var/tmp/repos'
)
mock_path_create.assert_called_once_with('target')
mock_os_system.assert_called_once_with(
'qemu-system-x86_64 '
'-m 4096 '
'-accel accel=kvm '
'-cpu host '
'-nographic '
'-nodefaults '
'-snapshot '
'-kernel kernel '
'-append "append kiwi=\\"--debug --type oem system build\\"'
' kiwi-no-halt kiwi_version=_9.22.1_'
' custom_mount=_/var/tmp/repos_'
' sharing_backend=_9p_" '
'-drive file=system,if=virtio,driver=qcow2,cache=off,snapshot=on '
'-netdev user,id=user0,hostfwd=tcp::10022-:22 '
'-device virtio-net-pci,netdev=user0 '
'-device virtio-serial '
'-chardev stdio,id=virtiocon0 '
'-device virtconsole,chardev=virtiocon0 '
'-fsdev local,security_model=mapped,id=fsdev0,path=desc '
'-device virtio-9p-pci,id=fs0,fsdev=fsdev0,mount_tag='
'kiwidescription '
'-fsdev local,security_model=mapped,id=fsdev1,path=target '
'-device virtio-9p-pci,id=fs1,fsdev=fsdev1,mount_tag='
'kiwibundle '
'-fsdev local,security_model=mapped,id=fsdev2,path=/var/tmp/repos '
'-device virtio-9p-pci,id=fs2,fsdev=fsdev2,mount_tag='
'custompath '
'-initrd initrd '
'-smp 4'
)
@patch('os.environ')
@patch('os.system')
@patch('kiwi_boxed_plugin.box_build.Path.create')
@patch('kiwi_boxed_plugin.box_build.Path.which')
def test_run_cross_arch_aarch64_on_x86_64(
self, mock_path_which, mock_path_create,
mock_os_system, mock_os_environ
):
mock_path_which.return_value = 'qemu-system-aarch64'
self.build_arm.run(
[
'--type', 'oem', 'system', 'build',
'--description', 'desc', '--target-dir', 'target'
],
keep_open=True,
kiwi_version='9.22.1',
custom_shared_path='/var/tmp/repos'
)
mock_path_create.assert_called_once_with('target')
mock_os_system.assert_called_once_with(
'qemu-system-aarch64 '
'-m 4096 '
'-machine virt '
'-accel accel=kvm '
'-cpu cortex-a57 '
'-nographic '
'-nodefaults '
'-snapshot '
'-kernel kernel '
'-append "append kiwi=\\"--type oem system build\\"'
' kiwi-no-halt kiwi_version=_9.22.1_'
' custom_mount=_/var/tmp/repos_'
' sharing_backend=_9p_" '
'-drive file=system,if=virtio,driver=qcow2,cache=off,snapshot=on '
'-netdev user,id=user0,hostfwd=tcp::10022-:22 '
'-device virtio-net-pci,netdev=user0 '
'-device virtio-serial '
'-chardev stdio,id=virtiocon0 '
'-device virtconsole,chardev=virtiocon0 '
'-fsdev local,security_model=mapped,id=fsdev0,path=desc '
'-device virtio-9p-pci,id=fs0,fsdev=fsdev0,mount_tag='
'kiwidescription '
'-fsdev local,security_model=mapped,id=fsdev1,path=target '
'-device virtio-9p-pci,id=fs1,fsdev=fsdev1,mount_tag='
'kiwibundle '
'-fsdev local,security_model=mapped,id=fsdev2,path=/var/tmp/repos '
'-device virtio-9p-pci,id=fs2,fsdev=fsdev2,mount_tag='
'custompath '
'-initrd initrd '
'-smp 4'
)
@patch('os.environ')
@patch('os.system')
@patch('kiwi_boxed_plugin.box_build.Path.create')
@patch('kiwi_boxed_plugin.box_build.Path.which')
def test_run_raises_no_qemu_binary_found(
self, mock_path_which, mock_path_create,
mock_os_system, mock_os_environ
):
mock_path_which.return_value = None
with raises(KiwiBoxPluginQEMUBinaryNotFound):
self.build.run(
[
'--type', 'oem', 'system', 'build',
'--description', 'desc', '--target-dir', 'target'
],
keep_open=True,
kiwi_version='9.22.1',
custom_shared_path='/var/tmp/repos'
)
@patch('os.environ')
@patch('os.system')
@patch('subprocess.Popen')
@patch('kiwi_boxed_plugin.box_build.Path.create')
@patch('kiwi_boxed_plugin.defaults.Path.which')
def test_run_with_virtiofs_sharing_raises(
self, mock_path_which, mock_path_create, mock_subprocess_Popen,
mock_os_system, mock_os_environ
):
path_which_results = [None, 'qemu-system-x86_64']
def path_which(name, lookup=None):
return path_which_results.pop()
mock_path_which.side_effect = path_which
self.build.sharing_backend = 'virtiofs'
with raises(KiwiBoxPluginVirtioFsError):
self.build.run(
[
'--type', 'oem', 'system', 'build',
'--description', 'desc', '--target-dir', 'target'
]
)
path_which_results = ['virtiofsd', 'qemu-system-x86_64']
mock_subprocess_Popen.side_effect = Exception
with raises(KiwiBoxPluginVirtioFsError):
self.build.run(
[
'--type', 'oem', 'system', 'build',
'--description', 'desc', '--target-dir', 'target'
]
)
@patch('os.environ')
@patch('os.system')
@patch('os.path.abspath')
@patch('subprocess.Popen')
@patch('kiwi_boxed_plugin.box_build.Path.create')
@patch('kiwi_boxed_plugin.defaults.Path.which')
def test_run_with_virtiofs_sharing(
self, mock_path_which, mock_path_create, mock_subprocess_Popen,
mock_os_path_abspath, mock_os_system, mock_os_environ
):
def abs_path(arg):
return 'abspath/{0}'.format(arg)
def new_process(self, **args):
return Mock()
def path_which(name, lookup=None):
if name == 'qemu-system-x86_64':
return 'qemu-system-x86_64'
elif name == 'virtiofsd':
return '/usr/libexec/virtiofsd'
mock_path_which.side_effect = path_which
mock_os_path_abspath.side_effect = abs_path
mock_subprocess_Popen.side_effect = new_process
self.build.sharing_backend = 'virtiofs'
self.build.run(
[
'--type', 'oem', 'system', 'build',
'--description', 'desc', '--target-dir', 'target'
],
keep_open=True,
kiwi_version='9.22.1',
custom_shared_path='var/tmp/repos'
)
mock_path_create.assert_called_once_with('target')
mock_os_system.assert_called_once_with(
'qemu-system-x86_64 '
'-m 4096 '
'-accel accel=kvm '
'-cpu host '
'-nographic '
'-nodefaults '
'-snapshot '
'-kernel kernel '
'-append "append kiwi=\\"--type oem system build\\"'
' kiwi-no-halt kiwi_version=_9.22.1_'
' custom_mount=_var/tmp/repos_'
' sharing_backend=_virtiofs_" '
'-drive file=system,if=virtio,driver=qcow2,cache=off,snapshot=on '
'-netdev user,id=user0,hostfwd=tcp::10022-:22 '
'-device virtio-net-pci,netdev=user0 '
'-device virtio-serial '
'-chardev stdio,id=virtiocon0 '
'-device virtconsole,chardev=virtiocon0 '
'-chardev socket,id=char0,path=/tmp/vhostqemu_0 '
'-device vhost-user-fs-pci,queue-size=1024,chardev=char0,tag='
'kiwidescription '
'-chardev socket,id=char1,path=/tmp/vhostqemu_1 '
'-device vhost-user-fs-pci,queue-size=1024,chardev=char1,tag='
'kiwibundle '
'-chardev socket,id=char2,path=/tmp/vhostqemu_2 '
'-device vhost-user-fs-pci,queue-size=1024,chardev=char2,tag='
'custompath '
'-object '
'memory-backend-file,id=mem,size=4096,mem-path=/dev/shm,share=on '
'-numa node,memdev=mem '
'-initrd initrd '
'-smp 4'
)
assert mock_subprocess_Popen.call_args_list == [
call(
[
'/usr/libexec/virtiofsd',
'--socket-path=/tmp/vhostqemu_0',
'-o', 'allow_root',
'-o', 'source=abspath/desc',
'-o', 'cache=always'
], close_fds=True
),
call(
[
'/usr/libexec/virtiofsd',
'--socket-path=/tmp/vhostqemu_1',
'-o', 'allow_root',
'-o', 'source=abspath/target',
'-o', 'cache=always'
], close_fds=True
),
call(
[
'/usr/libexec/virtiofsd',
'--socket-path=/tmp/vhostqemu_2',
'-o', 'allow_root',
'-o', 'source=abspath/var/tmp/repos',
'-o', 'cache=always'
], close_fds=True
)
]
for virtiofsd_process in defaults.VIRTIOFSD_PROCESS_LIST:
virtiofsd_process.terminate.assert_called_once_with()
@patch('pwd.getpwuid')
@patch('time.sleep')
@patch('os.path.isfile')
@patch('os.system')
@patch('kiwi_boxed_plugin.box_build.Command.run')
@patch('kiwi_boxed_plugin.box_build.Path.create')
@patch('kiwi_boxed_plugin.defaults.Path.which')
def test_run_with_sshfs_sharing(
self, mock_path_which, mock_path_create, mock_Command_run,
mock_os_system, mock_os_path_isfile, mock_time_sleep,
mock_pwd_getpwuid
):
def command_run(args, raise_on_error=True):
if args[0] == 'ssh':
raise Exception
def path_which(name, lookup=None):
if name == 'qemu-system-x86_64':
return 'qemu-system-x86_64'
mock_path_which.side_effect = path_which
mock_Command_run.side_effect = command_run
mock_pwd_getpwuid.return_value.pw_name = 'user'
mock_os_path_isfile.return_value = True
self.build.sharing_backend = 'sshfs'
self.build.ssh_port = '10022'
with patch('builtins.open', create=True) as mock_open:
with patch.dict('os.environ', {'HOME': '~'}):
file_handle = mock_open.return_value.__enter__.return_value
file_handle.read.return_value = 'key_type key_value'
self.build.run(
[
'--type', 'oem', 'system', 'build',
'--description', 'desc', '--target-dir', 'target'
],
keep_open=True,
kiwi_version='9.22.1',
custom_shared_path='var/tmp/repos'
)
mock_path_create.assert_called_once_with('target')
mock_os_system.assert_called_once_with(
'qemu-system-x86_64 '
'-m 4096 '
'-accel accel=kvm '
'-cpu host '
'-nographic '
'-nodefaults '
'-snapshot '
'-kernel kernel '
'-append "append kiwi=\\"--type oem system build\\"'
' kiwi-no-halt kiwi_version=_9.22.1_'
' custom_mount=_var/tmp/repos_'
' ssh_key=_key_value_'
' ssh_key_type=_key_type_'
' host_kiwidescription=_user@localhost:desc_'
' host_kiwibundle=_user@localhost:target_'
' host_custompath=_user@localhost:var/tmp/repos_'
' sharing_backend=_sshfs_" '
'-drive file=system,if=virtio,driver=qcow2,cache=off,snapshot=on '
'-netdev user,id=user0,hostfwd=tcp::10022-:22 '
'-device virtio-net-pci,netdev=user0 '
'-device virtio-serial '
'-chardev stdio,id=virtiocon0 '
'-device virtconsole,chardev=virtiocon0 '
'-initrd initrd '
'-smp 4'
)
assert mock_Command_run.call_args_list[0] == call(
[
'ssh-keygen', '-R', '[localhost]:10022'
], raise_on_error=False
)
assert mock_Command_run.call_args_list[1] == call(
[
'ssh', '-NT', '-o', 'StrictHostKeyChecking=no',
'root@localhost', '-p', '10022', '-R',
'10000:localhost:22'
]
)
kiwi-boxed-plugin-0.2.31/test/unit/box_config_test.py 0000664 0000000 0000000 00000006167 14516463774 0022652 0 ustar 00root root 0000000 0000000 from mock import patch
from pytest import raises
from kiwi_boxed_plugin.box_config import BoxConfig
from kiwi_boxed_plugin.exceptions import (
KiwiBoxPluginConfigError,
KiwiBoxPluginBoxNameError,
KiwiBoxPluginArchNotFoundError
)
class TestBoxConfig:
@patch('kiwi_boxed_plugin.defaults.Defaults.get_plugin_config_file')
@patch('platform.machine')
def setup(self, mock_platform_machine, mock_get_plugin_config_file):
mock_platform_machine.return_value = 'x86_64'
mock_get_plugin_config_file.return_value = \
'../data/kiwi_boxed_plugin.yml'
self.box_config = BoxConfig('suse')
@patch('kiwi_boxed_plugin.defaults.Defaults.get_plugin_config_file')
@patch('platform.machine')
def setup_method(
self, cls, mock_platform_machine, mock_get_plugin_config_file
):
self.setup()
@patch('yaml.safe_load')
@patch('kiwi_boxed_plugin.defaults.Defaults.get_plugin_config_file')
def test_setup_raises_on_load_config(
self, mock_get_plugin_config_file, mock_yaml_safe_load
):
mock_get_plugin_config_file.return_value = \
'../data/kiwi_boxed_plugin.yml'
mock_yaml_safe_load.side_effect = Exception
with raises(KiwiBoxPluginConfigError):
BoxConfig('suse')
@patch('kiwi_boxed_plugin.defaults.Defaults.get_plugin_config_file')
def test_setup_raises_on_unsupported_arch(
self, mock_get_plugin_config_file
):
mock_get_plugin_config_file.return_value = \
'../data/kiwi_boxed_plugin.yml'
with raises(KiwiBoxPluginArchNotFoundError):
BoxConfig('suse', 'artificial_arch')
@patch('kiwi_boxed_plugin.defaults.Defaults.get_plugin_config_file')
def test_setup_raises_box_not_found(self, mock_get_plugin_config_file):
mock_get_plugin_config_file.return_value = \
'../data/kiwi_boxed_plugin.yml'
with raises(KiwiBoxPluginBoxNameError):
self.box_config = BoxConfig('foo', 'x86_64')
def test_get_box_arch(self):
assert self.box_config.get_box_arch() == 'x86_64'
def test_get_box_memory_mbytes(self):
assert self.box_config.get_box_memory_mbytes() == 8096
def test_get_box_console(self):
assert self.box_config.get_box_console() == 'hvc0'
def test_get_box_kernel_cmdline(self):
assert self.box_config.get_box_kernel_cmdline() == \
'root=/dev/vda1 rd.plymouth=0'
def test_get_box_source(self):
assert self.box_config.get_box_source() == \
'obs://Virtualization:Appliances:SelfContained:suse/images'
def test_get_box_packages_file(self):
assert self.box_config.get_box_packages_file() == \
'SUSE-Box.x86_64-1.42.1-System-BuildBox.report'
def test_get_box_packages_shasum_file(self):
assert self.box_config.get_box_packages_shasum_file() == \
'SUSE-Box.x86_64-1.42.1-System-BuildBox.report.sha256'
def test_get_box_files(self):
assert self.box_config.get_box_files() == [
'SUSE-Box.x86_64-1.42.1-Kernel-BuildBox.tar.xz',
'SUSE-Box.x86_64-1.42.1-System-BuildBox.qcow2'
]
kiwi-boxed-plugin-0.2.31/test/unit/box_download_test.py 0000664 0000000 0000000 00000015047 14516463774 0023211 0 ustar 00root root 0000000 0000000 import io
from mock import (
patch, Mock, MagicMock, call
)
from kiwi_boxed_plugin.box_download import (
BoxDownload, vm_setup_type
)
class TestBoxDownload:
@patch('kiwi_boxed_plugin.defaults.Defaults.get_plugin_config_file')
@patch('kiwi_boxed_plugin.box_download.Path')
@patch('kiwi_boxed_plugin.box_download.DirFiles')
def setup(self, mock_DirFiles, mock_Path, mock_get_plugin_config_file):
self.box_stage = Mock()
self.box_stage.register.return_value = 'register_file'
mock_DirFiles.return_value = self.box_stage
mock_get_plugin_config_file.return_value = \
'../data/kiwi_boxed_plugin.yml'
with patch.dict('os.environ', {'HOME': 'HOME'}):
self.box = BoxDownload('suse', 'x86_64')
mock_Path.create.assert_called_once_with(
'HOME/.kiwi_boxes/suse'
)
self.result = vm_setup_type(
system='HOME/.kiwi_boxes/suse/'
'SUSE-Box.x86_64-1.42.1-System-BuildBox.qcow2',
kernel='HOME/.kiwi_boxes/suse/kernel.x86_64',
initrd='HOME/.kiwi_boxes/suse/initrd.x86_64',
append='console=hvc0 root=/dev/vda1 rd.plymouth=0',
ram=8096,
smp=4
)
@patch('kiwi_boxed_plugin.defaults.Defaults.get_plugin_config_file')
@patch('kiwi_boxed_plugin.box_download.Path')
@patch('kiwi_boxed_plugin.box_download.DirFiles')
def setup_method(
self, cls, mock_DirFiles, mock_Path, mock_get_plugin_config_file
):
self.setup()
@patch('kiwi_boxed_plugin.box_download.Command.run')
@patch('kiwi_boxed_plugin.box_download.Uri')
@patch('kiwi_boxed_plugin.box_download.SolverRepository.new')
@patch('kiwi_boxed_plugin.box_download.Checksum')
@patch('os.path.exists')
@patch('os.chdir')
@patch('kiwi_boxed_plugin.box_download.FetchFiles')
def test_fetch_checksum_did_not_match(
self, mock_FetchFiles, mock_os_chdir, mock_os_path_exist,
mock_Checksum, mock_SolverRepository, mock_Uri, mock_Command_run
):
fetcher = Mock()
mock_FetchFiles.return_value = fetcher
checksum = Mock()
checksum.matches.return_value = False
checksum.sha256.return_value = 'sum'
mock_Checksum.return_value = checksum
repo = Mock()
repo._get_mime_typed_uri.return_value = 'uri://'
mock_SolverRepository.return_value = repo
mock_os_path_exist.return_value = False
with patch('builtins.open', create=True) as mock_open:
mock_open.return_value = MagicMock(spec=io.IOBase)
file_handle = mock_open.return_value.__enter__.return_value
with patch.dict('os.environ', {'HOME': 'HOME'}):
assert self.box.fetch(update_check=True) == self.result
assert self.box_stage.register.call_args_list == [
call(
'HOME/.kiwi_boxes/suse/'
'SUSE-Box.x86_64-1.42.1-System-BuildBox.report'
),
call(
'HOME/.kiwi_boxes/suse/'
'SUSE-Box.x86_64-1.42.1-System-BuildBox.report.sha256'
),
call(
'HOME/.kiwi_boxes/suse/'
'SUSE-Box.x86_64-1.42.1-Kernel-BuildBox.tar.xz'
),
call(
'HOME/.kiwi_boxes/suse/'
'SUSE-Box.x86_64-1.42.1-System-BuildBox.qcow2'
)
]
mock_open.assert_called_once_with(
self.box_stage.register.return_value, 'w'
)
file_handle.write.assert_called_once_with('sum')
repo.download_from_repository.assert_called_once_with(
'SUSE-Box.x86_64-1.42.1-System-BuildBox.report',
self.box_stage.register.return_value
)
assert fetcher.wget.call_args_list == [
call(
url='uri:///SUSE-Box.x86_64-1.42.1-Kernel-BuildBox.tar.xz',
filename='register_file'
),
call(
url='uri:///SUSE-Box.x86_64-1.42.1-System-BuildBox.qcow2',
filename='register_file'
)
]
self.box_stage.commit.assert_called_once_with()
assert mock_Command_run.call_args_list == [
call(
[
'tar', '-C', 'HOME/.kiwi_boxes/suse',
'--transform', 's/.*/kernel.x86_64/',
'--wildcards', '-xf',
'HOME/.kiwi_boxes/suse/'
'SUSE-Box.x86_64-1.42.1-Kernel-BuildBox.tar.xz',
'*.kernel'
]
),
call(
[
'tar', '-C', 'HOME/.kiwi_boxes/suse',
'--transform', 's/.*/initrd.x86_64/',
'--wildcards', '-xf',
'HOME/.kiwi_boxes/suse/'
'SUSE-Box.x86_64-1.42.1-Kernel-BuildBox.tar.xz',
'*.initrd'
]
)
]
@patch('kiwi_boxed_plugin.box_download.Command.run')
@patch('kiwi_boxed_plugin.box_download.Uri')
@patch('kiwi_boxed_plugin.box_download.SolverRepository.new')
@patch('kiwi_boxed_plugin.box_download.Checksum')
@patch('os.path.exists')
def test_fetch_checksum_matches(
self, mock_os_path_exist, mock_Checksum, mock_SolverRepository,
mock_Uri, mock_Command_run
):
checksum = Mock()
checksum.matches.return_value = True
checksum.sha256.return_value = 'sum'
mock_Checksum.return_value = checksum
repo = Mock()
mock_SolverRepository.return_value = repo
mock_os_path_exist.return_value = True
assert self.box.fetch(update_check=True) == self.result
repo.download_from_repository.assert_called_once_with(
'SUSE-Box.x86_64-1.42.1-System-BuildBox.report',
self.box_stage.register.return_value
)
@patch('kiwi_boxed_plugin.box_download.Command.run')
@patch('kiwi_boxed_plugin.box_download.Uri')
@patch('kiwi_boxed_plugin.box_download.SolverRepository.new')
@patch('kiwi_boxed_plugin.box_download.Checksum')
@patch('os.path.exists')
def test_fetch_update_check_disabled(
self, mock_os_path_exist, mock_Checksum, mock_SolverRepository,
mock_Uri, mock_Command_run
):
mock_os_path_exist.return_value = True
assert self.box.fetch(update_check=False) == self.result
kiwi-boxed-plugin-0.2.31/test/unit/defaults_test.py 0000664 0000000 0000000 00000003403 14516463774 0022332 0 ustar 00root root 0000000 0000000 from pkg_resources import resource_filename
from kiwi_boxed_plugin.defaults import Defaults
from mock import patch
import os
class MockedPath:
def __init__(self):
self.p: str | None = None
def home(self):
return self
@staticmethod
def exists():
return True
def joinpath(self, f: str):
self.p = os.path.join("/home/zoidberg", f)
return self
def as_posix(self):
return self.p
class TestDefaults:
def test_get_plugin_config_file(self):
assert Defaults.get_plugin_config_file() == resource_filename(
'kiwi_boxed_plugin', 'config/kiwi_boxed_plugin.yml'
)
@patch("os.path.exists", lambda f: True)
@patch.dict(os.environ, KIWI_BOXED_PLUGIN_CFG="aarchderwelt.conf")
def test_get_plugin_config_file_env(self):
assert Defaults.get_plugin_config_file() == "aarchderwelt.conf", \
"aarch64 aonfiguration from the environment variable do not match"
@patch("os.path.abspath", lambda f: "/highway/to/hell.conf")
@patch("os.path.exists", lambda f: True)
def test_get_plugin_config_file_currdir(self):
assert Defaults.get_plugin_config_file() == "/highway/to/hell.conf", \
"Should contain absolute path to the config"
@patch("pathlib.Path", MockedPath())
def test_get_plugin_config_file_local_kiwi(self):
assert Defaults.get_plugin_config_file() == "/home/zoidberg/.config/kiwi/kiwi_boxed_plugin.yml", \
"Should contain local Kiwi Box config"
@patch("os.path.exists", lambda f: f == "/etc/kiwi_boxed_plugin.yml")
def test_get_plugin_config_file_etc(self):
assert Defaults.get_plugin_config_file() == "/etc/kiwi_boxed_plugin.yml", \
"Should contain Kiwi Box config in /etc dir"
kiwi-boxed-plugin-0.2.31/test/unit/plugin_config_test.py 0000664 0000000 0000000 00000010113 14516463774 0023342 0 ustar 00root root 0000000 0000000 import yaml
from mock import patch
from pytest import raises
from kiwi_boxed_plugin.plugin_config import PluginConfig
from kiwi_boxed_plugin.exceptions import KiwiBoxPluginConfigError
class TestPluginConfig:
@patch('kiwi_boxed_plugin.defaults.Defaults.get_plugin_config_file')
def setup(self, mock_get_plugin_config_file):
mock_get_plugin_config_file.return_value = \
'../data/kiwi_boxed_plugin.yml'
self.plugin_config = PluginConfig()
@patch('kiwi_boxed_plugin.defaults.Defaults.get_plugin_config_file')
def setup_method(self, cls, mock_get_plugin_config_file):
self.setup()
@patch('kiwi_boxed_plugin.defaults.Defaults.get_plugin_config_file')
def test_invalid_config(self, mock_get_plugin_config_file):
mock_get_plugin_config_file.return_value = \
'../data/kiwi_boxed_plugin_invalid.yml'
with raises(KiwiBoxPluginConfigError):
PluginConfig()
def test_get_config(self):
print(self.plugin_config.get_config())
assert self.plugin_config.get_config() == [
{
'name': 'suse',
'mem_mb': 8096,
'processors': 4,
'console': 'hvc0',
'arch': [
{
'name': 'x86_64',
'cmdline': ['root=/dev/vda1', 'rd.plymouth=0'],
'source':
'obs://Virtualization:Appliances:SelfContained:'
'suse/images',
'packages_file':
'SUSE-Box.x86_64-1.42.1-System-BuildBox.report',
'boxfiles': [
'SUSE-Box.x86_64-1.42.1-Kernel-BuildBox.tar.xz',
'SUSE-Box.x86_64-1.42.1-System-BuildBox.qcow2'
],
'use_initrd': True
}
]
},
{
'name': 'universal',
'mem_mb': 8096,
'processors': 4,
'console': 'hvc0',
'arch': [
{
'name': 'x86_64',
'cmdline': [
'root=/dev/vda3', 'rd.plymouth=0', 'selinux=0'
],
'source':
'obs://Virtualization:Appliances:SelfContained:'
'universal/images',
'packages_file':
'Universal-Box.x86_64-1.1.2-System-BuildBox.report',
'boxfiles': [
'Universal-Box.x86_64-1.1.2-Kernel-BuildBox.tar.xz',
'Universal-Box.x86_64-1.1.2-System-BuildBox.qcow2'
],
'use_initrd': True
},
{
'name': 'aarch64',
'cmdline': [
'root=/dev/vda2', 'rd.plymouth=0', 'selinux=0'
],
'source':
'obs://Virtualization:Appliances:SelfContained:'
'universal/images',
'packages_file': 'Universal-Box.'
'aarch64-1.1.2-System-BuildBox.report',
'boxfiles': [
'Universal-Box.aarch64-1.1.2-'
'Kernel-BuildBox.tar.xz',
'Universal-Box.aarch64-1.1.2-'
'System-BuildBox.qcow2'
],
'use_initrd': True
}
]
}
]
def test_dump_config(self):
assert self.plugin_config.dump_config() == yaml.dump(
self.plugin_config.get_config()
)
@patch('yaml.safe_load')
def test_setup_raises(self, mock_yaml_safe_load):
mock_yaml_safe_load.side_effect = Exception
with raises(KiwiBoxPluginConfigError):
PluginConfig()
kiwi-boxed-plugin-0.2.31/test/unit/tasks/ 0000775 0000000 0000000 00000000000 14516463774 0020237 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/test/unit/tasks/__init__.py 0000664 0000000 0000000 00000000000 14516463774 0022336 0 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/test/unit/tasks/system_boxbuild_test.py 0000664 0000000 0000000 00000014224 14516463774 0025067 0 ustar 00root root 0000000 0000000 import sys
from mock import (
Mock, patch
)
from kiwi_boxed_plugin.tasks.system_boxbuild import SystemBoxbuildTask
class TestSystemBoxbuildTask:
def setup(self):
sys.argv = [
sys.argv[0],
'--debug', '--profile', 'foo', '--type', 'oem',
'system', 'boxbuild',
'--box', 'suse', '--box-memory', '4', '--box-smp-cpus', '4', '--',
'--description', '../data/description',
'--target-dir', '../data/target_dir'
]
self.task = SystemBoxbuildTask()
def setup_method(self, cls):
self.setup()
def _init_command_args(self):
self.task.command_args = {}
self.task.command_args['help'] = False
self.task.command_args['boxbuild'] = False
self.task.command_args['--list-boxes'] = False
self.task.command_args['--box'] = None
self.task.command_args['--box-debug'] = False
self.task.command_args['--kiwi-version'] = None
self.task.command_args['--shared-path'] = None
self.task.command_args['--9p-sharing'] = None
self.task.command_args['--sshfs-sharing'] = None
self.task.command_args['--ssh-port'] = '22'
self.task.command_args['--virtiofs-sharing'] = None
self.task.command_args['--cpu'] = None
self.task.command_args['--machine'] = None
self.task.command_args[''] = [
'--', '--description', 'foo',
'--target-dir', 'xxx',
'--add-package=a', '--add-package', 'b',
'--allow-existing-root'
]
@patch('kiwi_boxed_plugin.tasks.system_boxbuild.Help')
def test_process_system_boxbuild_help(self, mock_kiwi_Help):
Help = Mock()
mock_kiwi_Help.return_value = Help
self._init_command_args()
self.task.command_args['help'] = True
self.task.command_args['boxbuild'] = True
self.task.process()
Help.show.assert_called_once_with(
'kiwi::system::boxbuild'
)
@patch('kiwi_boxed_plugin.tasks.system_boxbuild.PluginConfig')
def test_process_system_boxbuild_list_boxes(self, mock_PluginConfig):
plugin = Mock()
mock_PluginConfig.return_value = plugin
self._init_command_args()
self.task.command_args['boxbuild'] = True
self.task.command_args['--list-boxes'] = True
self.task.process()
plugin.dump_config.assert_called_once_with()
@patch('kiwi_boxed_plugin.tasks.system_boxbuild.BoxBuild')
def test_process_system_boxbuild(self, mock_BoxBuild):
self._init_command_args()
self.task.command_args['boxbuild'] = True
self.task.command_args['--box'] = 'suse'
box_build = Mock()
mock_BoxBuild.return_value = box_build
self.task.process()
mock_BoxBuild.assert_called_once_with(
boxname='suse', ram=None, smp=None, arch='',
machine=None, cpu='host', sharing_backend='9p',
ssh_key='id_rsa', ssh_port='22', accel=True
)
box_build.run.assert_called_once_with(
[
'--debug', '--type', 'oem', '--profile', 'foo',
'system', 'build',
'--description', 'foo', '--target-dir', 'xxx',
'--allow-existing-root',
'--add-package', 'a', '--add-package', 'b'
], True, True, False, None, None
)
@patch('kiwi_boxed_plugin.tasks.system_boxbuild.BoxBuild')
def test_process_system_boxbuild_for_x86_64(self, mock_BoxBuild):
self._init_command_args()
self.task.command_args['boxbuild'] = True
self.task.command_args['--box'] = 'suse'
self.task.command_args['--x86_64'] = True
box_build = Mock()
mock_BoxBuild.return_value = box_build
self.task.process()
mock_BoxBuild.assert_called_once_with(
boxname='suse', ram=None, smp=None, arch='x86_64',
machine=None, cpu='host', sharing_backend='9p',
ssh_key='id_rsa', ssh_port='22', accel=True
)
@patch('kiwi_boxed_plugin.tasks.system_boxbuild.BoxBuild')
def test_process_system_boxbuild_for_aarch64(self, mock_BoxBuild):
self._init_command_args()
self.task.command_args['boxbuild'] = True
self.task.command_args['--box'] = 'suse'
self.task.command_args['--aarch64'] = True
box_build = Mock()
mock_BoxBuild.return_value = box_build
self.task.process()
mock_BoxBuild.assert_called_once_with(
boxname='suse', ram=None, smp=None, arch='aarch64',
machine=None, cpu='host', sharing_backend='9p',
ssh_key='id_rsa', ssh_port='22', accel=True
)
@patch('kiwi_boxed_plugin.tasks.system_boxbuild.BoxBuild')
def test_process_system_boxbuild_with_sharing_backend(self, mock_BoxBuild):
self._init_command_args()
self.task.command_args['boxbuild'] = True
self.task.command_args['--box'] = 'suse'
self.task.command_args['--9p-sharing'] = True
box_build = Mock()
mock_BoxBuild.return_value = box_build
self.task.process()
mock_BoxBuild.assert_called_once_with(
boxname='suse', ram=None, smp=None, arch='',
machine=None, cpu='host', sharing_backend='9p',
ssh_key='id_rsa', ssh_port='22', accel=True
)
self.task.command_args['--9p-sharing'] = False
self.task.command_args['--virtiofs-sharing'] = True
mock_BoxBuild.reset_mock()
self.task.process()
mock_BoxBuild.assert_called_once_with(
boxname='suse', ram=None, smp=None, arch='',
machine=None, cpu='host', sharing_backend='virtiofs',
ssh_key='id_rsa', ssh_port='22', accel=True
)
self.task.command_args['--9p-sharing'] = False
self.task.command_args['--virtiofs-sharing'] = False
self.task.command_args['--sshfs-sharing'] = True
mock_BoxBuild.reset_mock()
self.task.process()
mock_BoxBuild.assert_called_once_with(
boxname='suse', ram=None, smp=None, arch='',
machine=None, cpu='host', sharing_backend='sshfs',
ssh_key='id_rsa', ssh_port='22', accel=True
)
kiwi-boxed-plugin-0.2.31/test/unit/utils/ 0000775 0000000 0000000 00000000000 14516463774 0020252 5 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/test/unit/utils/__init__.py 0000664 0000000 0000000 00000000000 14516463774 0022351 0 ustar 00root root 0000000 0000000 kiwi-boxed-plugin-0.2.31/test/unit/utils/dir_files_test.py 0000664 0000000 0000000 00000003036 14516463774 0023625 0 ustar 00root root 0000000 0000000 from mock import (
Mock, patch, call
)
from kiwi_boxed_plugin.utils.dir_files import DirFiles
class TestDirFiles:
@patch('kiwi_boxed_plugin.utils.dir_files.Path')
def setup(self, mock_Path):
self.dir_manager = DirFiles('box_dir')
mock_Path.wipe.assert_called_once_with('box_dir.tmp')
@patch('kiwi_boxed_plugin.utils.dir_files.Path')
def setup_method(self, cls, mock_Path):
self.setup()
@patch('kiwi_boxed_plugin.utils.dir_files.NamedTemporaryFile')
def test_register(self, mock_NamedTemporaryFile):
tmpfile = Mock()
tmpfile.name = 'tmp_a'
mock_NamedTemporaryFile.return_value = tmpfile
self.dir_manager.register('/some/path/to/file_a')
assert self.dir_manager.collection == {
'file_a': 'tmp_a'
}
@patch('kiwi_boxed_plugin.utils.dir_files.Path')
@patch('kiwi_boxed_plugin.utils.dir_files.Command.run')
def test_commit(self, mock_Command_run, mock_Path):
self.dir_manager.collection = {
'file_a': 'tmp_a'
}
self.dir_manager.commit()
mock_Path.create.assert_called_once_with('box_dir.tmp')
assert mock_Command_run.call_args_list == [
call(
['bash', '-c', 'cp -a box_dir/* box_dir.tmp'],
raise_on_error=False
),
call(['mv', 'tmp_a', 'box_dir.tmp/file_a']),
call(['mv', 'box_dir', 'box_dir.wipe']),
call(['mv', 'box_dir.tmp', 'box_dir']),
call(['rm', '-rf', 'box_dir.wipe'])
]
kiwi-boxed-plugin-0.2.31/test/unit/utils/fetch_files_test.py 0000664 0000000 0000000 00000002702 14516463774 0024137 0 ustar 00root root 0000000 0000000 import io
from mock import (
Mock, MagicMock, patch
)
from kiwi_boxed_plugin.utils.fetch_files import FetchFiles
class TestFetchFiles:
def setup(self):
self.fetcher = FetchFiles()
def setup_method(self, cls):
self.setup()
@patch('kiwi_boxed_plugin.utils.fetch_files.requests')
@patch('kiwi_boxed_plugin.utils.fetch_files.progressbar')
def test_wget(self, mock_progressbar, mock_requests):
response = Mock()
response.headers.get.return_value = 4
response.iter_content.return_value = [b'data']
mock_requests.request.return_value = response
with patch('builtins.open', create=True) as mock_open:
mock_open.return_value = MagicMock(spec=io.IOBase)
file_handle = mock_open.return_value.__enter__.return_value
self.fetcher.wget('http://foo', 'bar')
mock_open.assert_called_once_with(
'bar', 'wb'
)
file_handle.write.assert_called_once_with(b'data')
mock_progressbar.ProgressBar.assert_called_once_with(
maxval=4,
widgets=[
'Loading: ',
mock_progressbar.Percentage.return_value, ' ',
mock_progressbar.Bar(marker='#', left='[', right=']'), ' ',
mock_progressbar.ETA.return_value, ' ',
mock_progressbar.FileTransferSpeed.return_value
]
)
kiwi-boxed-plugin-0.2.31/tox.ini 0000664 0000000 0000000 00000004576 14516463774 0016503 0 ustar 00root root 0000000 0000000 # Tox configuration file
#
# For more information, see https://tox.readthedocs.org
#
# Run it with
# a) all targets
# $ tox
#
# b) with specific targets (build only documentation):
# $ tox -e doc
#
[tox]
minversion = 3.3.0
isolated_build = True
skip_missing_interpreters = True
skipsdist = True
envlist =
check,
unit_py3_11,
unit_py3_10,
doc
[testenv]
description =
{unit_py3_10,unit_py3_11}: Unit Test run with basepython set to {basepython}
allowlist_externals =
bash
travis-sphinx
cp
make
rm
mv
flake8
python
pytest
basepython =
{check,devel,doc}: python3
unit_py3_11: python3.11
unit_py3_10: python3.10
release: python3.10
passenv =
*
usedevelop = True
deps =
-r.virtualenv.dev-requirements.txt
# Unit Test run with basepython set to 3.10
[testenv:unit_py3_10]
setenv =
PYTHONPATH={toxinidir}/test
changedir=test/unit
commands =
{[testenv:unit]commands}
# Unit Test run with basepython set to 3.11
[testenv:unit_py3_11]
setenv =
PYTHONPATH={toxinidir}/test
changedir=test/unit
commands =
{[testenv:unit]commands}
[testenv:unit]
description = Unit Test Base
skip_install = True
usedevelop = True
setenv =
PYTHONUNBUFFERED=yes
WITH_COVERAGE=yes
passenv =
*
deps = {[testenv]deps}
changedir=test/unit
commands =
bash -c 'cd ../../ && ./setup.py develop'
bash -c 'cd ../../ && mypy --install-types --non-interactive kiwi_boxed_plugin'
pytest --doctest-modules --no-cov-on-fail --cov=kiwi_boxed_plugin \
--cov-report=term-missing --cov-fail-under=100 \
--cov-config .coveragerc {posargs}
# Documentation build suitable for local review
[testenv:doc]
skip_install = True
usedevelop = True
deps = {[testenv]deps}
changedir=doc
commands =
{[testenv:doc.man]commands}
# Documentation build man pages
[testenv:doc.man]
skip_install = True
deps = {[testenv:doc]deps}
changedir=doc
commands =
make man
# Source code quality/integrity check
[testenv:check]
deps = {[testenv]deps}
skip_install = True
usedevelop = True
commands =
flake8 --statistics -j auto --count {toxinidir}/kiwi_boxed_plugin
flake8 --statistics -j auto --count {toxinidir}/test/unit
bash -c 'shellcheck -e SC1091 {toxinidir}/boxes/images.sh -e SC2086 -s bash'
# PyPi upload
[testenv:release]
deps = {[testenv]deps}
skip_install = True
usedevelop = True
commands =
python setup.py sdist