The regular maintenance scripts for HAMMER1 assume that it’s mounted at the time of cleanup. If you have them unmounted, they won’t go through that regular maintenance, but it’s easy enough to fix.
You could, if you are running DragonFly-current, create a vkernel using HAMMER2, and try out HAMMER2 even if your underlying disk is HAMMER1. Odd, but useful.
You can make them, but you can’t mount them. Tomohiro Kusumi’s note that mkfs_hammer2 works on Linux is of little wide practical use, but it’s a sign of progress to a larger goal.
Tomohiro Kusumi has made the userspace tools for HAMMER1 compilable on Linux, so you could create a HAMMER1 volume on a Linux system. No, it’s not the ability to read/write HAMMER1 in Linux, unfortunately – just some manipulation of volumes. I don’t know what his future plans are for HAMMER1|2 on Linux, if any.
Continuing my catchup on recent commits, there’s now a ‘version 7’ internal to HAMMER 1. It changes the CRC code to a faster version, but since this instruction isn’t used (yet), there’s no real world impact. Remember this for next time you want to run ‘hammer version-upgrade’.
If you’re mounting a HAMMER2 filesystem, you can refer to it by label instead of by device.
No, it’s not ready for use yet and I don’t have a date other than “when it’s done”, to preanswer the next questions.
This makes sense once you think about it: copy-on-write filesystems (like Hammer2 and ZFS and probably others) actually do nothing when “zeroing” out filespace.
If you are on DragonFly-current, AKA DragonFly 4.7, make sure to perform a full buildworld on your next upgrade. Tomohiro Kusumi changed a Hammer ioctl, and the buildworld is needed to keep everything in sync.
A useful tip: if your DragonFly machine isn’t usually on 24/7 (e.g. a laptop, not a server), you should move your Hammer cleanup from 3 AM to sometime when the computer is normally on.
Hammer2 now has inode indexing, which Matthew Dillon was avoiding while trying to create more efficient hardlink support. The result is now with that problem solved, more updates can come in: NFS support, mtime updates, output changes, code removal, and lots of other changes, not all of which I’m even linking.
Tomohiro Kasumi wrote a lengthy explanation of what “@@” means, in the context of the Hammer file system. It acts as a sort of signifier for each actual Hammer pseudo-file-system, since it’s possible to null-mount these anywhere in DragonFly, under all sorts of names. Don’t trust my summary, though – read his.
Did you know there’s a rescue image, created with crunchgen, in DragonFly? If your system can boot to single-user mode, you can use it to at least manipulate data on disk – it includes mined as a simple small editor. (Since vi assumes /usr is mountable.) This rescue image now includes undo, so you can back out changes on a Hammer volume.
Tomohiro Kusumi would like to port Hammer (1) to FreeBSD, as noted in this bug discussion. It’s not even begun to happen, but if you can contribute, please do.
Tomohiro Kusumi has been creating a near-constant stream of bugfixes and cleanups to Hammer for quite some time. I don’t often link to it, because they are incremental improvements and hard to linkblog, so to speak. In an effort to make up for this deficit, I do want to draw attention to his two recent commits: “Make hammer commands print root volume path“, and “Print volume list after volume-add|del“. Small changes, but this is what makes complex systems usable.
The ‘hammer show’ command can be used to dump the B-Tree structure of a Hammer volume, and CRC errors can be spotted. It’s rare that anyone would need it, but if you do, this dumped information will include file hierarchy information.
If that makes you a bit nervous to repost any of that information when talking about it in public, Tomohiro Kusumi has added an ‘obfuscate’ option to ‘hammer show’ that does just that – it hides path information from the debug output.