Power & Source of Big Ideas

Overlay FS / Docker / Device Mapper

Moderators: chensy, FATechsupport

I've been enjoying my Nano PI R6S. I have installed and learned how to use docker.

Docker supports a few storage engines that provide the capability to layer images. The recommended is storage engine is Overlay FS, but on my Nano PI, it defaulted to Device Mapper.

After creating many images and pruning the unused images and containers, I noticed that I was out of space on my Nano PI. Upon inspection with many calls of "du -h --max-depth 1 | sort -h" I determined that the files used by docker's Device Mapper storage engine were the culprit that there was a file that was 100GB in size. The files were on the eMMC which is only 64GB, so that seemed odd. It turns out that the files are sparse files and the underlying data for the file was not as big as was reported. Still, I was out of space. After pruning ALL images and containers, I was still out of space. After manually deleting these files, the space was reclaimed. I removed /var/lib/docker and restarted the service, and a clean set of files are created by docker and I'm back in business.

It seems that the files for Device Mapper are sparse, but never reduce in size as images and layers are removed. Since I can nuke and rebuild the essential images, it's workable, but not ideal.

I added an external USB hard drive to the system, partitioned it, and formatted it as an EXT4. I then stopped docker, mounted the partition to /var/lib/docker, then restarted docker, and found that automatically it started using the Overlay FS driver. More than that, I found that when I removed/pruned images, the file usage dropped accordingly.

All of this begs a few questions:

1. Can anyone confirm that when the sparse files used by Device Mapper are used on an Overlay FS that they do not reclaim space when layers are removed?
2. Can a Debian or Ubuntu installation image be obtained which does not use Overlay FS, so that Docker can use its Overlay FS?
3. If FriendlyELEC will not provide this, what's the process by which an image can be built from source code? Are there drivers specific to the R6S that need to be obtained? Can anyone point me to any documentation for this?

Any help would be appreciated.
Thx,
Chad

Who is online

In total there are 2 users online :: 0 registered, 0 hidden and 2 guests (based on users active over the past 5 minutes)
Most users ever online was 5185 on Wed Jan 22, 2020 1:44 pm

Users browsing this forum: No registered users and 2 guests