Sonntag, 12. April 2009

hammerread.c + FUSE = Read HAMMER Filesystem on Linux

I hacked together a FUSE module using hammerread.c, so you can now mount a HAMMER device in read-only mode on Linux. I haven't done any extensive testing, yet, so things are probably still very flaky. You can get the FUSE module from here: fusehammer-0.1.tar.gz and test with hammerdisk.raw.bz2.

Here's a walkthrough:

daniel@daniel-desktop:~$ wget http://hammerfs.googlepages.com/fusehammer-0.1.tar.gz
daniel@daniel-desktop:~$ tar zxf fusehammer-0.1.tar.gz
daniel@daniel-desktop:~$ cd fusehammer
daniel@daniel-desktop:~/fusehammer$ make
daniel@daniel-desktop:~/fusehammer$ ./fusehammer
HAMMER filesystem for FUSE (readonly)

Usage: ./fusehammer <dev> <mount_point> [<FUSE library options>]
daniel@daniel-desktop:~/fusehammer$ mkdir mnt
daniel@daniel-desktop:~/fusehammer$ ./fusehammer ../hammerdisk.raw mnt
daniel@daniel-desktop:~/fusehammer$ ls -l mnt
total 0
drwxr-xr-x 0 root root 0 1970-01-01 01:00 a
-rw-r--r-- 0 root root 12 1970-01-01 01:00 test
daniel@daniel-desktop:~/fusehammer$ cat mnt/test
Hello
World
daniel@daniel-desktop:~/fusehammer$ fusermount -u mnt

Note that the file attributes are wrong (mtime, ctime ..). I need to investigate that.

1 Kommentare:

  1. This is absolutely fantastic! Congratulations!

    AntwortenLöschen