Tool to Synchronize Filing Systems in Regular Intervals on Linux

If you ever had to stare at fsck repairing a filing system after an unclean reboot, you’ll appreciate this very tiny but also very useful utility. You can run it as part of your startup services in GNOME, or as part of a cron job, or init script, or whatever. The program does nothing except calling sync(2) every three seconds in a loop.

I seriously wonder why on Earth this isn’t done automatically in the Linux kernel or as a part of a system script.

BTW, the tool is also useful when you’re dealing with removable media like USB sticks, other Flash media, diskettes or optical storage systems. Although it seems that on modern Linux systems like Ubuntu 9.10, syncing is done more frequently now for particular types of storage, extra syncs can do no harm.

The reason I wrote it is b/c I’ve begun using ext2 as my main filing system for the sake of speed (ext3 and especially ext4 are comparatively slow when compared to ext2, for instance). ext2 has no journalling, and hence is more susceptible to damage from unclean reboots. Again, I wonder why ext2 doesn’t sync automatically as any reasonable filing system (or OS kernel) should.

SyncOften ZIP File

Antwort schreiben

Sie müssen als angemeldet sein, um einen Kommentar schreiben zu können.