logless for dummies

ext4 recently grew a feature to run without journalling, which is kinda neat.

While thinking about what it might take to do such a thing for xfs, because running without a log is certainly interesting for benchmarking if nothing else, I realized there’s a pretty simple way to do this without requiring any disruptive code changes:

# echo "0 67108864 zero" | dmsetup create zero1
# mkfs.xfs -l logdev=/dev/mapper/zero1 /dev/sdb1
# mount -o logdev=/dev/mapper/zero1 /dev/sdb1 /mnt/test

voila, most log overhead is gone.  The zero dm target soaks up the log writes w/o much overhead, and when mounting, xfs handles a zeroed log just fine.  In case it’s not obvious, of course this doesn’t give you any sort of filesystem integrity when you crash…

2 thoughts on “logless for dummies

  1. Funny. I did it with a ramdisk a long time ago. With a small script to (eventually) dump the ramdisk to/from disk at power down/up.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.