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
# 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
# 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
# grep OPTIONS /etc/sysconfig/docker OPTIONS='–g /dockervol'
Start Docker Daemon
# systemctl start docker # docker info | grep Backing Backing Filesystem: vxfs
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.