1containers-storage.conf(5)(Container)Filecontainers-storage.conf(5)(Container)
2
3
4
5Dan Walsh May 2017
6
7

NAME

9       storage.conf - Syntax of Container Storage configuration file
10
11

DESCRIPTION

13       The STORAGE configuration file specifies all of the available container
14       storage options for tools using shared container storage, but in a TOML
15       format that can be more easily modified and versioned.
16
17

FORMAT

19       The  [TOML  format][toml]  is used as the encoding of the configuration
20       file.  Every option and subtable listed here is nested under  a  global
21       "storage"  table.   No bare options are used. The format of TOML can be
22       simplified to:
23
24
25              [table]
26              option = value
27
28              [table.subtable1]
29              option = value
30
31              [table.subtable2]
32              option = value
33
34
35

STORAGE TABLE

37       The storage table supports the following options:
38
39
40       driver=""
41         container storage driver
42         Default Copy On Write (COW) container storage driver.  Valid  drivers
43       are  "overlay",  "vfs",  "devmapper",  "aufs", "btrfs", and "zfs". Some
44       drivers (for example, "zfs", "btrfs", and "aufs") may not work if  your
45       kernel lacks support for the filesystem.
46         This field is required to guarantee proper operation.
47         Valid rootless drivers are "btrfs", "overlay", and "vfs".
48         Rootless users default to the driver defined in the system configura‐
49       tion when possible.
50         When the system configuration uses an  unsupported  rootless  driver,
51       rootless users default to "overlay" if available, otherwise "vfs".
52
53
54       graphroot=""
55         container storage graph dir (default: "/var/lib/containers/storage")
56         Default  directory to store all writable content created by container
57       storage programs.
58         The rootless graphroot path supports environment  variable  substitu‐
59       tions (ie. $HOME/containers/storage)
60
61
62       rootless_storage_path="$HOME/.local/share/containers/storage"
63         Storage  path  for rootless users. By default the graphroot for root‐
64       less users
65         is set to $XDG_DATA_HOME/containers/storage, if XDG_DATA_HOME is set.
66         Otherwise $HOME/.local/share/containers/storage is used.  This  field
67       can
68         be used if administrators need to change the storage location for all
69       users.
70         The rootless storage path supports environment variable substitutions
71       (ie. $HOME/containers/storage)
72
73
74       A  common  use case for this field is to provide a local storage direc‐
75       tory when user home directories are NFS-mounted (podman does  not  sup‐
76       port container storage over NFS).
77
78
79       runroot=""
80         container storage run dir (default: "/run/containers/storage")
81         Default  directory to store all temporary writable content created by
82       container storage programs.
83         The rootless runroot path supports environment variable substitutions
84       (ie. $HOME/containers/storage)
85
86
87   STORAGE OPTIONS TABLE
88       The storage.options table supports the following options:
89
90
91       additionalimagestores=[]
92         Paths  to  additional  container  image  stores.  Usually  these  are
93       read/only and stored on remote network shares.
94
95
96       remap-uids="" remap-gids=""
97         Remap-UIDs/GIDs is the mapping from UIDs/GIDs as they  should  appear
98       inside  of  a container, to the UIDs/GIDs outside of the container, and
99       the length of the range of UIDs/GIDs.  Additional mapped  sets  can  be
100       listed  and  will  be  heeded by libraries, but there are limits to the
101       number of mappings which the kernel will allow when you  later  attempt
102       to run a container.
103
104
105       Example
106            remap-uids = 0:1668442479:65536
107            remap-gids = 0:1668442479:65536
108
109
110       These  mappings  tell  the container engines to map UID 0 inside of the
111       container  to  UID  1668442479  outside.   UID  1  will  be  mapped  to
112       1668442480. UID 2 will be mapped to 1668442481, etc, for the next 65533
113       UIDs in succession.
114
115
116       remap-user="" remap-group=""
117         Remap-User/Group is a user name which can be used to look up  one  or
118       more  UID/GID  ranges in the /etc/subuid or /etc/subgid file.  Mappings
119       are set up starting with an in-container ID of 0 and then a  host-level
120       ID taken from the lowest range that matches the specified name, and us‐
121       ing the length of that range. Additional ranges are then assigned,  us‐
122       ing  the  ranges  which specify the lowest host-level IDs first, to the
123       lowest not-yet-mapped in-container ID, until all of  the  entries  have
124       been used for maps.
125
126
127       Example
128            remap-user = "containers"
129            remap-group = "containers"
130
131
132       root-auto-userns-user=""
133         Root-auto-userns-user is a user name which can be used to look up one
134       or more UID/GID ranges in the /etc/subuid and /etc/subgid file.   These
135       ranges will be partitioned to containers configured to create automati‐
136       cally a user namespace.  Containers configured to automatically  create
137       a  user  namespace can still overlap with containers having an explicit
138       mapping set.  This setting is ignored when running as rootless.
139
140
141       auto-userns-min-size=1024
142         Auto-userns-min-size is the minimum size for a user namespace created
143       automatically.
144
145
146       auto-userns-max-size=65536
147         Auto-userns-max-size is the maximum size for a user namespace created
148       automatically.
149
150
151       disable-volatile=true
152         If disable-volatile is set, then the "volatile" mount optimization is
153       disabled for all the containers.
154
155
156   STORAGE OPTIONS FOR AUFS TABLE
157       The storage.options.aufs table supports the following options:
158
159
160       mountopt=""
161         Comma separated list of default options to be used to mount container
162       images.  Suggested value "nodev". Mount options are documented  in  the
163       mount(8) man page.
164
165
166   STORAGE OPTIONS FOR BTRFS TABLE
167       The storage.options.btrfs table supports the following options:
168
169
170       min_space=""
171         Specifies the min space in a btrfs volume.
172
173
174       size=""
175         Maximum  size  of  a  container image.   This flag can be used to set
176       quota on the size of container images. (format:  [],  where  unit  =  b
177       (bytes), k (kilobytes), m (megabytes), or g (gigabytes))
178
179
180   STORAGE OPTIONS FOR THINPOOL (devicemapper) TABLE
181       The  storage.options.thinpool  table supports the following options for
182       the devicemapper driver:
183
184
185       autoextend_percent=""
186         Tells the thinpool driver the amount by which the thinpool  needs  to
187       be  grown.  This is specified in terms of % of pool size. So a value of
188       20 means that when threshold is hit, pool will be grown by 20%  of  ex‐
189       isting pool size. (default: 20%)
190
191
192       autoextend_threshold=""
193         Tells  the  driver  the thinpool extension threshold in terms of per‐
194       centage of pool size. For example, if threshold is 60, that means  when
195       pool is 60% full, threshold has been hit. (default: 80%)
196
197
198       basesize=""
199         Specifies the size to use when creating the base device, which limits
200       the size of images and containers. (default: 10g)
201
202
203       blocksize=""
204         Specifies a custom blocksize to use for the thin pool. (default: 64k)
205
206
207       directlvm_device=""
208         Specifies a custom block storage device to use for the thin pool. Re‐
209       quired for using graphdriver devicemapper.
210
211
212       directlvm_device_force=""
213         Tells driver to wipe device (directlvm_device) even if device already
214       has a filesystem.  (default: false)
215
216
217       fs="xfs"
218         Specifies the filesystem type to use for the base  device.  (default:
219       xfs)
220
221
222       log_level=""
223         Sets the log level of devicemapper.
224
225
226              0: LogLevelSuppress 0 (default)
227              2: LogLevelFatal
228              3: LogLevelErr
229              4: LogLevelWarn
230              5: LogLevelNotice
231              6: LogLevelInfo
232              7: LogLevelDebug
233
234
235
236       metadata_size=""
237         metadata_size is used to set the pvcreate --metadatasize options when
238       creating thin devices. (Default 128k)
239
240
241       min_free_space=""
242         Specifies the min free space percent in a thin pool required for  new
243       device  creation  to  succeed. Valid values are from 0% - 99%. Value 0%
244       disables. (default: 10%)
245
246
247       mkfsarg=""
248         Specifies extra mkfs arguments to be used when creating the base  de‐
249       vice.
250
251
252       mountopt=""
253         Comma separated list of default options to be used to mount container
254       images.  Suggested value "nodev". Mount options are documented  in  the
255       mount(8) man page.
256
257
258       size=""
259         Maximum  size  of  a  container  image.  This flag can be used to set
260       quota on the size of container images. (format:  [],  where  unit  =  b
261       (bytes), k (kilobytes), m (megabytes), or g (gigabytes))
262
263
264       use_deferred_deletion=""
265         Marks  thinpool  device  for deferred deletion. If the thinpool is in
266       use when the driver attempts to delete it, the driver will  attempt  to
267       delete  device  every 30 seconds until successful, or when it restarts.
268       Deferred deletion permanently deletes the device and all data stored in
269       the device will be lost. (default: true).
270
271
272       use_deferred_removal=""
273         Marks  devicemapper block device for deferred removal.  If the device
274       is in use when its driver attempts to remove it, the driver  tells  the
275       kernel  to  remove  the device as soon as possible.  Note this does not
276       free up the disk space, use deferred deletion to fully remove the thin‐
277       pool.  (default: true).
278
279
280       xfs_nospace_max_retries=""
281         Specifies  the  maximum  number of retries XFS should attempt to com‐
282       plete IO when ENOSPC (no space) error is returned by underlying storage
283       device. (default: 0, which means to try continuously.)
284
285
286   STORAGE OPTIONS FOR OVERLAY TABLE
287       The storage.options.overlay table supports the following options:
288
289
290       ignore_chown_errors = "false"
291         ignore_chown_errors can be set to allow a non privileged user running
292       with a  single UID within a user namespace to run containers. The  user
293       can  pull and use any image even those with multiple uids.  Note multi‐
294       ple UIDs will be squashed down to the default  uid  in  the  container.
295       These  images  will  have  no  separation between the users in the con‐
296       tainer. (default: false)
297
298
299       force_mask = "0000|shared|private"
300         ForceMask specifies the permissions mask that is used for  new  files
301       and directories.  The values "shared" and "private" are accepted.  (de‐
302       fault: ""). Octal permission masks are also accepted.
303
304
305       ``: Not set
306            All files/directories, get set  with  the  permissions  identified
307       within the image.
308
309
310       private: it is equivalent to 0700.
311            All  files/directories  get  set with 0700 permissions.  The owner
312       has rwx access to the files. No other users on the  system  can  access
313       the files.  This setting could be used with networked based home direc‐
314       tories.
315
316
317       shared: it is equivalent to 0755.
318            The owner has rwx access to the files and everyone else can  read,
319       access  and execute them. This setting is useful for sharing containers
320       storage with other users.  For instance, a storage owned by root  could
321       be  shared  to rootless users as an additional store.  NOTE:  All files
322       within the image are made readable and executable by any  user  on  the
323       system. Even /etc/shadow within your image is now readable by any user.
324
325
326       OCTAL: Users can experiment with other OCTAL Permissions.
327
328
329       Note:  The  force_mask Flag is an experimental feature, it could change
330       in the future.  When "force_mask" is set the original  permission  mask
331       is   stored   in  the  "user.containers.override_stat"  xattr  and  the
332       "mount_program"  option  must  be  specified.   Mount   programs   like
333       "/usr/bin/fuse-overlayfs" present the extended attribute permissions to
334       processes within containers rather then the "force_mask"  permissions.
335
336
337       mount_program=""
338         Specifies the path to a custom program to use instead of using kernel
339       defaults  for  mounting  the file system. In rootless mode, without the
340       CAP_SYS_ADMIN capability, many kernels prevent mounting of overlay file
341       systems,  requiring  you  to specify a mount_program. The mount_program
342       option is also required on systems  where  the  underlying  storage  is
343       btrfs, aufs, zfs, overlay, or ecryptfs based file systems.
344         mount_program = "/usr/bin/fuse-overlayfs"
345
346
347       mountopt=""
348         Comma separated list of default options to be used to mount container
349       images.  Suggested value "nodev". Mount options are documented  in  the
350       mount(8) man page.
351
352
353       size=""
354         Maximum  size  of  a  container image.   This flag can be used to set
355       quota on the size of container images. (format:  [],  where  unit  =  b
356       (bytes), k (kilobytes), m (megabytes), or g (gigabytes))
357
358
359   STORAGE OPTIONS FOR VFS TABLE
360       The storage.options.vfs table supports the following options:
361
362
363       ignore_chown_errors = "false"
364         ignore_chown_errors can be set to allow a non privileged user running
365       with a  single UID within a user namespace to run containers. The  user
366       can  pull and use any image even those with multiple uids.  Note multi‐
367       ple UIDs will be squashed down to the default  uid  in  the  container.
368       These  images  will  have  no  separation between the users in the con‐
369       tainer. (default: false)
370
371
372   STORAGE OPTIONS FOR ZFS TABLE
373       The storage.options.zfs table supports the following options:
374
375
376       fsname=""
377         File System name for the zfs driver
378
379
380       mountopt=""
381         Comma separated list of default options to be used to mount container
382       images.   Suggested  value "nodev". Mount options are documented in the
383       mount(8) man page.
384
385
386       skip_mount_home=""
387         Tell storage drivers to not create a PRIVATE bind mount on their home
388       directory.
389
390
391       size=""
392         Maximum  size  of  a  container image.   This flag can be used to set
393       quota on the size of container images. (format:  [],  where  unit  =  b
394       (bytes), k (kilobytes), m (megabytes), or g (gigabytes))
395
396

