Docker Recognizes VxFS as backing filesystem to Docker daemon

Docker has a capability to specify custom filesystem to use as the root of the Docker runtime. This can be achieved by using the -g option when starting the Docker daemon.

The Veritas File System (VxFS) is a POSIX compliant file system. We can use VxFS mount point as a root of the Docker runtime. This enables us to leverage all capabilities offered by VxFS.

Docker 1.9 correctly recognizes vxfs as backing filesystem. Though earlier docker versions show 'docker info'  output as <unknown> for backing filesystem. User can safely use vxfs backing filesystem with earlier docker versions also.

One of the ways to provision storage for Docker Daemon is from the VxFS mount point. The Docker Daemon uses the ‘/var/lib/docker’ as a default directory which can be mounted as the VxFS file system.

We can also choose a VxFS mount point to be used by the Docker Daemon, by editing the /etc/sysconfig/docker configuration file.

To provision Docker infrastructure from the default Docker directory

  • Stop Docker Daemon

# systemctl stop docker
  • Create and mount the vxfs mount point to /var/lib/docker to be used for backing filesystem to Docker Daemon.
# vxdg init dockerdg disk1 disk2

# vxassist –g dockerdg make dockervol 20G

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

# mount –t vxfs /dev/vx/dsk/dockerdg/dockervol /var/lib/docker/
  • Start Docker Daemon and create container.

# systemctl start docker

 

To provision Docker infrastructure from an alternate directory

  • Create and mount the vxfs mount point to be used for backing filesystem to Docker Daemon.
# vxdg init dockerdg hitachi_vsp0_03f1 hitachi_vsp0_03f2

# vxassist –g dockerdg make dockervol 1G

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

# mkdir /dockervol

# mount –t vxfs /dev/vx/dsk/dockerdg/dockervol /dockervol
  • Stop Docker Daemon

# systemctl stop docker
  • In the /etc/sysconfig/docker’ file, edit the ‘OPTIONS’ field to specify VxFS as the FS backend.
# grep OPTIONS /etc/sysconfig/docker

OPTIONS='–g /dockervol'
  • Start Docker Daemon

# systemctl start docker

# docker info | grep Backing

Backing Filesystem: vxfs