Back to articles
AI & Cloud

Optimizing Docker Storage Driver: Guide to Switching to Fuse OverlayFS on Old Linux Kernel 1

Detailed guide to switch Docker storage driver from devicemapper to Fuse OverlayFS on old Linux systems to improve performance, stability, and resource management. Includes...

DPTCloud Engineering4 min read
Optimizing Docker Storage Driver: Guide to Switching to Fuse OverlayFS on Old Linux Kernel 1

Optimizing Docker Storage Driver: Guide to Switching to Fuse OverlayFS on Old Linux Kernel 1

On older Linux systems (such as CentOS 7, RHEL 7, or Ubuntu 16.04), Docker often defaults to the devicemapper storage driver. However, devicemapper suffers from performance limitations, high latency, and inefficient storage management—especially when running many containers or heavy AI/ML applications. To improve performance, stability, and scalability, switching to Fuse OverlayFS is a recommended solution. This guide walks you through the process of switching on old Linux systems, including pre-checks, configuration, validation, and optimization.

Introduction to Docker Storage Drivers

Docker uses storage drivers to manage container and image layers. Each driver operates differently, directly impacting I/O performance, latency, and scalability.

  • Devicemapper: Uses logical volume management, resulting in poor performance, fragmentation, and unsuitability for high I/O workloads.
  • OverlayFS: Leverages overlay filesystems for higher performance, but requires kernel support.
  • Fuse OverlayFS: A userspace implementation of OverlayFS via FUSE (Filesystem in Userspace), suitable for older kernels that lack native OverlayFS support.

On older Linux systems (kernel < 3.18), native OverlayFS support is limited. Fuse OverlayFS provides a reliable alternative, allowing you to benefit from OverlayFS features without kernel upgrades.

Preparation and Environment Check

Before switching, verify the following prerequisites:

1. Check Kernel and OS Version

Run the following command to verify the kernel version:

uname -r

If the kernel version is 3.10 or lower, OverlayFS is not fully supported. Fuse OverlayFS is the ideal alternative.

2. Check Current Docker Storage Driver

docker info | grep "Storage Driver"

If the output shows devicemapper, you need to switch drivers.

3. Install FUSE and OverlayFS

sudo yum install -y fuse fuse-libs fuse-devel
sudo modprobe fuse

Ensure FUSE loads at boot:

echo "fuse" | sudo tee -a /etc/modules

Switching to Fuse OverlayFS

To switch the storage driver, configure Docker to use Fuse OverlayFS. Follow these steps:

1. Edit Docker Daemon Configuration

Open the Docker daemon configuration file:

sudo vi /etc/docker/daemon.json

Add the following configuration:

{
  "storage-driver": "fuse-overlayfs",
  "storage-opts": [
    "overlay2.override_kernel_check=true"
  ]
}

Note: The option overlay2.override_kernel_check=true allows OverlayFS usage even on unsupported kernels.

2. Restart Docker

sudo systemctl restart docker

3. Verify the Change

docker info | grep "Storage Driver"

The output should now display Fuse OverlayFS.

Validation and Performance Testing

Ensure the switch was successful by running these checks:

1. Create a Test Container

docker run -d --name test-container ubuntu:20.04 sleep 3600

2. Check Storage Mounts

docker inspect test-container | grep "Mounts"

Confirm the container is mounted using OverlayFS.

3. Test I/O Performance

# Create a large file for I/O testing
dd if=/dev/zero of=/tmp/testfile bs=1M count=100
docker run -it --rm ubuntu:20.04 dd if=/tmp/testfile of=/dev/null bs=1M

Compare the execution time with devicemapper to evaluate performance improvements.

Troubleshooting Common Issues

1. Error: “overlay2: filesystem not supported”

Solution: Ensure FUSE is installed and kernel supports it. Add fuse to /etc/modules.

2. Docker Fails to Start

Solution: Check for syntax errors in /etc/docker/daemon.json. Use:

docker info

To view detailed error messages.

References

Switching from devicemapper to Fuse OverlayFS on older Linux systems is a critical step to optimize Docker performance. With correct configuration, you can achieve better I/O performance, lower latency, and improved scalability—especially valuable in AI/ML and containerized workloads.

DPTCloud Tier III Infrastructure

High-RAM Cloud VPS Plans Optimized for AI, Databases & Cache

Enterprise RAID 10 NVMe SSDs, CMC & FPT District 9 uplinks with Anycast Anti-DDoS and 99.99% SLA.

View 22 VPS Plans
ECO · vn-02Recommended

VPS-4E

297.000 ₫ / mo

10% VAT included

  • CPU: 4 vCPU
  • RAM: 8 GB
  • SSD: 50 GB NVMe
ECO · vn-02

VPS-5E

614.900 ₫ / mo

10% VAT included

  • CPU: 8 vCPU
  • RAM: 16 GB
  • SSD: 100 GB NVMe
ADVANCED · vn-03Recommended

VPS-4T

548.900 ₫ / mo

10% VAT included

  • CPU: 4 vCPU
  • RAM: 8 GB
  • SSD: 50 GB NVMe

Related Articles

View all
ZaloZalo SupportDiscord0384 753 478