site  contact  subhomenews

Purged old aufs whiteout files

November 25, 2025 — BarryK

EasyOS is no longer using aufs; we have moved permanently to overlayfs. The reasons are explained in earlier blog posts.

I run Easy daily on my Lenovo PC, an installation that has been there for a long time, and updated to new version many times. I just discovered that the session folder has lots of leftover aufs whiteout files. These don't have any purpose, not doing any harm being there. In fact, they aren't even needed if we were to switch back to using aufs.

Have put some code into file inc/07new-version in the initrd:

#20251125 have updated from older versions, have lots of leftover .wh. files...
if [ "$LAYERFS" == "overlay" ];then
if [ ! -e /mnt/${WKG_DEV}/${WKG_DIR}.session/session1/var/local/purged-aufs-wh-files-flg ];then
find /mnt/${WKG_DEV}/${WKG_DIR}.session/session1 -type f -name '.wh.*' -delete
find /mnt/${WKG_DEV}/${WKG_DIR}containers/*/.session -type f -name '.wh.*' -delete
mkdir -p /mnt/${WKG_DEV}/${WKG_DIR}.session/session1/var/local
touch /mnt/${WKG_DEV}/${WKG_DIR}.session/session1/var/local/purged-aufs-wh-files-flg
fi
fi

This purge will just run once, and somewhat later this code can be removed.   

Tags: easy