SELINUX LABELING

398       When  running  on an SELinux system, if you move the containers storage
399       graphroot directory, you must make sure the labeling is correct.
400
401
402       Tell SELinux about the new containers storage by setting up an  equiva‐
403       lence  record.  This tells SELinux to label content under the new path,
404       as if it was stored under /var/lib/containers/storage.
405
406
407              semanage fcontext -a -e /var/lib/containers NEWSTORAGEPATH
408              restorecon -R -v NEWSTORAGEPATH
409
410
411
412       The semanage command above tells SELinux to setup the default  labeling
413       of NEWSTORAGEPATH to match /var/lib/containers.  The restorecon command
414       tells SELinux to apply the labels to the actual content.
415
416
417       Now all new content created in these directories will automatically  be
418       created with the correct label.
419
420

SEE ALSO

422       semanage(8), restorecon(8), mount(8), fuse-overlayfs(1)
423
424

FILES

426       Distributions  often  provide a /usr/share/containers/storage.conf file
427       to define default storage configuration.  Administrators  can  override
428       this file by creating /etc/containers/storage.conf to specify their own
429       configuration. The storage.conf file for rootless users  is  stored  in
430       the $XDG_CONFIG_HOME/containers/storage.conf file.  If $XDG_CONFIG_HOME
431       is not set then the file $HOME/.config/containers/storage.conf is used.
432
433

HISTORY

435       May  2017,  Originally  compiled   by   Dan   Walsh   dwalsh@redhat.com
436       ⟨mailto:dwalsh@redhat.com⟩  Format  copied from crio.conf man page cre‐
437       ated by Aleksa Sarai asarai@suse.de ⟨mailto:asarai@suse.de⟩
438
439
440
441Configuration                       Storagceontainers-storage.conf(5)(Container)
Impressum