1CONTAINER-STORAGE-SETUP(1) CONTAINER-STORAGE-SETUP(1)
2
3
4
6 container-storage-setup - Tool for setting up storage for container
7 runtimes.
8
10 container-storage-setup [OPTIONS]
11
12 container-storage-setup [OPTIONS] COMMAND [args]
13
14
16 container-storage-setup configures storage for use by container
17 runtimes.
18
19 container-storage-setup without specifying a command defaults to
20 using docker config files /etc/sysconfig/docker-storage-setup for
21 input and /etc/sysconfig/docker-storage for output.
22
23 container-storage-setup with a commnad creates and manages storage
24 configurations.
25
26 container-storage-setup can configure multiple backends:
27 devicemapper, overlay, and overlay2.
28
29
31 --help
32 Print usage statement
33
34 --reset
35 Reset your container storage to init state. Reset does not remove
36 volume groups or remove any of the disks added previously.
37
38 Note: The --reset command is not always sufficient to cleanup your
39 container runtime environment. Other tools (atomic storage reset)
40 use this command to cleanup all storage.
41
42 --version
43 Print version information
44
45
47 Following commands are supported.
48
49 create Create storage configuration
50
51 remove Remove storage configuration
52
53 list List currently created storage configurations
54
55 activate Activate storage configuration
56
57 deactivate Deactivate storage configuration
58
59 add-dev Add block device to storage configuration
60
61 export Export file which can be used to set environment variables for
62 use by container runtimes
63
64
66 Run container-storage-setup after setting up your configuration in the
67 INPUTFILE or /etc/sysconfig/docker-storage-setup. One can look at
68 /usr/share/container-storage-setup/container-storage-setup for various
69 options and their default settings. Anything that the user wants to
70 change, should be changed in the INPUTFILE. This is the file which will
71 override any settings specified in /usr/share/container-storage-set‐
72 up/container-storage-setup.
73
74 Create storage configuration example-config.
75
76 container-storage-setup create -o OUTPUTFILE example-config INPUTFILE
77
78 Above will create a storage configuration named example-config as spec‐
79 ified in INPUTFILE and will put the output in OUTPUTFILE. OUTPUTFILE is
80 a file which can be parsed by container runtime for various config
81 options. In a typical form, output file can be passed in the Environ‐
82 mentFile directive of container runtime systemd unit file. That will
83 set STORAGE_OPTIONS environment variable which in turn can be parsed by
84 container runtime process.
85
86 To cleanup storage configuration, execute remove command.
87
88 container-storage-setup remove example-config
89
90 lvm2 version should be same or higher than lvm2-2.02.112 for lvm thin
91 pool functionality to work properly.
92
93 Supported options for the configuration file:
94
95 STORAGE_DRIVER:
96 Specify a storage driver to be used with container runtime.
97 Default: "devicemapper".
98 Valid values are overlay, overlay2 and "".
99 "" tells container-storage-setup to not perform any storage set‐
100 up.
101
102 CONTAINER_THINPOOL:
103 Specify the thinpool name for the lvm thinpool. This is required
104 when using the devicemapper STORAGE_DRIVER. CONTAINER_THINPOOL
105 is logical volume name passed to lvcreate when creating
106 the thin pool volume.
107
108 EXTRA_STORAGE_OPTIONS:
109 A set of extra options that should be passed to the container
110 runtime daemon.
111 Note: EXTRA_STORAGE_OPTIONS replaces EXTRA_DOCKER_STORAGE_OPTIONS
112 which has been deprecated
113
114 DEVS: A quoted, space-separated list of devices to be used.
115 If a drive is partitioned and contains a ${dev}1 partition,
116 that partition will be configured for use. Unpartitioned
117 drives will be partitioned and configured for use. If "VG"
118 is not specified, then use of the root disk's extra space
119 is implied.
120
121 VG: The volume group to use for container storage. Defaults to the
122 volume group where the root filesystem resides. If VG is
123 specified and the volume group does not exist, it will be
124 created (which requires that "DEVS" be nonempty, since we don't
125 currently support putting a second partition on the root disk).
126
127 Note: lvm2 needs to be lvm2-2.02.112 or later for lvm thin pool func‐
128 tionality to work properly.
129
130 GROWPART:
131 One can use this option to enable/disable growing of partition
132 table backing root volume group. This is intended for
133 virtualization and cloud installations. By default it is
134 disabled. Use GROWPART=true to enable automatic partition
135 table resizing.
136
137 AUTO_EXTEND_POOL:
138 Enable automatic extension of pool by lvm. lvm can monitor
139 the pool and automatically extend it when pool is getting full.
140
141 POOL_AUTOEXTEND_THRESHOLD:
142 Determines the pool extension threshold in terms of percentage
143 of pool size. For example, if threshold is 60, that means when
144 pool is 60% full, threshold has been hit.
145
146 POOL_AUTOEXTEND_PERCENT:
147 Determines the amount by which pool needs to be grown. This is
148 specified in terms of % of pool size. So a value of 20 means
149 that when threshold is hit, pool will be grown by 20% of existing
150 pool size.
151
152 CHUNK_SIZE:
153 Controls the chunk size/block size of thin pool. CHUNK_SIZE value
154 must be suitable for passing to lvconvert --chunk-size.
155
156 DEVICE_WAIT_TIMEOUT:
157 Specifies a device wait timeout value in seconds. In certain
158 cases required devices might not be immediately available and
159 container-storage-setup might decide to wait for it. This timeout
160 specifies how long one should wait for the device.
161 Default is 60 seconds. 0 disables wait.
162
163 WIPE_SIGNATURES:
164 Wipe any signatures found on disk. Valid values are
165 true/false and default value is false. By default if any
166 signatures are found on disk operation is aborted. If this value
167 is set to true, then signatures will either be wiped or
168 overwritten as suitable. This also means that if there is any
169 data on disk, it will be lost.
170
171 CONTAINER_ROOT_LV_NAME:
172 Name of the logical volume that will be mounted on
173 CONTAINER_ROOT_LV_MOUNT_PATH. If a user is setting
174 CONTAINER_ROOT_LV_MOUNT_PATH, he/she must set
175 CONTAINER_ROOT_LV_NAME.
176
177 CONTAINER_ROOT_LV_MOUNT_PATH:
178 Creates a logical volume named CONTAINER_ROOT_LV_NAME and mounts
179 it at the specified path. By default no new logical volume will
180 be created. For example:
181 CONTAINER_ROOT_LV_MOUNT_PATH=/var/lib/containers/container-runtime
182 would carve out a logical volume, format it with an XFS filesystem
183 and mount it on /var/lib/containers/container-runtime.
184
185 Note: DOCKER_ROOT_VOLUME is deprecated. Specifying
186 DOCKER_ROOT_VOLUME and CONTAINER_ROOT_LV_MOUNT_PATH at the same
187 time is not allowed.
188
189 CONTAINER_ROOT_LV_SIZE:
190 Specify the desired size for CONTAINER_ROOT_LV_MOUNT_PATH
191 root volume. It defaults to 40% of all free space.
192
193 CONTAINER_ROOT_LV_SIZE can take values acceptable to
194 lvcreate -L as well as some values acceptable to
195 lvcreate -l. If user intends to pass values acceptable
196 to lvcreate -l, then only those values which contains "%"
197 in syntax are acceptable. If value does not contain "%" it
198 is assumed value is suitable for lvcreate -L.
199
200 Note: If both STORAGE_DRIVER=devicemapper and
201 CONTAINER_ROOT_LV_MOUNT_PATH is set, container-storage-setup
202 would set up the thin pool for devicemapper first,
203 followed by extra volume. e.g if free space in the
204 volume group is 10G, devicemapper thin pool size
205 would be 4G (40% of 10G) and extra volume would be
206 2.4G (40% of 6G).
207
208 Note: DOCKER_ROOT_VOLUME_SIZE is deprecated. Specifying
209 DOCKER_ROOT_VOLUME_SIZE and CONTAINER_ROOT_LV_SIZE at the same
210 time is not allowed.
211
212
213 Options below should be specified as values acceptable to lvextend -L.
214
215 ROOT_SIZE: The size to which the root filesystem should be grown.
216
217 ROOT_SIZE can take values acceptable to lvcreate -L as well as
218 some values acceptable to lvcreate -l. If user intends to pass
219 values acceptable to lvcreate -l, then only those values which
220 contains "%" in syntax are acceptable. If value does not contain
221 "%" it is assumed value is suitable for lvcreate -L.
222
223 DATA_SIZE: The desired size for container runtime thin pool data LV.
224 Defaults: 40% free space in the VG after the root LV and container
225 runtime metadata LV have been allocated/grown.
226
227 DATA_SIZE can take values acceptable to lvcreate -L as well as
228 some values acceptable to lvcreate -l. If user intends to pass
229 values acceptable to lvcreate -l, then only those values which
230 contains "%" in syntax are acceptable. If value does not contain
231 "%" it is assumed value is suitable for lvcreate -L.
232
233 MIN_DATA_SIZE: Specifies the minimum size of the thin pool data LV. If
234 sufficient free space is not available, the pool creation will
235 fail.
236
237 Value should be a number followed by a optional suffix.
238 "bBsSkKmMgGtTpPeE" are valid suffixes. If no suffix is specified
239 then value will be considered as megabyte unit.
240
241 Both upper and lower case suffix represent same unit of size.
242 Use suffix B for Bytes, S for sectors as 512 bytes, K for
243 kibibytes (1024 bytes), M for mebibytes (1024 kibibytes), G for
244 gibibytes, T for tebibytes, P for pebibytes and E for exbibytes.
245
246 POOL_META_SIZE: Specifies the size of thin pool metadata LV. If
247 sufficient free space is not available, the pool creation will
248 fail.
249
250 Value should be a number followed by a optional suffix.
251 "bBsSkKmMgGtTpPeE" are valid suffixes. If no suffix is specified
252 then value will be considered as megabyte unit.
253
254 Both upper and lower case suffix represent same unit of size.
255 Use suffix B for Bytes, S for sectors as 512 bytes, K for
256 kibibytes (1024 bytes), M for mebibytes (1024 kibibytes), G for
257 gibibytes, T for tebibytes, P for pebibytes and E for exbibytes.
258
259 Sample
260
261 A simple, sample INPUTFILE:
262
263 DEVS=/dev/vdb
264
265 DATA_SIZE=8GB
266
267
268
270 atomic(1)
271
272
274 November 2014, originally compiled by Joe Brockmeier <jzb@redhat.com>
275 based on comments in Andy Grimm's <agrimm@redhat.com> script. February
276 2017, Modified by Dan Walsh <dwalsh@redhat.com>.
277
279 Joe Brockmeier Andy Grimm Dan Walsh
280
281
282
283Helper Script for Container StoragFeEBSReUtAuRpY 2017 CONTAINER-STORAGE-SETUP(1)