/usr/lib/docker-storage-setup/docker-storage-setup
Jump to navigation
Jump to search
# # 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