site  contact  subhomenews

OverlayFS is still pathetic

April 29, 2023 — BarryK

EasyOS, Quirky and before that, Puppy Linux, all use aufs union-filesystem. Though, some recent experimental releases of Puppy are using overlayfs.

Back in 2003, Puppy used unionfs, and circa 2006 migrated to aufs -- rough date estimates, I'm not really sure.

The developer of aufs tried to get it mainlined in the kernel; however, met with opposition, and some kernel developers created overlayfs that was in the kernel right from the start.

Over the years I have tested overlayfs, like about every few years, but always found show-stopper problems.

Today, decided to give it another go. Compiled the 5.15.109 kernel, with these settings:

  <*> Overlay filesystem support                                       CONFIG_OVERLAY_FS                            
-*- Overlayfs: turn on redirect directory feature by default CONFIG_OVERLAY_FS_REDIRECT_DIR
[ ] Overlayfs: follow redirects even if redirects are turned off CONFIG_OVERLAY_FS_REDIRECT_ALWAYS_FOLLOW
[*] Overlayfs: turn on inodes index feature by default CONFIG_OVERLAY_FS_INDEX
[ ] Overlayfs: auto enable inode number mapping CONFIG_OVERLAY_FS_XINO_AUTO
[*] Overlayfs: turn on metadata only copy up feature by default CONFIG_OVERLAY_FS_METACOPY

EasyOS creates the layered filesystem in the initrd, and performs a switch_root onto it. I had to fix mounting for overlayfs:

https://github.com/bkauler/woofq/commit/c86eb8189a87263f86a7a05112b483b3fc166469

Got to the desktop, but heaps of errors. Just picking out one of them -- /usr/sbin/fixmenus performs this operation:

mv -f /root/.jwmrc /root/.jwmrc-previous

Seems harmless, but it failed:

mv: cannot move '/root/.jwmrc' to a subdirectory of itself, 'root/.jwmrc-previous

I googled it of course, and found the same error reported all over the place, but there does not seem to be any definite fix. Not that I could find anyway. As a wild stab in the dark, I tested with "-o xino=on", no difference.

The thing is, aufs "just works". It works so well, that years go by and it works so flawlessly that it is off my radar. But I read about everyone else using overlayfs and think that I had better give it another go.

Well, maybe I will give it yet another go; in a couple more years from now.

The only concern that I have about aufs is that there is only one developer, Junjiro Okajima, and he has shown signs sometimes, of faltering with maintaining it. But then, I'm also no spring chicken, so when he retires probably I will also.

EDIT 2023-04-30:
There is discussion on the Puppy Forum in response to the above blog post:

https://forum.puppylinux.com/viewtopic.php?p=87837#p87837

...I responded with an outline of the layers in EasyOS, and a suggestion what the problem might be (zram on the rw layer).       

Tags: easy