CONTAINER-STORAGE-SETUP(1)
๐ธ NAME ๐ธ
okay so bestie, meet container-storage-setup โ the tool for setting up storage for container runtimes. that's the whole job description, no cap. ๐
โจ SYNOPSIS โจ
container-storage-setup [OPTIONS]
container-storage-setup [OPTIONS] COMMAND [args]
๐ฆ DESCRIPTION ๐ฆ
container-storage-setup configures storage for use by container runtimes. iconic behavior honestly.
container-storage-setup without specifying a command defaults to using docker config files /etc/sysconfig/docker-storage-setup for input and /etc/sysconfig/docker-storage for output. it just knows what you meant. main character energy. โจ
container-storage-setup with a commnad creates and manages storage configurations. (yes, "commnad" โ we're quoting the original typo, it's canon now, don't come for me ๐)
container-storage-setup can configure multiple backends: devicemapper, overlay, and overlay2. three flavors, all valid, we love options. ๐
๐ OPTIONS ๐
--helpโ prints the usage statement. the classic "wait what does this do again" button. ๐ซถ--resetโ resets your container storage back to init state. lowkey important: Reset does not remove volume groups or remove any of the disks added previously.
โ ๏ธ Note: The--resetcommand is not always sufficient to cleanup your container runtime environment. Other tools (atomic storage reset) use this command to cleanup all storage. so like, don't assume this one flag does the entire cleanup, bestie. ๐ญ
--versionโ prints version information. the "who even are you" of flags. ๐
๐ COMMANDS ๐
following commands are supported, periodt:
createโ Create storage configuration โจremoveโ Remove storage configurationlistโ List currently created storage configurations ๐activateโ Activate storage configuration ๐ฅdeactivateโ Deactivate storage configuration ๐คadd-devโ Add block device to storage configurationexportโ Export file which can be used to set environment variables for use by container runtimes ๐
๐ EXAMPLES ๐
run container-storage-setup after setting up your configuration in the INPUTFILE or /etc/sysconfig/docker-storage-setup. you can look at /usr/share/container-storage-setup/container-storage-setup for various options and their default settings. anything that the user wants to change, should be changed in the INPUTFILE. this is the file which will override any settings specified in /usr/share/container-storage-setup/container-storage-setup. it's giving "defaults first, your opinions second." ๐
create storage configuration example-config:
container-storage-setup create -o OUTPUTFILE example-config INPUTFILE
above will create a storage configuration named example-config as specified in INPUTFILE and will put the output in OUTPUTFILE. OUTPUTFILE is a file which can be parsed by container runtime for various config options. in a typical form, output file can be passed in the EnvironmentFile directive of container runtime systemd unit file. that will set the STORAGE_OPTIONS environment variable which in turn can be parsed by container runtime process. slay. ๐ง
to cleanup storage configuration, execute the remove command:
container-storage-setup remove example-config
lvm2 version should be same or higher than lvm2-2.02.112 for lvm thin pool functionality to work properly. no old lvm2 energy allowed. ๐
๐ Supported options for the configuration file ๐
STORAGE_DRIVERโ Specify a storage driver to be used with container runtime. Default:"devicemapper". Valid values areoverlay,overlay2and"". an empty""tells container-storage-setup to not perform any storage setup. (it's the "we're good, don't touch anything" option ๐)CONTAINER_THINPOOLโ Specify the thinpool name for the lvm thinpool. this is required when using thedevicemapperSTORAGE_DRIVER.CONTAINER_THINPOOLis the logical volume name passed tolvcreatewhen creating the thin pool volume.EXTRA_STORAGE_OPTIONSโ A set of extra options that should be passed to the container runtime daemon.
Note:EXTRA_STORAGE_OPTIONSreplacesEXTRA_DOCKER_STORAGE_OPTIONSwhich has been deprecated. ๐ชฆ
DEVSโ A quoted, space-separated list of devices to be used. If a drive is partitioned and contains a${dev}1partition, that partition will be configured for use. Unpartitioned drives will be partitioned and configured for use. If"VG"is not specified, then use of the root disk's extra space is implied.VGโ The volume group to use for container storage. Defaults to the volume group where the root filesystem resides. IfVGis 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). it's a whole chain of "if this then that," iykyk. ๐ซ
Note: lvm2 needs to be lvm2-2.02.112 or later for lvm thin pool functionality to work properly.
GROWPARTโ One can use this option to enable/disable growing of partition table backing root volume group. this is intended for virtualization and cloud installations. by default it is disabled. useGROWPART=trueto enable automatic partition table resizing. โจAUTO_EXTEND_POOLโ Enable automatic extension of pool by lvm. lvm can monitor the pool and automatically extend it when pool is getting full. it's giving "self-care for your thin pool." ๐งPOOL_AUTOEXTEND_THRESHOLDโ Determines the pool extension threshold in terms of percentage of pool size. for example, if threshold is60, that means when pool is 60% full, threshold has been hit.POOL_AUTOEXTEND_PERCENTโ Determines the amount by which pool needs to be grown. this is specified in terms of % of pool size. so a value of20means that when threshold is hit, pool will be grown by 20% of existing pool size. ๐CHUNK_SIZEโ Controls the chunk size/block size of thin pool.CHUNK_SIZEvalue must be suitable for passing tolvconvert --chunk-size.DEVICE_WAIT_TIMEOUTโ Specifies a device wait timeout value in seconds. in certain cases required devices might not be immediately available and container-storage-setup might decide to wait for it. this timeout specifies how long one should wait for the device. Default is60seconds.0disables wait. (patience: configurable ๐ฐ๏ธ)WIPE_SIGNATURESโ Wipe any signatures found on disk. Valid values aretrue/falseand default value isfalse. by default if any signatures are found on disk operation is aborted. if this value is set totrue, then signatures will either be wiped or overwritten as suitable.
๐ This also means that if there is any data on disk, it will be lost. like, gone gone. be so serious before you set this one, bestie.
CONTAINER_ROOT_LV_NAMEโ Name of the logical volume that will be mounted onCONTAINER_ROOT_LV_MOUNT_PATH. If a user is settingCONTAINER_ROOT_LV_MOUNT_PATH, he/she must setCONTAINER_ROOT_LV_NAME. they're a package deal. ๐CONTAINER_ROOT_LV_MOUNT_PATHโ Creates a logical volume namedCONTAINER_ROOT_LV_NAMEand mounts it at the specified path. By default no new logical volume will be created. for example:CONTAINER_ROOT_LV_MOUNT_PATH=/var/lib/containers/container-runtimewould carve out a logical volume, format it with an XFS filesystem and mount it on/var/lib/containers/container-runtime.
Note:DOCKER_ROOT_VOLUMEis deprecated. SpecifyingDOCKER_ROOT_VOLUMEandCONTAINER_ROOT_LV_MOUNT_PATHat the same time is not allowed. pick a lane. ๐ง
CONTAINER_ROOT_LV_SIZEโ Specify the desired size forCONTAINER_ROOT_LV_MOUNT_PATHroot volume. it defaults to40%of all free space.
CONTAINER_ROOT_LV_SIZE can take values acceptable to lvcreate -L as well as some values acceptable 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 bothSTORAGE_DRIVER=devicemapperandCONTAINER_ROOT_LV_MOUNT_PATHis set, container-storage-setup would set up the thin pool for devicemapper first, followed by extra volume. e.g if free space in the volume group is10G, devicemapper thin pool size would be4G(40% of 10G) and extra volume would be2.4G(40% of 6G). math is mathing. ๐งฎ
Note:DOCKER_ROOT_VOLUME_SIZEis deprecated. SpecifyingDOCKER_ROOT_VOLUME_SIZEandCONTAINER_ROOT_LV_SIZEat the same time is not allowed.
Options below should be specified as values acceptable to lvextend -L.
ROOT_SIZEโ The size to which the root filesystem should be grown.
ROOT_SIZE can take values acceptable to lvcreate -L as well as some values acceptable 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โ The desired size for container runtime thin pool data LV. Defaults:40%free space in the VG after the root LV and container runtime metadata LV have been allocated/grown.
DATA_SIZE can take values acceptable to lvcreate -L as well as some values acceptable 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.
MIN_DATA_SIZEโ Specifies the minimum size of the thin pool data LV. if sufficient free space is not available, the pool creation will fail. ๐ฌ
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 megabyte 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.
POOL_META_SIZEโ Specifies the size of thin pool metadata LV. if sufficient free space is not available, the pool creation will fail. ๐ฌ
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 megabyte 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.
๐ Sample ๐
a simple, sample INPUTFILE:
DEVS=/dev/vdb
DATA_SIZE=8GB
๐ SEE ALSO ๐
atomic(1)
๐ HISTORY ๐
November 2014, originally compiled by Joe Brockmeier <jzb@redhat.com> based on comments in Andy Grimm's <agrimm@redhat.com> script. February 2017, Modified by Dan Walsh <dwalsh@redhat.com>. a whole lineage, we respect the elders. ๐ซก
๐ซถ AUTHORS ๐ซถ
Joe Brockmeier Andy Grimm Dan Walsh
and that's the whole page, bestie!! ๐ this was Helper Script for Container S..., FEBRUARY 2017, from the CONTAINER-STORAGE-SETUP(1) manual โ go forth and configure your storage, you absolute icon. โจ๐ ๐
๐ฆ where this page comes from
- fedora 43: container-storage-setup 0.11.0-19.dev.git413b408.fc43 ยท Apache-2.0
- fedora 44: container-storage-setup 0.11.0-21.dev.git413b408.fc44 ยท Apache-2.0
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms