![]() |
![]()
| ![]() |
![]()
Dan Walsh May 2017
NAMEstorage.conf - Syntax of Container Storage configuration file DESCRIPTIONThe STORAGE configuration file specifies all of the available container storage options for tools using shared container storage, but in a TOML format that can be more easily modified and versioned. FORMATThe [TOML format][toml] is used as the encoding of the configuration file. Every option and subtable listed here is nested under a global "storage" table. No bare options are used. The format of TOML can be simplified to: [table] option = value [table.subtable1] option = value [table.subtable2] option = value STORAGE TABLEThe storage table supports the following options: driver=""
graphroot=""
# semanage fcontext -a -e /var/lib/containers/storage /NEWSTORAGEPATH # restorecon -R -v /NEWSTORAGEPATH In rootless mode you would set # semanage fcontext -a -e $HOME/.local/share/containers NEWSTORAGEPATH $ restorecon -R -v /NEWSTORAGEPATH rootless_storage_path="$HOME/.local/share/containers/storage"
A common use case for this field is to provide a local storage directory when user home directories are NFS-mounted (podman does not support container storage over NFS). imagestore=""
A common use case for the imagestore field is users who need to split filesystems in different partitions. The imagestore partition stores images and the graphroot partition stores container content created from the images. Imagestore, if set, must be different from graphroot. runroot=""
driver_priority=[]
transient_store = "false"|"true" Transient store mode makes all container metadata be saved in temporary storage (i.e. runroot above). This is faster, but doesn't persist across reboots. Additional garbage collection must also be performed at boot-time, so this option should remain disabled in most configurations. (default: false) STORAGE OPTIONS TABLEThe storage.options table supports the following options: additionalimagestores=[]
root-auto-userns-user=""
auto-userns-min-size=1024
auto-userns-max-size=65536
disable-volatile=true
STORAGE PULL OPTIONS TABLEThe storage.options.pull_options table supports the following keys: enable_partial_images="true"|"false"
⟨https://github.com/containers/storage/blob/main/docs/containers-storage-zstd-chunked.md⟩.
use_hard_links="false"|"true"
ostree_repos=""
convert_images="false"|"true"
insecure_allow_unpredictable_image_contents="false"|"true"
This option should be enabled extremely rarely, only if
all images that could
If this consistency enforcement were disabled, malicious images
could be built
As a side effect, enabling this option will also make image IDs
unpredictable
This is a "string bool": "false"|"true" (cannot be native TOML boolean) STORAGE OPTIONS FOR AUFS TABLEThe storage.options.aufs table supports the following options: mountopt=""
STORAGE OPTIONS FOR BTRFS TABLEThe storage.options.btrfs table supports the following options: min_space=""
size=""
STORAGE OPTIONS FOR OVERLAY TABLEThe storage.options.overlay table supports the following options: ignore_chown_errors = "false"
inodes=""
force_mask = "0000|shared|private"
OCTAL: Users can experiment with other OCTAL Permissions. Note: The force_mask Flag is an experimental feature, it could change in the future. When "force_mask" is set the original permission mask is stored in the "user.containers.override_stat" xattr and the "mount_program" option must be specified. Mount programs like "/usr/bin/fuse-overlayfs" present the extended attribute permissions to processes within containers rather than the "force_mask" permissions. mount_program=""
mountopt=""
skip_mount_home="false"
size=""
use_composefs = "false"
STORAGE OPTIONS FOR VFS TABLEThe storage.options.vfs table supports the following options: ignore_chown_errors = "false"
STORAGE OPTIONS FOR ZFS TABLEThe storage.options.zfs table supports the following options: fsname=""
mountopt=""
size=""
SELINUX LABELINGWhen running on an SELinux system, if you move the containers storage graphroot directory, you must make sure the labeling is correct. Tell SELinux about the new containers storage by setting up an equivalence record. This tells SELinux to label content under the new path, as if it was stored under /var/lib/containers/storage. semanage fcontext -a -e /var/lib/containers NEWSTORAGEPATH restorecon -R -v NEWSTORAGEPATH In rootless mode, you would set semanage fcontext -a -e $HOME/.local/share/containers NEWSTORAGEPATH restorecon -R -v NEWSTORAGEPATH The semanage command above tells SELinux to setup the default labeling of NEWSTORAGEPATH to match /var/lib/containers. The restorecon command tells SELinux to apply the labels to the actual content. Now all new content created in these directories will automatically be created with the correct label. QUOTASContainer storage implements XFS project quota controls for overlay storage containers and volumes. The directory used to store the containers must be an XFS file system and be mounted with the pquota option. Example /etc/fstab entry: /dev/podman/podman-var /var xfs defaults,x-systemd.device-timeout=0,pquota 1 2 Container storage generates project ids for each container and builtin volume, but these project ids need to be unique for the XFS file system. The xfs_quota tool can be used to assign a project id to the storage driver directory, e.g.: echo 100000:/var/lib/containers/storage/overlay >> /etc/projects echo 200000:/var/lib/containers/storage/volumes >> /etc/projects echo storage:100000 >> /etc/projid echo volumes:200000 >> /etc/projid xfs_quota -x -c 'project -s storage volumes' /<xfs mount point> In the example above, the storage directory project id will be used as a "start offset" and all containers will be assigned larger project ids (e.g. >= 100000). Then the volumes directory project id will be used as a "start offset" and all volumes will be assigned larger project ids (e.g. >= 200000). This is a way to prevent xfs_quota management from conflicting with containers/storage. FILESDistributions often provide a /usr/share/containers/storage.conf file to define default storage configuration. Administrators can override this file by creating /etc/containers/storage.conf to specify their own configuration. Likewise rootless users can create a storage.conf file to override the system storage.conf files. Files should be stored in the $XDG_CONFIG_HOME/containers/storage.conf file. If $XDG_CONFIG_HOME is not set then the file $HOME/.config/containers/storage.conf is used. Note: The storage.conf file overrides all other storage.conf files. Container engines run by users with a storage.conf file in their home directory do not use options in the system storage.conf files. /etc/projects - XFS persistent project root definition /etc/projid - XFS project name mapping file SEE ALSOsemanage(8), restorecon(8), mount(8), fuse-overlayfs(1), xfs_quota(8), projects(5), projid(5) HISTORYMay 2017, Originally compiled by Dan Walsh dwalsh@redhat.com ⟨mailto:dwalsh@redhat.com⟩ Format copied from crio.conf man page created by Aleksa Sarai asarai@suse.de ⟨mailto:asarai@suse.de⟩
|