digimer

Untitled

Mar 19th, 2011
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 19.24 KB | None | 0 0
  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.  
  11. # This section allows you to configure which block devices should
  12. # be used by the LVM system.
  13. devices {
  14.  
  15. # Where do you want your volume groups to appear ?
  16. dir = "/dev"
  17.  
  18. # An array of directories that contain the device nodes you wish
  19. # to use with LVM2.
  20. scan = [ "/dev" ]
  21.  
  22. # If several entries in the scanned directories correspond to the
  23. # same block device and the tools need to display a name for device,
  24. # all the pathnames are matched against each item in the following
  25. # list of regular expressions in turn and the first match is used.
  26. preferred_names = [ ]
  27.  
  28. # Try to avoid using undescriptive /dev/dm-N names, if present.
  29. # preferred_names = [ "^/dev/mpath/", "^/dev/mapper/mpath", "^/dev/[hs]d" ]
  30.  
  31. # A filter that tells LVM2 to only use a restricted set of devices.
  32. # The filter consists of an array of regular expressions. These
  33. # expressions can be delimited by a character of your choice, and
  34. # prefixed with either an 'a' (for accept) or 'r' (for reject).
  35. # The first expression found to match a device name determines if
  36. # the device will be accepted or rejected (ignored). Devices that
  37. # don't match any patterns are accepted.
  38.  
  39. # Be careful if there there are symbolic links or multiple filesystem
  40. # entries for the same device as each name is checked separately against
  41. # the list of patterns. The effect is that if any name matches any 'a'
  42. # pattern, the device is accepted; otherwise if any name matches any 'r'
  43. # pattern it is rejected; otherwise it is accepted.
  44.  
  45. # Don't have more than one filter line active at once: only one gets used.
  46.  
  47. # Run vgscan after you change this parameter to ensure that
  48. # the cache file gets regenerated (see below).
  49. # If it doesn't do what you expect, check the output of 'vgscan -vvvv'.
  50.  
  51.  
  52. # By default we accept every block device:
  53. filter = [ "a|/dev/drbd*|", "r/.*/" ]
  54. #filter = [ "a/.*/" ]
  55.  
  56. # Exclude the cdrom drive
  57. # filter = [ "r|/dev/cdrom|" ]
  58.  
  59. # When testing I like to work with just loopback devices:
  60. # filter = [ "a/loop/", "r/.*/" ]
  61.  
  62. # Or maybe all loops and ide drives except hdc:
  63. # filter =[ "a|loop|", "r|/dev/hdc|", "a|/dev/ide|", "r|.*|" ]
  64.  
  65. # Use anchors if you want to be really specific
  66. # filter = [ "a|^/dev/hda8$|", "r/.*/" ]
  67.  
  68. # The results of the filtering are cached on disk to avoid
  69. # rescanning dud devices (which can take a very long time).
  70. # By default this cache is stored in the /etc/lvm/cache directory
  71. # in a file called '.cache'.
  72. # It is safe to delete the contents: the tools regenerate it.
  73. # (The old setting 'cache' is still respected if neither of
  74. # these new ones is present.)
  75. cache_dir = "/etc/lvm/cache"
  76. cache_file_prefix = ""
  77.  
  78. # You can turn off writing this cache file by setting this to 0.
  79. write_cache_state = 1
  80.  
  81. # Advanced settings.
  82.  
  83. # List of pairs of additional acceptable block device types found
  84. # in /proc/devices with maximum (non-zero) number of partitions.
  85. # types = [ "fd", 16 ]
  86.  
  87. # If sysfs is mounted (2.6 kernels) restrict device scanning to
  88. # the block devices it believes are valid.
  89. # 1 enables; 0 disables.
  90. sysfs_scan = 1
  91.  
  92. # By default, LVM2 will ignore devices used as components of
  93. # software RAID (md) devices by looking for md superblocks.
  94. # 1 enables; 0 disables.
  95. md_component_detection = 1
  96.  
  97. # By default, if a PV is placed directly upon an md device, LVM2
  98. # will align its data blocks with the md device's stripe-width.
  99. # 1 enables; 0 disables.
  100. md_chunk_alignment = 1
  101.  
  102. # By default, the start of a PV's data area will be a multiple of
  103. # the 'minimum_io_size' or 'optimal_io_size' exposed in sysfs.
  104. # - minimum_io_size - the smallest request the device can perform
  105. # w/o incurring a read-modify-write penalty (e.g. MD's chunk size)
  106. # - optimal_io_size - the device's preferred unit of receiving I/O
  107. # (e.g. MD's stripe width)
  108. # minimum_io_size is used if optimal_io_size is undefined (0).
  109. # If md_chunk_alignment is enabled, that detects the optimal_io_size.
  110. # This setting takes precedence over md_chunk_alignment.
  111. # 1 enables; 0 disables.
  112. data_alignment_detection = 1
  113.  
  114. # Alignment (in KB) of start of data area when creating a new PV.
  115. # If a PV is placed directly upon an md device and md_chunk_alignment or
  116. # data_alignment_detection is enabled this parameter is ignored.
  117. # Set to 0 for the default alignment of 64KB or page size, if larger.
  118. data_alignment = 0
  119.  
  120. # By default, the start of the PV's aligned data area will be shifted by
  121. # the 'alignment_offset' exposed in sysfs. This offset is often 0 but
  122. # may be non-zero; e.g.: certain 4KB sector drives that compensate for
  123. # windows partitioning will have an alignment_offset of 3584 bytes
  124. # (sector 7 is the lowest aligned logical block, the 4KB sectors start
  125. # at LBA -1, and consequently sector 63 is aligned on a 4KB boundary).
  126. # 1 enables; 0 disables.
  127. data_alignment_offset_detection = 1
  128.  
  129. # If, while scanning the system for PVs, LVM2 encounters a device-mapper
  130. # device that has its I/O suspended, it waits for it to become accessible.
  131. # Set this to 1 to skip such devices. This should only be needed
  132. # in recovery situations.
  133. ignore_suspended_devices = 0
  134. }
  135.  
  136. # This section that allows you to configure the nature of the
  137. # information that LVM2 reports.
  138. log {
  139.  
  140. # Controls the messages sent to stdout or stderr.
  141. # There are three levels of verbosity, 3 being the most verbose.
  142. verbose = 0
  143.  
  144. # Should we send log messages through syslog?
  145. # 1 is yes; 0 is no.
  146. syslog = 1
  147.  
  148. # Should we log error and debug messages to a file?
  149. # By default there is no log file.
  150. #file = "/var/log/lvm2.log"
  151.  
  152. # Should we overwrite the log file each time the program is run?
  153. # By default we append.
  154. overwrite = 0
  155.  
  156. # What level of log messages should we send to the log file and/or syslog?
  157. # There are 6 syslog-like log levels currently in use - 2 to 7 inclusive.
  158. # 7 is the most verbose (LOG_DEBUG).
  159. level = 0
  160.  
  161. # Format of output messages
  162. # Whether or not (1 or 0) to indent messages according to their severity
  163. indent = 1
  164.  
  165. # Whether or not (1 or 0) to display the command name on each line output
  166. command_names = 0
  167.  
  168. # A prefix to use before the message text (but after the command name,
  169. # if selected). Default is two spaces, so you can see/grep the severity
  170. # of each message.
  171. prefix = " "
  172.  
  173. # To make the messages look similar to the original LVM tools use:
  174. # indent = 0
  175. # command_names = 1
  176. # prefix = " -- "
  177.  
  178. # Set this if you want log messages during activation.
  179. # Don't use this in low memory situations (can deadlock).
  180. # activation = 0
  181. }
  182.  
  183. # Configuration of metadata backups and archiving. In LVM2 when we
  184. # talk about a 'backup' we mean making a copy of the metadata for the
  185. # *current* system. The 'archive' contains old metadata configurations.
  186. # Backups are stored in a human readeable text format.
  187. backup {
  188.  
  189. # Should we maintain a backup of the current metadata configuration ?
  190. # Use 1 for Yes; 0 for No.
  191. # Think very hard before turning this off!
  192. backup = 1
  193.  
  194. # Where shall we keep it ?
  195. # Remember to back up this directory regularly!
  196. backup_dir = "/etc/lvm/backup"
  197.  
  198. # Should we maintain an archive of old metadata configurations.
  199. # Use 1 for Yes; 0 for No.
  200. # On by default. Think very hard before turning this off.
  201. archive = 1
  202.  
  203. # Where should archived files go ?
  204. # Remember to back up this directory regularly!
  205. archive_dir = "/etc/lvm/archive"
  206.  
  207. # What is the minimum number of archive files you wish to keep ?
  208. retain_min = 10
  209.  
  210. # What is the minimum time you wish to keep an archive file for ?
  211. retain_days = 30
  212. }
  213.  
  214. # Settings for the running LVM2 in shell (readline) mode.
  215. shell {
  216.  
  217. # Number of lines of history to store in ~/.lvm_history
  218. history_size = 100
  219. }
  220.  
  221.  
  222. # Miscellaneous global LVM2 settings
  223. global {
  224. library_dir = "/usr/lib64"
  225.  
  226. # The file creation mask for any files and directories created.
  227. # Interpreted as octal if the first digit is zero.
  228. umask = 077
  229.  
  230. # Allow other users to read the files
  231. #umask = 022
  232.  
  233. # Enabling test mode means that no changes to the on disk metadata
  234. # will be made. Equivalent to having the -t option on every
  235. # command. Defaults to off.
  236. test = 0
  237.  
  238. # Default value for --units argument
  239. units = "h"
  240.  
  241. # Since version 2.02.54, the tools distinguish between powers of
  242. # 1024 bytes (e.g. KiB, MiB, GiB) and powers of 1000 bytes (e.g.
  243. # KB, MB, GB).
  244. # If you have scripts that depend on the old behaviour, set this to 0
  245. # temporarily until you update them.
  246. si_unit_consistency = 0
  247.  
  248. # Whether or not to communicate with the kernel device-mapper.
  249. # Set to 0 if you want to use the tools to manipulate LVM metadata
  250. # without activating any logical volumes.
  251. # If the device-mapper kernel driver is not present in your kernel
  252. # setting this to 0 should suppress the error messages.
  253. activation = 1
  254.  
  255. # If we can't communicate with device-mapper, should we try running
  256. # the LVM1 tools?
  257. # This option only applies to 2.4 kernels and is provided to help you
  258. # switch between device-mapper kernels and LVM1 kernels.
  259. # The LVM1 tools need to be installed with .lvm1 suffices
  260. # e.g. vgscan.lvm1 and they will stop working after you start using
  261. # the new lvm2 on-disk metadata format.
  262. # The default value is set when the tools are built.
  263. # fallback_to_lvm1 = 0
  264.  
  265. # The default metadata format that commands should use - "lvm1" or "lvm2".
  266. # The command line override is -M1 or -M2.
  267. # Defaults to "lvm2".
  268. # format = "lvm2"
  269.  
  270. # Location of proc filesystem
  271. proc = "/proc"
  272.  
  273. # Type of locking to use. Defaults to local file-based locking (1).
  274. # Turn locking off by setting to 0 (dangerous: risks metadata corruption
  275. # if LVM2 commands get run concurrently).
  276. # Type 2 uses the external shared library locking_library.
  277. # Type 3 uses built-in clustered locking.
  278. # Type 4 uses read-only locking which forbids any operations that might
  279. # change metadata.
  280. locking_type = 3
  281.  
  282. # Set to 0 to fail when a lock request cannot be satisfied immediately.
  283. wait_for_locks = 1
  284.  
  285. # If using external locking (type 2) and initialisation fails,
  286. # with this set to 1 an attempt will be made to use the built-in
  287. # clustered locking.
  288. # If you are using a customised locking_library you should set this to 0.
  289. fallback_to_clustered_locking = 1
  290.  
  291. # If an attempt to initialise type 2 or type 3 locking failed, perhaps
  292. # because cluster components such as clvmd are not running, with this set
  293. # to 1 an attempt will be made to use local file-based locking (type 1).
  294. # If this succeeds, only commands against local volume groups will proceed.
  295. # Volume Groups marked as clustered will be ignored.
  296. fallback_to_local_locking = 1
  297.  
  298. # Local non-LV directory that holds file-based locks while commands are
  299. # in progress. A directory like /tmp that may get wiped on reboot is OK.
  300. locking_dir = "/var/lock/lvm"
  301.  
  302. # Whenever there are competing read-only and read-write access requests for
  303. # a volume group's metadata, instead of always granting the read-only
  304. # requests immediately, delay them to allow the read-write requests to be
  305. # serviced. Without this setting, write access may be stalled by a high
  306. # volume of read-only requests.
  307. # NB. This option only affects locking_type = 1 viz. local file-based
  308. # locking.
  309. prioritise_write_locks = 1
  310.  
  311. # Other entries can go here to allow you to load shared libraries
  312. # e.g. if support for LVM1 metadata was compiled as a shared library use
  313. # format_libraries = "liblvm2format1.so"
  314. # Full pathnames can be given.
  315.  
  316. # Search this directory first for shared libraries.
  317. # library_dir = "/lib"
  318.  
  319. # The external locking library to load if locking_type is set to 2.
  320. # locking_library = "liblvm2clusterlock.so"
  321. }
  322.  
  323. activation {
  324. # Set to 0 to disable udev syncronisation (if compiled into the binaries).
  325. # Processes will not wait for notification from udev.
  326. # They will continue irrespective of any possible udev processing
  327. # in the background. You should only use this if udev is not running
  328. # or has rules that ignore the devices LVM2 creates.
  329. # The command line argument --nodevsync takes precedence over this setting.
  330. # If set to 1 when udev is not running, and there are LVM2 processes
  331. # waiting for udev, run 'dmsetup udevcomplete_all' manually to wake them up.
  332. udev_sync = 1
  333.  
  334. # How to fill in missing stripes if activating an incomplete volume.
  335. # Using "error" will make inaccessible parts of the device return
  336. # I/O errors on access. You can instead use a device path, in which
  337. # case, that device will be used to in place of missing stripes.
  338. # But note that using anything other than "error" with mirrored
  339. # or snapshotted volumes is likely to result in data corruption.
  340. missing_stripe_filler = "error"
  341.  
  342. # How much stack (in KB) to reserve for use while devices suspended
  343. reserved_stack = 256
  344.  
  345. # How much memory (in KB) to reserve for use while devices suspended
  346. reserved_memory = 8192
  347.  
  348. # Nice value used while devices suspended
  349. process_priority = -18
  350.  
  351. # If volume_list is defined, each LV is only activated if there is a
  352. # match against the list.
  353. # "vgname" and "vgname/lvname" are matched exactly.
  354. # "@tag" matches any tag set in the LV or VG.
  355. # "@*" matches if any tag defined on the host is also set in the LV or VG
  356. #
  357. # volume_list = [ "vg1", "vg2/lvol1", "@tag1", "@*" ]
  358. volume_list = ["@an-node01.alteeve.com", "@an-node02.alteeve.com", "drbd0_vg0", "@tag", "@*"]
  359.  
  360. # Size (in KB) of each copy operation when mirroring
  361. mirror_region_size = 512
  362.  
  363. # Setting to use when there is no readahead value stored in the metadata.
  364. #
  365. # "none" - Disable readahead.
  366. # "auto" - Use default value chosen by kernel.
  367. readahead = "auto"
  368.  
  369. # 'mirror_image_fault_policy' and 'mirror_log_fault_policy' define
  370. # how a device failure affecting a mirror is handled.
  371. # A mirror is composed of mirror images (copies) and a log.
  372. # A disk log ensures that a mirror does not need to be re-synced
  373. # (all copies made the same) every time a machine reboots or crashes.
  374. #
  375. # In the event of a failure, the specified policy will be used to determine
  376. # what happens. This applies to automatic repairs (when the mirror is being
  377. # monitored by dmeventd) and to manual lvconvert --repair when
  378. # --use-policies is given.
  379. #
  380. # "remove" - Simply remove the faulty device and run without it. If
  381. # the log device fails, the mirror would convert to using
  382. # an in-memory log. This means the mirror will not
  383. # remember its sync status across crashes/reboots and
  384. # the entire mirror will be re-synced. If a
  385. # mirror image fails, the mirror will convert to a
  386. # non-mirrored device if there is only one remaining good
  387. # copy.
  388. #
  389. # "allocate" - Remove the faulty device and try to allocate space on
  390. # a new device to be a replacement for the failed device.
  391. # Using this policy for the log is fast and maintains the
  392. # ability to remember sync state through crashes/reboots.
  393. # Using this policy for a mirror device is slow, as it
  394. # requires the mirror to resynchronize the devices, but it
  395. # will preserve the mirror characteristic of the device.
  396. # This policy acts like "remove" if no suitable device and
  397. # space can be allocated for the replacement.
  398. #
  399. # "allocate_anywhere" - Not yet implemented. Useful to place the log device
  400. # temporarily on same physical volume as one of the mirror
  401. # images. This policy is not recommended for mirror devices
  402. # since it would break the redundant nature of the mirror. This
  403. # policy acts like "remove" if no suitable device and space can
  404. # be allocated for the replacement.
  405.  
  406. mirror_log_fault_policy = "allocate"
  407. mirror_image_fault_policy = "remove"
  408. }
  409.  
  410.  
  411. ####################
  412. # Advanced section #
  413. ####################
  414.  
  415. # Metadata settings
  416. #
  417. # metadata {
  418. # Default number of copies of metadata to hold on each PV. 0, 1 or 2.
  419. # You might want to override it from the command line with 0
  420. # when running pvcreate on new PVs which are to be added to large VGs.
  421.  
  422. # pvmetadatacopies = 1
  423.  
  424. # Approximate default size of on-disk metadata areas in sectors.
  425. # You should increase this if you have large volume groups or
  426. # you want to retain a large on-disk history of your metadata changes.
  427.  
  428. # pvmetadatasize = 255
  429.  
  430. # List of directories holding live copies of text format metadata.
  431. # These directories must not be on logical volumes!
  432. # It's possible to use LVM2 with a couple of directories here,
  433. # preferably on different (non-LV) filesystems, and with no other
  434. # on-disk metadata (pvmetadatacopies = 0). Or this can be in
  435. # addition to on-disk metadata areas.
  436. # The feature was originally added to simplify testing and is not
  437. # supported under low memory situations - the machine could lock up.
  438. #
  439. # Never edit any files in these directories by hand unless you
  440. # you are absolutely sure you know what you are doing! Use
  441. # the supplied toolset to make changes (e.g. vgcfgrestore).
  442.  
  443. # dirs = [ "/etc/lvm/metadata", "/mnt/disk2/lvm/metadata2" ]
  444. #}
  445.  
  446. # Event daemon
  447. #
  448. dmeventd {
  449. # mirror_library is the library used when monitoring a mirror device.
  450. #
  451. # "libdevmapper-event-lvm2mirror.so" attempts to recover from
  452. # failures. It removes failed devices from a volume group and
  453. # reconfigures a mirror as necessary. If no mirror library is
  454. # provided, mirrors are not monitored through dmeventd.
  455.  
  456. mirror_library = "libdevmapper-event-lvm2mirror.so"
  457.  
  458. # snapshot_library is the library used when monitoring a snapshot device.
  459. #
  460. # "libdevmapper-event-lvm2snapshot.so" monitors the filling of
  461. # snapshots and emits a warning through syslog, when the use of
  462. # snapshot exceedes 80%. The warning is repeated when 85%, 90% and
  463. # 95% of the snapshot are filled.
  464.  
  465. snapshot_library = "libdevmapper-event-lvm2snapshot.so"
  466. }
Advertisement
Add Comment
Please, Sign In to add comment