site  contact  subhomenews

Fix for overlayfs corruption

September 14, 2025 — BarryK

EasyOS 7.0.8 has overlay filesystem by default, but I withdrew it soon after uploading, and 7.0.9 was back on aufs. The reason was filesystem corruption. Now testing 7.0.11, prior to release, and got the same corruption:

img1

I examined /var/log/messages, and discovered why. The reason was, a container was running, and it was started using the same work-directory as the main desktop. Overlay log reported that this will result in "undefined behaviour".

I have fixed it by giving each container its own unique work-directory, by appending $EXE which is the name of the container. See line 438 in /usr/local/easy_containers/start-container:

  mkdir -p /mnt/.easy_rw/tempwork${EXE} #20250914 unique work dir.
mount -t overlay -o xino=on,nfs_export=off,index=off,uuid=null,verity=off,redirect_dir=off,metacopy=off,lowerdir=.session:${EXTRASFS}${BASESFS},upperdir=/mnt/.easy_rw/${EXE},workdir=/mnt/.easy_rw/tempwork${EXE} overlay /mnt/${WKG_DEV}/${WKG_DIR}containers/${EXE}/container

Just about ready to release 7.0.11, just need to test on some more of my computers. My daughter is visiting, so we have outings today, but will get stuck into more testing this evening.  

Tags: easy