Recovering files from a ZFS/FUSE snapshot under Linux

A week ago I had a hairy crash when stopping ZFS/FUSE on my box, which I mentioned on the ZFS/FUSE mailing list. I upgraded from to 2.6.26-rc7 and in the process blew away the kernel build tree for the kernel to recover the disk space. Shortly after that I received a query off-list from Miklos Szeredi, the FUSE maintainer, asking if I could supply him a disassembly of the offending function from the kernel build – which was now consigned to the bit bucket. 🙁

Fortunately I’ve been regularly rsync’ing various important parts of my computer onto ZFS/FUSE partitions and snapshoting them with timestamps so I (theoretically) was only a few commands away from getting to the defunct kernel tree once more. The problem is that unfortunately you can’t look at a ZFS/FUSE snapshot directly at the moment, it’s one of the parts that is still to be gotten working under Linux.

Luckily there is a trick to be able to get access, which is is to create a clone of the snapshot. The ZFS Administration Guide describes a clone thus:

A clone is a writable volume or file system whose initial contents are the same as the dataset from which it was created. As with snapshots, creating a clone is nearly instantaneous, and initially consumes no additional disk space. In addition, you can snapshot a clone.

The magic command to do this was just:

zfs clone ZFS/home@20080606-2201 ZFS/temp

and suddenly I had /srv/ZFS/temp, a fully working version of this machines /home directory as it was around 10pm on the 6th June and in it was the kernel tree.

Very nice!

Applying Graphics Cards to Password Cracking

On the Beowulf list there has been a long thread on GPGPU and especially nVidia’s CUDA language. As part of it Prentice Bisbal posted about a friend of his, Mario Juric, who decided to write a proof of concept MD5 password hashing program to take advantage of CUDA.

In his message to the Beowulf list Prentice quoted Mario saying:

If you attempt to compute a single hash on an entire card, you won’t get any improvement. Same as you wouldn’t if you tried it on a single vs. quad core CPU. But if you compute four hashes, than single vs. quad makes a huge difference. And the GPU cards are effectively 128 core CPUs, so when you need to compute millions of hashes…

Now Mario Juric (who organised the AstroGPU workshop) has put up a web page on the program, which gives details of the sort of performance he got with a quick hack.

One way of visualizing this is noting that a single 8800 Ultra could brute-force break an MD5 hashed password of eight or less characters+numbers (A-Z, a-z, 0-9) in about ~16 days.

But this really is just a quick hack:

The MD5 code used here was written in less than 2 days, as a proof-of-concept, and with only a single one-liner GPU-specific optimization.

Of course if people do want to try playing with it the program is available, though at the moment there isn’t a software license included with it. I’ve emailed Mario about the license to see if he can clarify what the rules are.

World Petrol Prices

If, like me, you’re curious about how petrol prices vary across the world then this handy site has a nice table made up from information from contributors around the world (and they want more). The figures are normalised to USD per gallon and Indian Rupees per litre (and be aware of the caveats at the end).

Interesting to see that whilst Americans complain about the cost of petrol they still pay less for it than Australians were in 2005 and presently the UK pays 2.5 times the price of gas in the USA.

How Not to Handle Sensitive Documents (Updated)

According to the the UK Government’s Cabinet Office:

Top secret – The compromise of this information or material would be likely: to threaten directly the internal stability of the UK or friendly countries; to lead directly to widespread loss of life; to cause exceptionally grave damage to the effectiveness or security of UK or allied forces or to the continuing effectiveness of extremely valuable security or intelligence operations; to cause exceptionally grave damage to relations with friendly Governments; to cause severe long-term damage to the UK economy.

So it’s not very clever to have one of your employees leave such a document on a train..

Our correspondent said that across several departments in Whitehall on Wednesday evening there is said to be “horror” that top-secret documents could have been so casually mislaid.

I’ll say! Apparently the culprit has been suspended from his job.

Update: It happened again, though this time it’s not as clear what the actual classification was.

Large Earthquake in Japan (Mag 6.8) (updated)

The USGS is reporting a mag 6.8 quake on the Japanese island of Honshu:

80 km (50 miles) SW of Morioka, Honshu, Japan
85 km (50 miles) SSE of Akita, Honshu, Japan
100 km (60 miles) NNW of Sendai, Honshu, Japan
390 km (240 miles) N of TOKYO, Japan

Update: The BBC says the current death toll is 4, and the USGS has downgraded the magnitude to 6.8 from 6.9.

Update 2: Death toll is now 9, and the news services persist in reporting it as a magnitude 7.2 quake even though the USGS page still shows it as 6.8.

Searching Photos by Drawing a Picture

OK, so maybe you’ve got a few hundred, or thousand, photos that you’ve taken, but how do you search them ? You could try and tag them for everything (if you’ve got the time) but wouldn’t it be nice if you could just draw a picture and search for that ?

Well the Digikam folks are working on that by incorporating some of the existing ImgSeek projects code into the KDE4 version of Digikam (0.10.0).

They’ve got a short video demo of it up on YouTube (embedded below).