/usr/lib/docker-storage-setup/docker-storage-setup: Difference between revisions
Jump to navigation
Jump to search
(Created page with "<pre> # Specify storage driver one wants to use with docker. Default is devicemapper. # Other possible options are overlay, overlay2 and "". Empty string means do # not do any...") |
No edit summary |
||
Line 1: | Line 1: | ||
<pre> | <pre> | ||
# | |||
# Specify storage driver one wants to use with docker. Default is devicemapper. | # Specify storage driver one wants to use with docker. Default is devicemapper. | ||
# Other possible options are overlay, overlay2 and "". Empty string means do | # Other possible options are overlay, overlay2 and "". Empty string means do | ||
# not do any storage setup. | # not do any storage setup. | ||
# | |||
STORAGE_DRIVER=devicemapper | STORAGE_DRIVER=devicemapper | ||
# | |||
# A set of extra options that should be appended to the generated | # A set of extra options that should be appended to the generated | ||
# DOCKER_STORAGE_OPTIONS string. These options will be passed to the Docker | # DOCKER_STORAGE_OPTIONS string. These options will be passed to the Docker | ||
# daemon as-is and should be valid Docker storage options. | # daemon as-is and should be valid Docker storage options. | ||
# EXTRA_DOCKER_STORAGE_OPTIONS="--storage-opt dm.fs=ext4" | # EXTRA_DOCKER_STORAGE_OPTIONS="--storage-opt dm.fs=ext4" | ||
# | |||
# | |||
# A quoted, space-separated list of devices to be used. This currently | # A quoted, space-separated list of devices to be used. This currently | ||
# expects the devices to be unpartitioned drives. If "VG" is not specified, | # expects the devices to be unpartitioned drives. If "VG" is not specified, | ||
# then use of the root disk's extra space is implied. | # then use of the root disk's extra space is implied. | ||
# | # | ||
# DEVS=/dev/vdb | # DEVS=/dev/vdb | ||
# | |||
# The volume group to use for docker storage. Defaults to the | # The volume group to use for docker storage. Defaults to the | ||
# volume group where the root filesystem resides. If VG is specified and the | # volume group where the root filesystem resides. If VG is specified and the | ||
Line 22: | Line 30: | ||
# the root disk). | # the root disk). | ||
# | # | ||
# VG=docker_vg | |||
# | |||
# The size to which the root filesystem should be grown. | # The size to which the root filesystem should be grown. | ||
# Value should be acceptable to -L option of lvextend. | # Value should be acceptable to -L option of lvextend. | ||
# | # | ||
# ROOT_SIZE=8G | # ROOT_SIZE=8G | ||
# | |||
# The desired size for the docker data LV. It defaults using 60% of all | # The desired size for the docker data LV. It defaults using 60% of all | ||
# free space. | # free space. | ||
Line 38: | Line 50: | ||
# value is suitable for "lvcreate -L". | # value is suitable for "lvcreate -L". | ||
# | # | ||
DATA_SIZE=40%FREE | DATA_SIZE=40%FREE | ||
# | |||
# MIN_DATA_SIZE specifies the minimum size of data volume otherwise pool | # MIN_DATA_SIZE specifies the minimum size of data volume otherwise pool | ||
# creation fails. | # creation fails. | ||
Line 52: | Line 66: | ||
# pebibytes and E for exbibytes. | # pebibytes and E for exbibytes. | ||
# | # | ||
MIN_DATA_SIZE=2G | MIN_DATA_SIZE=2G | ||
# | |||
# Controls the chunk size/block size of thin pool. Value of CHUNK_SIZE | # Controls the chunk size/block size of thin pool. Value of CHUNK_SIZE | ||
# be suitable to be passed to --chunk-size option of lvconvert. | # be suitable to be passed to --chunk-size option of lvconvert. | ||
# | # | ||
CHUNK_SIZE=512K | CHUNK_SIZE=512K | ||
# | |||
# Enable resizing partition table backing root volume group. By default it | # Enable resizing partition table backing root volume group. By default it | ||
# is disabled until and unless GROWPART=true is specified. | # is disabled until and unless GROWPART=true is specified. | ||
# | # | ||
GROWPART=false | GROWPART=false | ||
# | |||
# Enable/disable automatic pool extension using lvm | # Enable/disable automatic pool extension using lvm | ||
# | |||
AUTO_EXTEND_POOL=yes | AUTO_EXTEND_POOL=yes | ||
# | |||
# Auto pool extension threshold (in % of pool size) | # Auto pool extension threshold (in % of pool size) | ||
# | |||
POOL_AUTOEXTEND_THRESHOLD=60 | POOL_AUTOEXTEND_THRESHOLD=60 | ||
# | |||
# Extend the pool by specified percentage when threshold is hit. | # Extend the pool by specified percentage when threshold is hit. | ||
# | |||
POOL_AUTOEXTEND_PERCENT=20 | POOL_AUTOEXTEND_PERCENT=20 | ||
# | |||
# Device wait timeout in seconds. This is generic timeout which can be used by | # Device wait timeout in seconds. This is generic timeout which can be used by | ||
# docker storage setup service to wait on various kind of block devices. | # docker storage setup service to wait on various kind of block devices. | ||
# Setting a value of 0 can disable this wait. | # Setting a value of 0 can disable this wait. | ||
# | |||
DEVICE_WAIT_TIMEOUT=60 | DEVICE_WAIT_TIMEOUT=60 | ||
# | |||
# Wipe any signatures (partition, filesystem, lvm etc) found on disk. | # Wipe any signatures (partition, filesystem, lvm etc) found on disk. | ||
# This could mean wiping the signature explicitly or using force options | # This could mean wiping the signature explicitly or using force options | ||
Line 84: | Line 116: | ||
# by setting WIPE_SIGNATURES=true. Be careful before using this option | # by setting WIPE_SIGNATURES=true. Be careful before using this option | ||
# as this means if there was any leftover data on disk, it will be lost. | # as this means if there was any leftover data on disk, it will be lost. | ||
# | |||
WIPE_SIGNATURES=false | WIPE_SIGNATURES=false | ||
# | |||
# By default no new volume and filesystem will be setup for docker | # By default no new volume and filesystem will be setup for docker | ||
# root dir. Docker creates /var/lib/docker/ on top of underlying filesystem | # root dir. Docker creates /var/lib/docker/ on top of underlying filesystem | ||
Line 96: | Line 131: | ||
# docker-storage-setup creates a logical volume with an XFS filesystem mounted | # docker-storage-setup creates a logical volume with an XFS filesystem mounted | ||
# on docker root directory (default: /var/lib/docker). | # on docker root directory (default: /var/lib/docker). | ||
# | |||
DOCKER_ROOT_VOLUME=no | DOCKER_ROOT_VOLUME=no | ||
# | |||
# Specify the desired size for docker root volume. It defaults to 40% of all | # Specify the desired size for docker root volume. It defaults to 40% of all | ||
# free space. | # free space. | ||
Line 112: | Line 150: | ||
# group is 10G, devicemapper thin pool size would be 4G (40% of 10G) | # group is 10G, devicemapper thin pool size would be 4G (40% of 10G) | ||
# and docker root volume would be 2.4G (40% of 6G). | # and docker root volume would be 2.4G (40% of 6G). | ||
# | |||
DOCKER_ROOT_VOLUME_SIZE=40%FREE | DOCKER_ROOT_VOLUME_SIZE=40%FREE | ||
</pre> | </pre> |
Latest revision as of 16:38, 23 May 2017
# # Specify storage driver one wants to use with docker. Default is devicemapper. # Other possible options are overlay, overlay2 and "". Empty string means do # not do any storage setup. # STORAGE_DRIVER=devicemapper # # A set of extra options that should be appended to the generated # DOCKER_STORAGE_OPTIONS string. These options will be passed to the Docker # daemon as-is and should be valid Docker storage options. # EXTRA_DOCKER_STORAGE_OPTIONS="--storage-opt dm.fs=ext4" # # # A quoted, space-separated list of devices to be used. This currently # expects the devices to be unpartitioned drives. If "VG" is not specified, # then use of the root disk's extra space is implied. # # DEVS=/dev/vdb # # The volume group to use for docker storage. Defaults to the # volume group where the root filesystem resides. If VG is specified and the # volume group does not exist, it will be created (which requires that "DEVS" # be nonempty, since we don't currently support putting a second partition on # the root disk). # # VG=docker_vg # # The size to which the root filesystem should be grown. # Value should be acceptable to -L option of lvextend. # # ROOT_SIZE=8G # # The desired size for the docker data LV. It defaults using 60% of all # free space. # # DATA_SIZE can take values acceptable to "lvcreate -L" as well as some # values acceptable to to "lvcreate -l". If user intends to pass values # acceptable to "lvcreate -l", then only those values which contains "%" # in syntax are acceptable. If value does not contain "%" it is assumed # value is suitable for "lvcreate -L". # DATA_SIZE=40%FREE # # MIN_DATA_SIZE specifies the minimum size of data volume otherwise pool # creation fails. # # Value should be a number followed by a optional suffix. "bBsSkKmMgGtTpPeE" # are valid suffixes. If no suffix is specified then value will be considered # as mebibyte unit. # # Both upper and lower case suffix represent same unit of size. Use suffix B # for Bytes, S for sectors as 512 bytes, K for kibibytes (1024 bytes), M for # mebibytes (1024 kibibytes), G for gibibytes, T for tebibytes, P for # pebibytes and E for exbibytes. # MIN_DATA_SIZE=2G # # Controls the chunk size/block size of thin pool. Value of CHUNK_SIZE # be suitable to be passed to --chunk-size option of lvconvert. # CHUNK_SIZE=512K # # Enable resizing partition table backing root volume group. By default it # is disabled until and unless GROWPART=true is specified. # GROWPART=false # # Enable/disable automatic pool extension using lvm # AUTO_EXTEND_POOL=yes # # Auto pool extension threshold (in % of pool size) # POOL_AUTOEXTEND_THRESHOLD=60 # # Extend the pool by specified percentage when threshold is hit. # POOL_AUTOEXTEND_PERCENT=20 # # Device wait timeout in seconds. This is generic timeout which can be used by # docker storage setup service to wait on various kind of block devices. # Setting a value of 0 can disable this wait. # DEVICE_WAIT_TIMEOUT=60 # # Wipe any signatures (partition, filesystem, lvm etc) found on disk. # This could mean wiping the signature explicitly or using force options # of various commands to wipe/overwrite signatures. By default signatures # are not wiped and user needs to wipe these. One can change default behavior # by setting WIPE_SIGNATURES=true. Be careful before using this option # as this means if there was any leftover data on disk, it will be lost. # WIPE_SIGNATURES=false # # By default no new volume and filesystem will be setup for docker # root dir. Docker creates /var/lib/docker/ on top of underlying filesystem # for storing images and containers. # # To carve out a separate logical volume for storing docker # images/containers/volumes data, set DOCKER_ROOT_VOLUME=yes # NOTE: devicemapper stores images/containers on thin pool. # # docker-storage-setup creates a logical volume with an XFS filesystem mounted # on docker root directory (default: /var/lib/docker). # DOCKER_ROOT_VOLUME=no # # Specify the desired size for docker root volume. It defaults to 40% of all # free space. # # DOCKER_ROOT_VOLUME_SIZE can take values acceptable to "lvcreate -L" as well # as some values acceptable to to "lvcreate -l". If user intends to pass # values acceptable to "lvcreate -l", then only those values which # contains "%" in syntax are acceptable. If value does not contain "%" it # is assumed value is suitable for "lvcreate -L". # # NOTE: If both STORAGE_DRIVER=devicemapper and DOCKER_ROOT_VOLUME=yes is # set, docker-storage-setup would set up the thin pool for devicemapper # first, followed by docker root volume. e.g if free space in the volume # group is 10G, devicemapper thin pool size would be 4G (40% of 10G) # and docker root volume would be 2.4G (40% of 6G). # DOCKER_ROOT_VOLUME_SIZE=40%FREE