lvm.conf 44 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994
  1. # This is an example configuration file for the LVM2 system.
  2. # It contains the default settings that would be used if there was no
  3. # /etc/lvm/lvm.conf file.
  4. #
  5. # Refer to 'man lvm.conf' for further information including the file layout.
  6. #
  7. # To put this file in a different directory and override /etc/lvm set
  8. # the environment variable LVM_SYSTEM_DIR before running the tools.
  9. #
  10. # N.B. Take care that each setting only appears once if uncommenting
  11. # example settings in this file.
  12. # This section allows you to set the way the configuration settings are handled.
  13. config {
  14. # If enabled, any LVM2 configuration mismatch is reported.
  15. # This implies checking that the configuration key is understood
  16. # by LVM2 and that the value of the key is of a proper type.
  17. # If disabled, any configuration mismatch is ignored and default
  18. # value is used instead without any warning (a message about the
  19. # configuration key not being found is issued in verbose mode only).
  20. checks = 1
  21. # If enabled, any configuration mismatch aborts the LVM2 process.
  22. abort_on_errors = 0
  23. # Directory where LVM looks for configuration profiles.
  24. profile_dir = "/etc/lvm/profile"
  25. }
  26. # This section allows you to configure which block devices should
  27. # be used by the LVM system.
  28. devices {
  29. # Where do you want your volume groups to appear ?
  30. dir = "/dev"
  31. # An array of directories that contain the device nodes you wish
  32. # to use with LVM2.
  33. scan = [ "/dev" ]
  34. # If set, the cache of block device nodes with all associated symlinks
  35. # will be constructed out of the existing udev database content.
  36. # This avoids using and opening any inapplicable non-block devices or
  37. # subdirectories found in the device directory. This setting is applied
  38. # to udev-managed device directory only, other directories will be scanned
  39. # fully. LVM2 needs to be compiled with udev support for this setting to
  40. # take effect. N.B. Any device node or symlink not managed by udev in
  41. # udev directory will be ignored with this setting on.
  42. obtain_device_list_from_udev = 1
  43. # If several entries in the scanned directories correspond to the
  44. # same block device and the tools need to display a name for device,
  45. # all the pathnames are matched against each item in the following
  46. # list of regular expressions in turn and the first match is used.
  47. preferred_names = [ ]
  48. # Try to avoid using undescriptive /dev/dm-N names, if present.
  49. # preferred_names = [ "^/dev/mpath/", "^/dev/mapper/mpath", "^/dev/[hs]d" ]
  50. # A filter that tells LVM2 to only use a restricted set of devices.
  51. # The filter consists of an array of regular expressions. These
  52. # expressions can be delimited by a character of your choice, and
  53. # prefixed with either an 'a' (for accept) or 'r' (for reject).
  54. # The first expression found to match a device name determines if
  55. # the device will be accepted or rejected (ignored). Devices that
  56. # don't match any patterns are accepted.
  57. # Be careful if there there are symbolic links or multiple filesystem
  58. # entries for the same device as each name is checked separately against
  59. # the list of patterns. The effect is that if the first pattern in the
  60. # list to match a name is an 'a' pattern for any of the names, the device
  61. # is accepted; otherwise if the first pattern in the list to match a name
  62. # is an 'r' pattern for any of the names it is rejected; otherwise it is
  63. # accepted.
  64. # Don't have more than one filter line active at once: only one gets used.
  65. # Run vgscan after you change this parameter to ensure that
  66. # the cache file gets regenerated (see below).
  67. # If it doesn't do what you expect, check the output of 'vgscan -vvvv'.
  68. # If lvmetad is used, then see "A note about device filtering while
  69. # lvmetad is used" comment that is attached to global/use_lvmetad setting.
  70. # By default we accept every block device:
  71. filter = [ "a/.*/" ]
  72. # Exclude the cdrom drive
  73. # filter = [ "r|/dev/cdrom|" ]
  74. # When testing I like to work with just loopback devices:
  75. # filter = [ "a/loop/", "r/.*/" ]
  76. # Or maybe all loops and ide drives except hdc:
  77. # filter =[ "a|loop|", "r|/dev/hdc|", "a|/dev/ide|", "r|.*|" ]
  78. # Use anchors if you want to be really specific
  79. # filter = [ "a|^/dev/hda8$|", "r/.*/" ]
  80. # Since "filter" is often overridden from command line, it is not suitable
  81. # for system-wide device filtering (udev rules, lvmetad). To hide devices
  82. # from LVM-specific udev processing and/or from lvmetad, you need to set
  83. # global_filter. The syntax is the same as for normal "filter"
  84. # above. Devices that fail the global_filter are not even opened by LVM.
  85. # global_filter = []
  86. # The results of the filtering are cached on disk to avoid
  87. # rescanning dud devices (which can take a very long time).
  88. # By default this cache is stored in the /etc/lvm/cache directory
  89. # in a file called '.cache'.
  90. # It is safe to delete the contents: the tools regenerate it.
  91. # (The old setting 'cache' is still respected if neither of
  92. # these new ones is present.)
  93. # N.B. If obtain_device_list_from_udev is set to 1 the list of
  94. # devices is instead obtained from udev and any existing .cache
  95. # file is removed.
  96. cache_dir = "/etc/lvm/cache"
  97. cache_file_prefix = ""
  98. # You can turn off writing this cache file by setting this to 0.
  99. write_cache_state = 1
  100. # Advanced settings.
  101. # List of pairs of additional acceptable block device types found
  102. # in /proc/devices with maximum (non-zero) number of partitions.
  103. # types = [ "fd", 16 ]
  104. # If sysfs is mounted (2.6 kernels) restrict device scanning to
  105. # the block devices it believes are valid.
  106. # 1 enables; 0 disables.
  107. sysfs_scan = 1
  108. # By default, LVM2 will ignore devices used as component paths
  109. # of device-mapper multipath devices.
  110. # 1 enables; 0 disables.
  111. multipath_component_detection = 1
  112. # By default, LVM2 will ignore devices used as components of
  113. # software RAID (md) devices by looking for md superblocks.
  114. # 1 enables; 0 disables.
  115. md_component_detection = 1
  116. # By default, if a PV is placed directly upon an md device, LVM2
  117. # will align its data blocks with the md device's stripe-width.
  118. # 1 enables; 0 disables.
  119. md_chunk_alignment = 1
  120. # Default alignment of the start of a data area in MB. If set to 0,
  121. # a value of 64KB will be used. Set to 1 for 1MiB, 2 for 2MiB, etc.
  122. # default_data_alignment = 1
  123. # By default, the start of a PV's data area will be a multiple of
  124. # the 'minimum_io_size' or 'optimal_io_size' exposed in sysfs.
  125. # - minimum_io_size - the smallest request the device can perform
  126. # w/o incurring a read-modify-write penalty (e.g. MD's chunk size)
  127. # - optimal_io_size - the device's preferred unit of receiving I/O
  128. # (e.g. MD's stripe width)
  129. # minimum_io_size is used if optimal_io_size is undefined (0).
  130. # If md_chunk_alignment is enabled, that detects the optimal_io_size.
  131. # This setting takes precedence over md_chunk_alignment.
  132. # 1 enables; 0 disables.
  133. data_alignment_detection = 1
  134. # Alignment (in KB) of start of data area when creating a new PV.
  135. # md_chunk_alignment and data_alignment_detection are disabled if set.
  136. # Set to 0 for the default alignment (see: data_alignment_default)
  137. # or page size, if larger.
  138. data_alignment = 0
  139. # By default, the start of the PV's aligned data area will be shifted by
  140. # the 'alignment_offset' exposed in sysfs. This offset is often 0 but
  141. # may be non-zero; e.g.: certain 4KB sector drives that compensate for
  142. # windows partitioning will have an alignment_offset of 3584 bytes
  143. # (sector 7 is the lowest aligned logical block, the 4KB sectors start
  144. # at LBA -1, and consequently sector 63 is aligned on a 4KB boundary).
  145. # But note that pvcreate --dataalignmentoffset will skip this detection.
  146. # 1 enables; 0 disables.
  147. data_alignment_offset_detection = 1
  148. # If, while scanning the system for PVs, LVM2 encounters a device-mapper
  149. # device that has its I/O suspended, it waits for it to become accessible.
  150. # Set this to 1 to skip such devices. This should only be needed
  151. # in recovery situations.
  152. ignore_suspended_devices = 0
  153. # During each LVM operation errors received from each device are counted.
  154. # If the counter of a particular device exceeds the limit set here, no
  155. # further I/O is sent to that device for the remainder of the respective
  156. # operation. Setting the parameter to 0 disables the counters altogether.
  157. disable_after_error_count = 0
  158. # Allow use of pvcreate --uuid without requiring --restorefile.
  159. require_restorefile_with_uuid = 1
  160. # Minimum size (in KB) of block devices which can be used as PVs.
  161. # In a clustered environment all nodes must use the same value.
  162. # Any value smaller than 512KB is ignored.
  163. # Ignore devices smaller than 2MB such as floppy drives.
  164. pv_min_size = 2048
  165. # The original built-in setting was 512 up to and including version 2.02.84.
  166. # pv_min_size = 512
  167. # Issue discards to a logical volumes's underlying physical volume(s) when
  168. # the logical volume is no longer using the physical volumes' space (e.g.
  169. # lvremove, lvreduce, etc). Discards inform the storage that a region is
  170. # no longer in use. Storage that supports discards advertise the protocol
  171. # specific way discards should be issued by the kernel (TRIM, UNMAP, or
  172. # WRITE SAME with UNMAP bit set). Not all storage will support or benefit
  173. # from discards but SSDs and thinly provisioned LUNs generally do. If set
  174. # to 1, discards will only be issued if both the storage and kernel provide
  175. # support.
  176. # 1 enables; 0 disables.
  177. issue_discards = 0
  178. }
  179. # This section allows you to configure the way in which LVM selects
  180. # free space for its Logical Volumes.
  181. allocation {
  182. # When searching for free space to extend an LV, the "cling"
  183. # allocation policy will choose space on the same PVs as the last
  184. # segment of the existing LV. If there is insufficient space and a
  185. # list of tags is defined here, it will check whether any of them are
  186. # attached to the PVs concerned and then seek to match those PV tags
  187. # between existing extents and new extents.
  188. # Use the special tag "@*" as a wildcard to match any PV tag.
  189. # Example: LVs are mirrored between two sites within a single VG.
  190. # PVs are tagged with either @site1 or @site2 to indicate where
  191. # they are situated.
  192. # cling_tag_list = [ "@site1", "@site2" ]
  193. # cling_tag_list = [ "@*" ]
  194. # Changes made in version 2.02.85 extended the reach of the 'cling'
  195. # policies to detect more situations where data can be grouped
  196. # onto the same disks. Set this to 0 to revert to the previous
  197. # algorithm.
  198. maximise_cling = 1
  199. # Set to 1 to guarantee that mirror logs will always be placed on
  200. # different PVs from the mirror images. This was the default
  201. # until version 2.02.85.
  202. mirror_logs_require_separate_pvs = 0
  203. # Set to 1 to guarantee that thin pool metadata will always
  204. # be placed on different PVs from the pool data.
  205. thin_pool_metadata_require_separate_pvs = 0
  206. # Specify chunk size calculation policy for thin pool volumes.
  207. # Possible options are:
  208. # "generic" - if thin_pool_chunk_size is defined, use it.
  209. # Otherwise, calculate the chunk size based on
  210. # estimation and device hints exposed in sysfs:
  211. # the minimum_io_size. The chunk size is always
  212. # at least 64KiB.
  213. #
  214. # "performance" - if thin_pool_chunk_size is defined, use it.
  215. # Otherwise, calculate the chunk size for
  216. # performance based on device hints exposed in
  217. # sysfs: the optimal_io_size. The chunk size is
  218. # always at least 512KiB.
  219. # thin_pool_chunk_size_policy = "generic"
  220. # Specify the minimal chunk size (in KB) for thin pool volumes.
  221. # Use of the larger chunk size may improve perfomance for plain
  222. # thin volumes, however using them for snapshot volumes is less efficient,
  223. # as it consumes more space and takes extra time for copying.
  224. # When unset, lvm tries to estimate chunk size starting from 64KB
  225. # Supported values are in range from 64 to 1048576.
  226. # thin_pool_chunk_size = 64
  227. # Specify discards behavior of the thin pool volume.
  228. # Select one of "ignore", "nopassdown", "passdown"
  229. # thin_pool_discards = "passdown"
  230. # Set to 0, to disable zeroing of thin pool data chunks before their
  231. # first use.
  232. # N.B. zeroing larger thin pool chunk size degrades performance.
  233. # thin_pool_zero = 1
  234. }
  235. # This section that allows you to configure the nature of the
  236. # information that LVM2 reports.
  237. log {
  238. # Controls the messages sent to stdout or stderr.
  239. # There are three levels of verbosity, 3 being the most verbose.
  240. verbose = 0
  241. # Set to 1 to suppress all non-essential messages from stdout.
  242. # This has the same effect as -qq.
  243. # When this is set, the following commands still produce output:
  244. # dumpconfig, lvdisplay, lvmdiskscan, lvs, pvck, pvdisplay,
  245. # pvs, version, vgcfgrestore -l, vgdisplay, vgs.
  246. # Non-essential messages are shifted from log level 4 to log level 5
  247. # for syslog and lvm2_log_fn purposes.
  248. # Any 'yes' or 'no' questions not overridden by other arguments
  249. # are suppressed and default to 'no'.
  250. silent = 0
  251. # Should we send log messages through syslog?
  252. # 1 is yes; 0 is no.
  253. syslog = 1
  254. # Should we log error and debug messages to a file?
  255. # By default there is no log file.
  256. #file = "/var/log/lvm2.log"
  257. # Should we overwrite the log file each time the program is run?
  258. # By default we append.
  259. overwrite = 0
  260. # What level of log messages should we send to the log file and/or syslog?
  261. # There are 6 syslog-like log levels currently in use - 2 to 7 inclusive.
  262. # 7 is the most verbose (LOG_DEBUG).
  263. level = 0
  264. # Format of output messages
  265. # Whether or not (1 or 0) to indent messages according to their severity
  266. indent = 1
  267. # Whether or not (1 or 0) to display the command name on each line output
  268. command_names = 0
  269. # A prefix to use before the message text (but after the command name,
  270. # if selected). Default is two spaces, so you can see/grep the severity
  271. # of each message.
  272. prefix = " "
  273. # To make the messages look similar to the original LVM tools use:
  274. # indent = 0
  275. # command_names = 1
  276. # prefix = " -- "
  277. # Set this if you want log messages during activation.
  278. # Don't use this in low memory situations (can deadlock).
  279. # activation = 0
  280. # Some debugging messages are assigned to a class and only appear
  281. # in debug output if the class is listed here.
  282. # Classes currently available:
  283. # memory, devices, activation, allocation, lvmetad, metadata, cache,
  284. # locking
  285. # Use "all" to see everything.
  286. debug_classes = [ "memory", "devices", "activation", "allocation",
  287. "lvmetad", "metadata", "cache", "locking" ]
  288. }
  289. # Configuration of metadata backups and archiving. In LVM2 when we
  290. # talk about a 'backup' we mean making a copy of the metadata for the
  291. # *current* system. The 'archive' contains old metadata configurations.
  292. # Backups are stored in a human readeable text format.
  293. backup {
  294. # Should we maintain a backup of the current metadata configuration ?
  295. # Use 1 for Yes; 0 for No.
  296. # Think very hard before turning this off!
  297. backup = 1
  298. # Where shall we keep it ?
  299. # Remember to back up this directory regularly!
  300. backup_dir = "/etc/lvm/backup"
  301. # Should we maintain an archive of old metadata configurations.
  302. # Use 1 for Yes; 0 for No.
  303. # On by default. Think very hard before turning this off.
  304. archive = 1
  305. # Where should archived files go ?
  306. # Remember to back up this directory regularly!
  307. archive_dir = "/etc/lvm/archive"
  308. # What is the minimum number of archive files you wish to keep ?
  309. retain_min = 10
  310. # What is the minimum time you wish to keep an archive file for ?
  311. retain_days = 30
  312. }
  313. # Settings for the running LVM2 in shell (readline) mode.
  314. shell {
  315. # Number of lines of history to store in ~/.lvm_history
  316. history_size = 100
  317. }
  318. # Miscellaneous global LVM2 settings
  319. global {
  320. # The file creation mask for any files and directories created.
  321. # Interpreted as octal if the first digit is zero.
  322. umask = 077
  323. # Allow other users to read the files
  324. #umask = 022
  325. # Enabling test mode means that no changes to the on disk metadata
  326. # will be made. Equivalent to having the -t option on every
  327. # command. Defaults to off.
  328. test = 0
  329. # Default value for --units argument
  330. units = "h"
  331. # Since version 2.02.54, the tools distinguish between powers of
  332. # 1024 bytes (e.g. KiB, MiB, GiB) and powers of 1000 bytes (e.g.
  333. # KB, MB, GB).
  334. # If you have scripts that depend on the old behaviour, set this to 0
  335. # temporarily until you update them.
  336. si_unit_consistency = 1
  337. # Whether or not to communicate with the kernel device-mapper.
  338. # Set to 0 if you want to use the tools to manipulate LVM metadata
  339. # without activating any logical volumes.
  340. # If the device-mapper kernel driver is not present in your kernel
  341. # setting this to 0 should suppress the error messages.
  342. activation = 1
  343. # If we can't communicate with device-mapper, should we try running
  344. # the LVM1 tools?
  345. # This option only applies to 2.4 kernels and is provided to help you
  346. # switch between device-mapper kernels and LVM1 kernels.
  347. # The LVM1 tools need to be installed with .lvm1 suffices
  348. # e.g. vgscan.lvm1 and they will stop working after you start using
  349. # the new lvm2 on-disk metadata format.
  350. # The default value is set when the tools are built.
  351. # fallback_to_lvm1 = 0
  352. # The default metadata format that commands should use - "lvm1" or "lvm2".
  353. # The command line override is -M1 or -M2.
  354. # Defaults to "lvm2".
  355. # format = "lvm2"
  356. # Location of proc filesystem
  357. proc = "/proc"
  358. # Type of locking to use. Defaults to local file-based locking (1).
  359. # Turn locking off by setting to 0 (dangerous: risks metadata corruption
  360. # if LVM2 commands get run concurrently).
  361. # Type 2 uses the external shared library locking_library.
  362. # Type 3 uses built-in clustered locking.
  363. # Type 4 uses read-only locking which forbids any operations that might
  364. # change metadata.
  365. # N.B. Don't use lvmetad with locking type 3 as lvmetad is not yet
  366. # supported in clustered environment. If use_lvmetad=1 and locking_type=3
  367. # is set at the same time, LVM always issues a warning message about this
  368. # and then it automatically disables lvmetad use.
  369. locking_type = 1
  370. # Set to 0 to fail when a lock request cannot be satisfied immediately.
  371. wait_for_locks = 1
  372. # If using external locking (type 2) and initialisation fails,
  373. # with this set to 1 an attempt will be made to use the built-in
  374. # clustered locking.
  375. # If you are using a customised locking_library you should set this to 0.
  376. fallback_to_clustered_locking = 1
  377. # If an attempt to initialise type 2 or type 3 locking failed, perhaps
  378. # because cluster components such as clvmd are not running, with this set
  379. # to 1 an attempt will be made to use local file-based locking (type 1).
  380. # If this succeeds, only commands against local volume groups will proceed.
  381. # Volume Groups marked as clustered will be ignored.
  382. fallback_to_local_locking = 1
  383. # Local non-LV directory that holds file-based locks while commands are
  384. # in progress. A directory like /tmp that may get wiped on reboot is OK.
  385. locking_dir = "/run/lock/lvm"
  386. # Whenever there are competing read-only and read-write access requests for
  387. # a volume group's metadata, instead of always granting the read-only
  388. # requests immediately, delay them to allow the read-write requests to be
  389. # serviced. Without this setting, write access may be stalled by a high
  390. # volume of read-only requests.
  391. # NB. This option only affects locking_type = 1 viz. local file-based
  392. # locking.
  393. prioritise_write_locks = 1
  394. # Other entries can go here to allow you to load shared libraries
  395. # e.g. if support for LVM1 metadata was compiled as a shared library use
  396. # format_libraries = "liblvm2format1.so"
  397. # Full pathnames can be given.
  398. # Search this directory first for shared libraries.
  399. # library_dir = "/lib"
  400. # The external locking library to load if locking_type is set to 2.
  401. # locking_library = "liblvm2clusterlock.so"
  402. # Treat any internal errors as fatal errors, aborting the process that
  403. # encountered the internal error. Please only enable for debugging.
  404. abort_on_internal_errors = 0
  405. # Check whether CRC is matching when parsed VG is used multiple times.
  406. # This is useful to catch unexpected internal cached volume group
  407. # structure modification. Please only enable for debugging.
  408. detect_internal_vg_cache_corruption = 0
  409. # If set to 1, no operations that change on-disk metadata will be permitted.
  410. # Additionally, read-only commands that encounter metadata in need of repair
  411. # will still be allowed to proceed exactly as if the repair had been
  412. # performed (except for the unchanged vg_seqno).
  413. # Inappropriate use could mess up your system, so seek advice first!
  414. metadata_read_only = 0
  415. # 'mirror_segtype_default' defines which segtype will be used when the
  416. # shorthand '-m' option is used for mirroring. The possible options are:
  417. #
  418. # "mirror" - The original RAID1 implementation provided by LVM2/DM. It is
  419. # characterized by a flexible log solution (core, disk, mirrored)
  420. # and by the necessity to block I/O while reconfiguring in the
  421. # event of a failure.
  422. #
  423. # There is an inherent race in the dmeventd failure handling
  424. # logic with snapshots of devices using this type of RAID1 that
  425. # in the worst case could cause a deadlock.
  426. # Ref: https://bugzilla.redhat.com/show_bug.cgi?id=817130#c10
  427. #
  428. # "raid1" - This implementation leverages MD's RAID1 personality through
  429. # device-mapper. It is characterized by a lack of log options.
  430. # (A log is always allocated for every device and they are placed
  431. # on the same device as the image - no separate devices are
  432. # required.) This mirror implementation does not require I/O
  433. # to be blocked in the kernel in the event of a failure.
  434. # This mirror implementation is not cluster-aware and cannot be
  435. # used in a shared (active/active) fashion in a cluster.
  436. #
  437. # Specify the '--type <mirror|raid1>' option to override this default
  438. # setting.
  439. mirror_segtype_default = "raid1"
  440. # 'raid10_segtype_default' determines the segment types used by default
  441. # when the '--stripes/-i' and '--mirrors/-m' arguments are both specified
  442. # during the creation of a logical volume.
  443. # Possible settings include:
  444. #
  445. # "raid10" - This implementation leverages MD's RAID10 personality through
  446. # device-mapper.
  447. #
  448. # "mirror" - LVM will layer the 'mirror' and 'stripe' segment types. It
  449. # will do this by creating a mirror on top of striped sub-LVs;
  450. # effectively creating a RAID 0+1 array. This is suboptimal
  451. # in terms of providing redunancy and performance. Changing to
  452. # this setting is not advised.
  453. # Specify the '--type <raid10|mirror>' option to override this default
  454. # setting.
  455. raid10_segtype_default = "raid10"
  456. # The default format for displaying LV names in lvdisplay was changed
  457. # in version 2.02.89 to show the LV name and path separately.
  458. # Previously this was always shown as /dev/vgname/lvname even when that
  459. # was never a valid path in the /dev filesystem.
  460. # Set to 1 to reinstate the previous format.
  461. #
  462. # lvdisplay_shows_full_device_path = 0
  463. # Whether to use (trust) a running instance of lvmetad. If this is set to
  464. # 0, all commands fall back to the usual scanning mechanisms. When set to 1
  465. # *and* when lvmetad is running (automatically instantiated by making use of
  466. # systemd's socket-based service activation or run as an initscripts service
  467. # or run manually), the volume group metadata and PV state flags are obtained
  468. # from the lvmetad instance and no scanning is done by the individual
  469. # commands. In a setup with lvmetad, lvmetad udev rules *must* be set up for
  470. # LVM to work correctly. Without proper udev rules, all changes in block
  471. # device configuration will be *ignored* until a manual 'pvscan --cache'
  472. # is performed. These rules are installed by default.
  473. #
  474. # If lvmetad has been running while use_lvmetad was 0, it MUST be stopped
  475. # before changing use_lvmetad to 1 and started again afterwards.
  476. #
  477. # If using lvmetad, the volume activation is also switched to automatic
  478. # event-based mode. In this mode, the volumes are activated based on
  479. # incoming udev events that automatically inform lvmetad about new PVs
  480. # that appear in the system. Once the VG is complete (all the PVs are
  481. # present), it is auto-activated. The activation/auto_activation_volume_list
  482. # setting controls which volumes are auto-activated (all by default).
  483. #
  484. # A note about device filtering while lvmetad is used:
  485. # When lvmetad is updated (either automatically based on udev events
  486. # or directly by pvscan --cache <device> call), the devices/filter
  487. # is ignored and all devices are scanned by default. The lvmetad always
  488. # keeps unfiltered information which is then provided to LVM commands
  489. # and then each LVM command does the filtering based on devices/filter
  490. # setting itself.
  491. # To prevent scanning devices completely, even when using lvmetad,
  492. # the devices/global_filter must be used.
  493. # N.B. Don't use lvmetad with locking type 3 as lvmetad is not yet
  494. # supported in clustered environment. If use_lvmetad=1 and locking_type=3
  495. # is set at the same time, LVM always issues a warning message about this
  496. # and then it automatically disables lvmetad use.
  497. use_lvmetad = 1
  498. # Full path of the utility called to check that a thin metadata device
  499. # is in a state that allows it to be used.
  500. # Each time a thin pool needs to be activated or after it is deactivated
  501. # this utility is executed. The activation will only proceed if the utility
  502. # has an exit status of 0.
  503. # Set to "" to skip this check. (Not recommended.)
  504. # The thin tools are available as part of the device-mapper-persistent-data
  505. # package from https://github.com/jthornber/thin-provisioning-tools.
  506. #
  507. # thin_check_executable = "/usr/bin/thin_check"
  508. # Array of string options passed with thin_check command. By default,
  509. # option "-q" is for quiet output.
  510. # With thin_check version 2.1 or newer you can add "--ignore-non-fatal-errors"
  511. # to let it pass through ignoreable errors and fix them later.
  512. #
  513. # thin_check_options = [ "-q" ]
  514. # Full path of the utility called to repair a thin metadata device
  515. # is in a state that allows it to be used.
  516. # Each time a thin pool needs repair this utility is executed.
  517. # See thin_check_executable how to obtain binaries.
  518. #
  519. # thin_repair_executable = "/usr/bin/thin_repair"
  520. # Array of extra string options passed with thin_repair command.
  521. # thin_repair_options = [ "" ]
  522. # Full path of the utility called to dump thin metadata content.
  523. # See thin_check_executable how to obtain binaries.
  524. #
  525. # thin_dump_executable = "/usr/bin/thin_dump"
  526. # If set, given features are not used by thin driver.
  527. # This can be helpful not just for testing, but i.e. allows to avoid
  528. # using problematic implementation of some thin feature.
  529. # Features:
  530. # block_size
  531. # discards
  532. # discards_non_power_2
  533. # external_origin
  534. # metadata_resize
  535. #
  536. # thin_disabled_features = [ "discards", "block_size" ]
  537. }
  538. activation {
  539. # Set to 1 to perform internal checks on the operations issued to
  540. # libdevmapper. Useful for debugging problems with activation.
  541. # Some of the checks may be expensive, so it's best to use this
  542. # only when there seems to be a problem.
  543. checks = 0
  544. # Set to 0 to disable udev synchronisation (if compiled into the binaries).
  545. # Processes will not wait for notification from udev.
  546. # They will continue irrespective of any possible udev processing
  547. # in the background. You should only use this if udev is not running
  548. # or has rules that ignore the devices LVM2 creates.
  549. # The command line argument --nodevsync takes precedence over this setting.
  550. # If set to 1 when udev is not running, and there are LVM2 processes
  551. # waiting for udev, run 'dmsetup udevcomplete_all' manually to wake them up.
  552. udev_sync = 1
  553. # Set to 0 to disable the udev rules installed by LVM2 (if built with
  554. # --enable-udev_rules). LVM2 will then manage the /dev nodes and symlinks
  555. # for active logical volumes directly itself.
  556. # N.B. Manual intervention may be required if this setting is changed
  557. # while any logical volumes are active.
  558. udev_rules = 1
  559. # Set to 1 for LVM2 to verify operations performed by udev. This turns on
  560. # additional checks (and if necessary, repairs) on entries in the device
  561. # directory after udev has completed processing its events.
  562. # Useful for diagnosing problems with LVM2/udev interactions.
  563. verify_udev_operations = 0
  564. # If set to 1 and if deactivation of an LV fails, perhaps because
  565. # a process run from a quick udev rule temporarily opened the device,
  566. # retry the operation for a few seconds before failing.
  567. retry_deactivation = 1
  568. # How to fill in missing stripes if activating an incomplete volume.
  569. # Using "error" will make inaccessible parts of the device return
  570. # I/O errors on access. You can instead use a device path, in which
  571. # case, that device will be used to in place of missing stripes.
  572. # But note that using anything other than "error" with mirrored
  573. # or snapshotted volumes is likely to result in data corruption.
  574. missing_stripe_filler = "error"
  575. # The linear target is an optimised version of the striped target
  576. # that only handles a single stripe. Set this to 0 to disable this
  577. # optimisation and always use the striped target.
  578. use_linear_target = 1
  579. # How much stack (in KB) to reserve for use while devices suspended
  580. # Prior to version 2.02.89 this used to be set to 256KB
  581. reserved_stack = 64
  582. # How much memory (in KB) to reserve for use while devices suspended
  583. reserved_memory = 8192
  584. # Nice value used while devices suspended
  585. process_priority = -18
  586. # If volume_list is defined, each LV is only activated if there is a
  587. # match against the list.
  588. #
  589. # "vgname" and "vgname/lvname" are matched exactly.
  590. # "@tag" matches any tag set in the LV or VG.
  591. # "@*" matches if any tag defined on the host is also set in the LV or VG
  592. #
  593. # If any host tags exist but volume_list is not defined, a default
  594. # single-entry list containing "@*" is assumed.
  595. #
  596. # volume_list = [ "vg1", "vg2/lvol1", "@tag1", "@*" ]
  597. # If auto_activation_volume_list is defined, each LV that is to be
  598. # activated with the autoactivation option (--activate ay/-a ay) is
  599. # first checked against the list. There are two scenarios in which
  600. # the autoactivation option is used:
  601. #
  602. # - automatic activation of volumes based on incoming PVs. If all the
  603. # PVs making up a VG are present in the system, the autoactivation
  604. # is triggered. This requires lvmetad (global/use_lvmetad=1) and udev
  605. # to be running. In this case, "pvscan --cache -aay" is called
  606. # automatically without any user intervention while processing
  607. # udev events. Please, make sure you define auto_activation_volume_list
  608. # properly so only the volumes you want and expect are autoactivated.
  609. #
  610. # - direct activation on command line with the autoactivation option.
  611. # In this case, the user calls "vgchange --activate ay/-a ay" or
  612. # "lvchange --activate ay/-a ay" directly.
  613. #
  614. # By default, the auto_activation_volume_list is not defined and all
  615. # volumes will be activated either automatically or by using --activate ay/-a ay.
  616. #
  617. # N.B. The "activation/volume_list" is still honoured in all cases so even
  618. # if the VG/LV passes the auto_activation_volume_list, it still needs to
  619. # pass the volume_list for it to be activated in the end.
  620. # If auto_activation_volume_list is defined but empty, no volumes will be
  621. # activated automatically and --activate ay/-a ay will do nothing.
  622. #
  623. # auto_activation_volume_list = []
  624. # If auto_activation_volume_list is defined and it's not empty, only matching
  625. # volumes will be activated either automatically or by using --activate ay/-a ay.
  626. #
  627. # "vgname" and "vgname/lvname" are matched exactly.
  628. # "@tag" matches any tag set in the LV or VG.
  629. # "@*" matches if any tag defined on the host is also set in the LV or VG
  630. #
  631. # auto_activation_volume_list = [ "vg1", "vg2/lvol1", "@tag1", "@*" ]
  632. # If read_only_volume_list is defined, each LV that is to be activated
  633. # is checked against the list, and if it matches, it as activated
  634. # in read-only mode. (This overrides '--permission rw' stored in the
  635. # metadata.)
  636. #
  637. # "vgname" and "vgname/lvname" are matched exactly.
  638. # "@tag" matches any tag set in the LV or VG.
  639. # "@*" matches if any tag defined on the host is also set in the LV or VG
  640. #
  641. # read_only_volume_list = [ "vg1", "vg2/lvol1", "@tag1", "@*" ]
  642. # Each LV can have an 'activation skip' flag stored persistently against it.
  643. # During activation, this flag is used to decide whether such an LV is skipped.
  644. # The 'activation skip' flag can be set during LV creation and by default it
  645. # is automatically set for thin snapshot LVs. The 'auto_set_activation_skip'
  646. # enables or disables this automatic setting of the flag while LVs are created.
  647. # auto_set_activation_skip = 1
  648. # For RAID or 'mirror' segment types, 'raid_region_size' is the
  649. # size (in kiB) of each:
  650. # - synchronization operation when initializing
  651. # - each copy operation when performing a 'pvmove' (using 'mirror' segtype)
  652. # This setting has replaced 'mirror_region_size' since version 2.02.99
  653. raid_region_size = 512
  654. # Setting to use when there is no readahead value stored in the metadata.
  655. #
  656. # "none" - Disable readahead.
  657. # "auto" - Use default value chosen by kernel.
  658. readahead = "auto"
  659. # 'raid_fault_policy' defines how a device failure in a RAID logical
  660. # volume is handled. This includes logical volumes that have the following
  661. # segment types: raid1, raid4, raid5*, and raid6*.
  662. #
  663. # In the event of a failure, the following policies will determine what
  664. # actions are performed during the automated response to failures (when
  665. # dmeventd is monitoring the RAID logical volume) and when 'lvconvert' is
  666. # called manually with the options '--repair' and '--use-policies'.
  667. #
  668. # "warn" - Use the system log to warn the user that a device in the RAID
  669. # logical volume has failed. It is left to the user to run
  670. # 'lvconvert --repair' manually to remove or replace the failed
  671. # device. As long as the number of failed devices does not
  672. # exceed the redundancy of the logical volume (1 device for
  673. # raid4/5, 2 for raid6, etc) the logical volume will remain
  674. # usable.
  675. #
  676. # "allocate" - Attempt to use any extra physical volumes in the volume
  677. # group as spares and replace faulty devices.
  678. #
  679. raid_fault_policy = "warn"
  680. # 'mirror_image_fault_policy' and 'mirror_log_fault_policy' define
  681. # how a device failure affecting a mirror (of "mirror" segment type) is
  682. # handled. A mirror is composed of mirror images (copies) and a log.
  683. # A disk log ensures that a mirror does not need to be re-synced
  684. # (all copies made the same) every time a machine reboots or crashes.
  685. #
  686. # In the event of a failure, the specified policy will be used to determine
  687. # what happens. This applies to automatic repairs (when the mirror is being
  688. # monitored by dmeventd) and to manual lvconvert --repair when
  689. # --use-policies is given.
  690. #
  691. # "remove" - Simply remove the faulty device and run without it. If
  692. # the log device fails, the mirror would convert to using
  693. # an in-memory log. This means the mirror will not
  694. # remember its sync status across crashes/reboots and
  695. # the entire mirror will be re-synced. If a
  696. # mirror image fails, the mirror will convert to a
  697. # non-mirrored device if there is only one remaining good
  698. # copy.
  699. #
  700. # "allocate" - Remove the faulty device and try to allocate space on
  701. # a new device to be a replacement for the failed device.
  702. # Using this policy for the log is fast and maintains the
  703. # ability to remember sync state through crashes/reboots.
  704. # Using this policy for a mirror device is slow, as it
  705. # requires the mirror to resynchronize the devices, but it
  706. # will preserve the mirror characteristic of the device.
  707. # This policy acts like "remove" if no suitable device and
  708. # space can be allocated for the replacement.
  709. #
  710. # "allocate_anywhere" - Not yet implemented. Useful to place the log device
  711. # temporarily on same physical volume as one of the mirror
  712. # images. This policy is not recommended for mirror devices
  713. # since it would break the redundant nature of the mirror. This
  714. # policy acts like "remove" if no suitable device and space can
  715. # be allocated for the replacement.
  716. mirror_log_fault_policy = "allocate"
  717. mirror_image_fault_policy = "remove"
  718. # 'snapshot_autoextend_threshold' and 'snapshot_autoextend_percent' define
  719. # how to handle automatic snapshot extension. The former defines when the
  720. # snapshot should be extended: when its space usage exceeds this many
  721. # percent. The latter defines how much extra space should be allocated for
  722. # the snapshot, in percent of its current size.
  723. #
  724. # For example, if you set snapshot_autoextend_threshold to 70 and
  725. # snapshot_autoextend_percent to 20, whenever a snapshot exceeds 70% usage,
  726. # it will be extended by another 20%. For a 1G snapshot, using up 700M will
  727. # trigger a resize to 1.2G. When the usage exceeds 840M, the snapshot will
  728. # be extended to 1.44G, and so on.
  729. #
  730. # Setting snapshot_autoextend_threshold to 100 disables automatic
  731. # extensions. The minimum value is 50 (A setting below 50 will be treated
  732. # as 50).
  733. snapshot_autoextend_threshold = 100
  734. snapshot_autoextend_percent = 20
  735. # 'thin_pool_autoextend_threshold' and 'thin_pool_autoextend_percent' define
  736. # how to handle automatic pool extension. The former defines when the
  737. # pool should be extended: when its space usage exceeds this many
  738. # percent. The latter defines how much extra space should be allocated for
  739. # the pool, in percent of its current size.
  740. #
  741. # For example, if you set thin_pool_autoextend_threshold to 70 and
  742. # thin_pool_autoextend_percent to 20, whenever a pool exceeds 70% usage,
  743. # it will be extended by another 20%. For a 1G pool, using up 700M will
  744. # trigger a resize to 1.2G. When the usage exceeds 840M, the pool will
  745. # be extended to 1.44G, and so on.
  746. #
  747. # Setting thin_pool_autoextend_threshold to 100 disables automatic
  748. # extensions. The minimum value is 50 (A setting below 50 will be treated
  749. # as 50).
  750. thin_pool_autoextend_threshold = 100
  751. thin_pool_autoextend_percent = 20
  752. # While activating devices, I/O to devices being (re)configured is
  753. # suspended, and as a precaution against deadlocks, LVM2 needs to pin
  754. # any memory it is using so it is not paged out. Groups of pages that
  755. # are known not to be accessed during activation need not be pinned
  756. # into memory. Each string listed in this setting is compared against
  757. # each line in /proc/self/maps, and the pages corresponding to any
  758. # lines that match are not pinned. On some systems locale-archive was
  759. # found to make up over 80% of the memory used by the process.
  760. # mlock_filter = [ "locale/locale-archive", "gconv/gconv-modules.cache" ]
  761. # Set to 1 to revert to the default behaviour prior to version 2.02.62
  762. # which used mlockall() to pin the whole process's memory while activating
  763. # devices.
  764. use_mlockall = 0
  765. # Monitoring is enabled by default when activating logical volumes.
  766. # Set to 0 to disable monitoring or use the --ignoremonitoring option.
  767. monitoring = 1
  768. # When pvmove or lvconvert must wait for the kernel to finish
  769. # synchronising or merging data, they check and report progress
  770. # at intervals of this number of seconds. The default is 15 seconds.
  771. # If this is set to 0 and there is only one thing to wait for, there
  772. # are no progress reports, but the process is awoken immediately the
  773. # operation is complete.
  774. polling_interval = 15
  775. }
  776. ####################
  777. # Advanced section #
  778. ####################
  779. # Metadata settings
  780. #
  781. # metadata {
  782. # Default number of copies of metadata to hold on each PV. 0, 1 or 2.
  783. # You might want to override it from the command line with 0
  784. # when running pvcreate on new PVs which are to be added to large VGs.
  785. # pvmetadatacopies = 1
  786. # Default number of copies of metadata to maintain for each VG.
  787. # If set to a non-zero value, LVM automatically chooses which of
  788. # the available metadata areas to use to achieve the requested
  789. # number of copies of the VG metadata. If you set a value larger
  790. # than the the total number of metadata areas available then
  791. # metadata is stored in them all.
  792. # The default value of 0 ("unmanaged") disables this automatic
  793. # management and allows you to control which metadata areas
  794. # are used at the individual PV level using 'pvchange
  795. # --metadataignore y/n'.
  796. # vgmetadatacopies = 0
  797. # Approximate default size of on-disk metadata areas in sectors.
  798. # You should increase this if you have large volume groups or
  799. # you want to retain a large on-disk history of your metadata changes.
  800. # pvmetadatasize = 255
  801. # List of directories holding live copies of text format metadata.
  802. # These directories must not be on logical volumes!
  803. # It's possible to use LVM2 with a couple of directories here,
  804. # preferably on different (non-LV) filesystems, and with no other
  805. # on-disk metadata (pvmetadatacopies = 0). Or this can be in
  806. # addition to on-disk metadata areas.
  807. # The feature was originally added to simplify testing and is not
  808. # supported under low memory situations - the machine could lock up.
  809. #
  810. # Never edit any files in these directories by hand unless you
  811. # you are absolutely sure you know what you are doing! Use
  812. # the supplied toolset to make changes (e.g. vgcfgrestore).
  813. # dirs = [ "/etc/lvm/metadata", "/mnt/disk2/lvm/metadata2" ]
  814. #}
  815. # Event daemon
  816. #
  817. dmeventd {
  818. # mirror_library is the library used when monitoring a mirror device.
  819. #
  820. # "libdevmapper-event-lvm2mirror.so" attempts to recover from
  821. # failures. It removes failed devices from a volume group and
  822. # reconfigures a mirror as necessary. If no mirror library is
  823. # provided, mirrors are not monitored through dmeventd.
  824. mirror_library = "libdevmapper-event-lvm2mirror.so"
  825. # snapshot_library is the library used when monitoring a snapshot device.
  826. #
  827. # "libdevmapper-event-lvm2snapshot.so" monitors the filling of
  828. # snapshots and emits a warning through syslog when the use of
  829. # the snapshot exceeds 80%. The warning is repeated when 85%, 90% and
  830. # 95% of the snapshot is filled.
  831. snapshot_library = "libdevmapper-event-lvm2snapshot.so"
  832. # thin_library is the library used when monitoring a thin device.
  833. #
  834. # "libdevmapper-event-lvm2thin.so" monitors the filling of
  835. # pool and emits a warning through syslog when the use of
  836. # the pool exceeds 80%. The warning is repeated when 85%, 90% and
  837. # 95% of the pool is filled.
  838. thin_library = "libdevmapper-event-lvm2thin.so"
  839. # Full path of the dmeventd binary.
  840. #
  841. # executable = "/usr/sbin/dmeventd"
  842. }