NoPaste

lvm.conf

von Anonymous

SNIPPET_TEXT:
  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. \# This section allows you to configure which block devices should
  11. \# be used by the LVM system.
  12. devices {
  13.  
  14.     # Where do you want your volume groups to appear ?
  15.     dir = "/dev"
  16.  
  17.     # An array of directories that contain the device nodes you wish
  18.     # to use with LVM2.
  19.     scan = [ "/dev" ]
  20.  
  21.     # A filter that tells LVM2 to only use a restricted set of devices.
  22.     # The filter consists of an array of regular expressions.  These
  23.     # expressions can be delimited by a character of your choice, and
  24.     # prefixed with either an 'a' (for accept) or 'r' (for reject).
  25.     # The first expression found to match a device name determines if
  26.     # the device will be accepted or rejected (ignored).  Devices that
  27.     # don't match any patterns are accepted.
  28.  
  29.     # Be careful if there there are symbolic links or multiple filesystem
  30.     # entries for the same device as each name is checked separately against
  31.     # the list of patterns.  The effect is that if any name matches any 'a'
  32.     # pattern, the device is accepted; otherwise if any name matches any 'r'
  33.     # pattern it is rejected; otherwise it is accepted.
  34.  
  35.     # Remember to run vgscan after you change this parameter to ensure
  36.     # that the cache file gets regenerated (see below).
  37.  
  38.     # By default we accept every block device
  39.     # filter = [ "a/.*/" ]
  40.  
  41.     # Exclude the cdrom drive
  42.     filter = [ "r|/dev/cdrom|" ]
  43.  
  44.     # When testing I like to work with just loopback devices:
  45.     # filter = [ "a/loop/", "r/.*/" ]
  46.  
  47.     # Or maybe all loops and ide drives except hdc:
  48.     # filter =[ "a|loop|", "r|/dev/hdc|", "a|/dev/ide|", "r|.*|" ]
  49.  
  50.     # Use anchors if you want to be really specific
  51.     # filter = [ "a|^/dev/hda8$|", "r/.*/" ]
  52.  
  53.     # The results of the filtering are cached on disk to avoid
  54.     # rescanning dud devices (which can take a very long time).  By
  55.     # default this cache file is hidden in the /etc/lvm directory.
  56.     # It is safe to delete this file: the tools regenerate it.
  57.     cache = "/etc/lvm/.cache"
  58.  
  59.     # You can turn off writing this cache file by setting this to 0.
  60.     write_cache_state = 1
  61.  
  62.     # Advanced settings.
  63.    
  64.     # Device-mapper (crypto-support) xtops.de
  65.     types = [ "device-mapper", 16 ]
  66.  
  67.     # List of pairs of additional acceptable block device types found
  68.     # in /proc/devices with maximum (non-zero) number of partitions.
  69.     # types = [ "fd", 16 ]
  70.  
  71.     # If sysfs is mounted (2.6 kernels) restrict device scanning to
  72.     # the block devices it believes are valid.
  73.     # 1 enables; 0 disables.
  74.     sysfs_scan = 1     
  75.  
  76.     # By default, LVM2 will ignore devices used as components of
  77.     # software RAID (md) devices by looking for md superblocks.
  78.     # 1 enables; 0 disables.
  79.     # md_component_detection = 0
  80.     md_component_detection = 1
  81. }
  82.  
  83. \# This section that allows you to configure the nature of the
  84. \# information that LVM2 reports.
  85. log {
  86.  
  87.     # Controls the messages sent to stdout or stderr.
  88.     # There are three levels of verbosity, 3 being the most verbose.
  89.     verbose = 0
  90.  
  91.     # Should we send log messages through syslog?
  92.     # 1 is yes; 0 is no.
  93.     syslog = 1
  94.  
  95.     # Should we log error and debug messages to a file?
  96.     # By default there is no log file.
  97.     #file = "/var/log/lvm2.log"
  98.  
  99.     # Should we overwrite the log file each time the program is run?
  100.     # By default we append.
  101.     overwrite = 0
  102.  
  103.     # What level of log messages should we send to the log file and/or syslog?
  104.     # There are 6 syslog-like log levels currently in use - 2 to 7 inclusive.
  105.     # 7 is the most verbose (LOG_DEBUG).
  106.     level = 0
  107.    
  108.     # Format of output messages
  109.     # Whether or not (1 or 0) to indent messages according to their severity
  110.     indent = 1
  111.  
  112.     # Whether or not (1 or 0) to display the command name on each line output
  113.     command_names = 0
  114.  
  115.     # A prefix to use before the message text (but after the command name,
  116.     # if selected).  Default is two spaces, so you can see/grep the severity
  117.     # of each message.
  118.     prefix = "  "
  119.  
  120.     # To make the messages look similar to the original LVM tools use:
  121.     #   indent = 0
  122.     #   command_names = 1
  123.     #   prefix = " -- "
  124.  
  125.     # Set this if you want log messages during activation.
  126.     # Don't use this in low memory situations (can deadlock).
  127.     # activation = 0
  128. }
  129.  
  130. \# Configuration of metadata backups and archiving.  In LVM2 when we
  131. \# talk about a 'backup' we mean making a copy of the metadata for the
  132. \# *current* system.  The 'archive' contains old metadata configurations.
  133. \# Backups are stored in a human readeable text format.
  134. backup {
  135.  
  136.     # Should we maintain a backup of the current metadata configuration ?
  137.     # Use 1 for Yes; 0 for No.
  138.     # Think very hard before turning this off!
  139.     backup = 1
  140.  
  141.     # Where shall we keep it ?
  142.     # Remember to back up this directory regularly!
  143.     backup_dir = "/etc/lvm/backup"
  144.  
  145.     # Should we maintain an archive of old metadata configurations.
  146.     # Use 1 for Yes; 0 for No.
  147.     # On by default.  Think very hard before turning this off.
  148.     archive = 1
  149.  
  150.     # Where should archived files go ?
  151.     # Remember to back up this directory regularly!
  152.     archive_dir = "/etc/lvm/archive"
  153.    
  154.     # What is the minimum number of archive files you wish to keep ?
  155.     retain_min = 10
  156.  
  157.     # What is the minimum time you wish to keep an archive file for ?
  158.     retain_days = 30
  159. }
  160.  
  161. \# Settings for the running LVM2 in shell (readline) mode.
  162. shell {
  163.  
  164.     # Number of lines of history to store in ~/.lvm_history
  165.     history_size = 100
  166. }
  167.  
  168. \# Miscellaneous global LVM2 settings
  169. global {
  170.    
  171.     # The file creation mask for any files and directories created.
  172.     # Interpreted as octal if the first digit is zero.
  173.     umask = 077
  174.  
  175.     # Allow other users to read the files
  176.     #umask = 022
  177.  
  178.     # Enabling test mode means that no changes to the on disk metadata
  179.     # will be made.  Equivalent to having the -t option on every
  180.     # command.  Defaults to off.
  181.     test = 0
  182.  
  183.     # Whether or not to communicate with the kernel device-mapper.
  184.     # Set to 0 if you want to use the tools to manipulate LVM metadata
  185.     # without activating any logical volumes.
  186.     # If the device-mapper kernel driver is not present in your kernel
  187.     # setting this to 0 should suppress the error messages.
  188.     activation = 1
  189.  
  190.     # If we can't communicate with device-mapper, should we try running
  191.     # the LVM1 tools?
  192.     # This option only applies to 2.4 kernels and is provided to help you
  193.     # switch between device-mapper kernels and LVM1 kernels.
  194.     # The LVM1 tools need to be installed with .lvm1 suffices
  195.     # e.g. vgscan.lvm1 and they will stop working after you start using
  196.     # the new lvm2 on-disk metadata format.
  197.     # The default value is set when the tools are built.
  198.     # fallback_to_lvm1 = 0
  199.  
  200.     # The default metadata format that commands should use - "lvm1" or "lvm2".
  201.     # The command line override is -M1 or -M2.
  202.     # Defaults to "lvm1" if compiled in, else "lvm2".
  203.     # format = "lvm1"
  204.  
  205.     # Location of proc filesystem
  206.     proc = "/proc"
  207.  
  208.     # Type of locking to use. Defaults to file-based locking (1).
  209.     # Turn locking off by setting to 0 (dangerous: risks metadata corruption
  210.     # if LVM2 commands get run concurrently).
  211.     locking_type = 1
  212.  
  213.     # Local non-LV directory that holds file-based locks while commands are
  214.     # in progress.  A directory like /tmp that may get wiped on reboot is OK.
  215.     locking_dir = "/var/lock/lvm"
  216.  
  217.     # Other entries can go here to allow you to load shared libraries
  218.     # e.g. if support for LVM1 metadata was compiled as a shared library use
  219.     #   format_libraries = "liblvm2format1.so"
  220.     # Full pathnames can be given.
  221.  
  222.     # Search this directory first for shared libraries.
  223.     #  library_dir = "/lib/lvm2"
  224.    
  225.     # Enable these three for cluster LVM when clvmd is running.
  226.     # Remember to remove the "locking_type = 1" above.
  227.     #
  228.     #   locking_library = "liblvm2clusterlock.so"
  229.     #   locking_type = 2
  230.     #   library_dir = "/lib/lvm2"
  231. }
  232.  
  233. activation {
  234.     # Device used in place of missing stripes if activating incomplete volume.
  235.     # For now, you need to set this up yourself first (e.g. with 'dmsetup')
  236.     # For example, you could make it return I/O errors using the 'error'
  237.     # target or make it return zeros.
  238.     missing_stripe_filler = "/dev/ioerror"
  239.  
  240.     # Size (in KB) of each copy operation when mirroring
  241.     mirror_region_size = 512
  242.  
  243.     # How much stack (in KB) to reserve for use while devices suspended
  244.     reserved_stack = 256
  245.  
  246.     # How much memory (in KB) to reserve for use while devices suspended
  247.     reserved_memory = 8192
  248.  
  249.     # Nice value used while devices suspended
  250.     process_priority = -18
  251.  
  252.     # If volume_list is defined, each LV is only activated if there is a
  253.     # match against the list.
  254.     #   "vgname" and "vgname/lvname" are matched exactly.
  255.     #   "@tag" matches any tag set in the LV or VG.
  256.     #   "@*" matches if any tag defined on the host is also set in the LV or VG
  257.     #
  258.     # volume_list = [ "vg1", "vg2/lvol1", "@tag1", "@*" ]
  259. }
  260.  
  261. \####################
  262. \# Advanced section #
  263. \####################
  264.  
  265. \# Metadata settings
  266. \#
  267. \# metadata {
  268.     # Default number of copies of metadata to hold on each PV.  0, 1 or 2.
  269.     # It's best to leave this at 2.
  270.     # You might want to override it from the command line with 0 or 1
  271.     # when running pvcreate on new PVs which are to be added to large VGs.
  272.  
  273.     # pvmetadatacopies = 2
  274.  
  275.     # Approximate default size of on-disk metadata areas in sectors.
  276.     # You should increase this if you have large volume groups or
  277.     # you want to retain a large on-disk history of your metadata changes.
  278.  
  279.     # pvmetadatasize = 255
  280.  
  281.     # List of directories holding live copies of text format metadata.
  282.     # These directories must not be on logical volumes!
  283.     # It's possible to use LVM2 with a couple of directories here,
  284.     # preferably on different (non-LV) filesystems, and with no other
  285.     # on-disk metadata (pvmetadatacopies = 0). Or this can be in
  286.     # addition to on-disk metadata areas.
  287.     # The feature was originally added to simplify testing and is not
  288.     # supported under low memory situations - the machine could lock up.
  289.     #
  290.     # Never edit any files in these directories by hand unless you
  291.     # you are absolutely sure you know what you are doing! Use
  292.     # the supplied toolset to make changes (e.g. vgcfgrestore).
  293.  
  294.     # dirs = [ "/etc/lvm/metadata", "/mnt/disk2/lvm/metadata2" ]
  295. \#}

Quellcode

Hier kannst du den Code kopieren und ihn in deinen bevorzugten Editor einfügen. PASTEBIN_DOWNLOAD_SNIPPET_EXPLAIN