Provisioning storage for Docker infrastructure from the Veritas File System

You can provision storage for Docker infrastructure on VxFS. The Docker infrastructure is managed by Docker Daemon. One of the ways to provision storage for Docker containers is from the Docker infrastructure. You can create and run Docker containers by provisioning storage from the Docker infrastructure. The Docker Daemon uses the '/var/lib/docker' directory on the VxFS file system for creating Docker infrastructure.

Alternatively, storage from VxFS and VxVM can be provisioned as data volumes to Docker containers. You can choose not to create the /var/lib/docker directory on VxFS, by editing the /etc/sysconfig/docker file with an alternate directory to be used by the Docker Daemon.

To provision Docker infrastructure from the default Docker directory

  1. Mount the Docker infrastructure directory on VxFS.

    # vxdg init dockerdg disk1 disk2

    # vxassist -g dockerdg make dockervol 200G

    # mkfs -t vxfs /dev/vx/dsk/dockerdg/dockervol

    # mount -t vxfs /dev/vx/dsk/dockerdg/dockervol /var/lib/docker/

  2. Start Docker Daemon and create container. Note the change in the size of directory.

    # systemctl start docker

To provision Docker infrastructure from another directory

  1. Create a VxFS directory.

    # vxdg init dockerdg disk1 disk2

    # vxassist -g dockerdg make dockervol 1G

    # mkfs -t vxfs /dev/vx/dsk/dockerdg/dockervol

    # mount -t vxfs /dev/vx/dsk/dockerdg/dockervol /dockervol

  2. In the '/etc/sysconfig/docker' file, append the OPTIONS field with -g dockervol.

    # grep OPTIONS /etc/sysconfig/docker

    Note:

    If SELinux is already disabled, do not append the docker file with the option --selinux-disabled.

  3. Start the Docker Daemon and note the directory size.

    # systemctl start docker