Updated savedir support on FAT

"Save directory" (savedir for short) is way of persistence whereby the user-modified files are stored in a directory somewhere, as opposed to "savefile", in which they are stored to a big loopback-mounted file.

Savefile is very convenient and reliable method of persistence and it works across many different filesystems including networked, non-POSIX ones, because we can always choose the filesystem inside the savefile - usually one that is POSIX compatible.

However savefile has a minor irritation - you are limited by its size. Sure you can always resize it if it gets full, but it's a hassle. Savedir on the other hand doesn't have this limitation, but it must be located on a POSIX filesystem. Well not really, but if not, then you'll get a lot of odd behaviours.

Fatdog64 has supported savedir since version 620 (April 2013), this includes support for non-POSIX filesystems too such as NTFS and FAT.

The support for NTFS was upgraded in October 2015 to support true POSIX permissions made available from recent versions of ntfs-3g. NTFS is pervasive and is good compatibility filesystem for Windows OS, so this is an overdue update (although I personally still recommend that you use savefile on NTFS).

I've now upgraded the support for savedir on FAT as well, using posixovl; this gives savedir on FAT some support for rudimentary POSIX features, such as permissions, device nodes, and fifos.

However using posixovl as the base on savedir isn't without problem. For one thing, it cannot be unmounted cleanly - so you must always run fsck at boot ("dofsck" will do this for you). On another front, posixovl emulation of POSIX on FAT isn't perfect, and you will sure notice some oddities. And the last point is - FAT is much more corruption-prone as compared to modern filesystems (including NTFS). But if you're happy to play with fire, then - yeah, why not?

As a bonus, I also make posixovl to work with CIFS too - so now you can enjoy network-based savedir with full POSIX features (plus some unwanted oddities, as I said above).

I've made the usage of posixovl for FAT and CIFS not obligatory. You can always fallback to old method of using FAT and CIFS directly - which will unmount cleanly, but you will have to live with the limitations of non-POSIX filesystems (e.g. all files turned into executables; permissions are lost, etc). Or of course, just use savefile

This will be in the next release of Fatdog, whenever that will be.


Posted on 20 Dec 2015, 13:37 - Categories: Fatdog64 Linux
Edit - Delete


No comments posted yet.

Add Comment

Title
Author
 
Content
Show Smilies
Security Code 2517859
Mascot of Fatdog64
Password (to protect your identity)