It’s always helpful to see other people’s questions and answers; in this case it’s a conversation about HAMMER2 snapshots and how to manage them. (Follow the thread)
The aforementioned HAMMER2 fix is now in 5.4. You can update using the normal make buildworld/make buildkernel process to get it in place. I plan to roll a 5.4.2 release this weekend.
It’s possible to have data corrupted on a HAMMER2 volume during a specific combination of a bulkfree operation and a lot of writing to disk. Matthew Dillon has a potential fix already. As he announced, it’s scheduled to go into 5.4 this weekend. It’s a rare bug, but if you want to check for it, look for CHECK FAIL entries in /var/log/messages.
And because every cloud has a silver lining: some not-yet-quantified performance improvements.
This week’s BSD Now covers assembly on OpenBSD, games on FreeBSD, and disk space on DragonFly.
For future edification: If you have HAMMER2 installed, the bulkfree operation will create console/dmesg activity even when nothing is wrong, to show operations are happening.
Matthew Dillon recently fixed a TRIM bug, where a TRIM command was being issued unconditionally, regardless of the mount flag, and duplicating the action if it was set normally. It’s fixed now. This would only have any significant slowdown on UFS, which means it would only affect installworld – the rest of your mounted volumes are HAMMER, right?
If you have a mangled HAMMER2 disk, and you have inodes that are clearly mangled (the built-in CRCs don’t match), you can now remove them manually. This seems like Hole Hawg territory…
As part of a larger conversation about HAMMER, Matthew Dillon noted that he is planning to work on master-to-multiple-slave for HAMMER2, which would function similar to HAMMER1 mirror-stream.
Remember the upgrade for dragonflybsd.org machines? It completed, and it’s interesting to see that SSDs have become so easily available that “spinning rust” hard disk drives are only still useful for bulk storage, and even then probably not for much longer.
Another neat side effect: disk usage on developer system leaf.dragonflybsd.org was cut in half, thanks to HAMMER2 dedup/compression. It’s a ‘free’ half-terabyte.
These would be ‘In Other BSD’ links, but this isn’t Other BSD – It’s DragonFly:
- Towards a HAMMER1 master/slave encrypted setup with LUKS.
- Intro, Installation, and Fun with Hammer2.
I’m pulling a quote off of IRC to show some of the testing on HAMMER2, specifically as the background for this commit:
14:22 <@dillon_> ^^^ hammer2 bug, could reproduce it around once a day doing a continuous rm -rf on hardlinked snapshots. reproduced about once every 500 million directory entries or so
I am somewhat tickled by the notion that you might have a problem after deleting half a billion directory entries.
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.
HAMMER2 is now available by default in DragonFly, and can be used in the installation process. (It was possible, but manual, before.) The next DragonFly release should be soon.
Matthew Dillon’s found a solution to the problem of hardlinks in HAMMER2, and so moved on to dirents. The design document has a significant update to match.
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’.