You are hereBlogs / marv's blog / FUSE available for Mac

FUSE available for Mac


By marv - Posted on 12 January 2007

sshfs filesystem demoI have been waiting long for this day: The filesystem FUSE is finally available for the Mac. To all who have no idea what I am talking about, a brief intro: Programming a filesystem for Linux had always kind of been a pain in the butt. Anyone who has lowered themselves down to kernel-level will know what I'm talking about. Low-level programming, constant reboots and praying that the kernel still functioned are not the average developer's idea of "fun". So along came FUSE to put an end to this headache. FUSE itself resides in kernel-space and does all the low-level file I/O for you. Now the happy developer can control FUSE from user space, and implement a file system without ever needing to do any kernel programming.
Although programming file systems under the Mac does not feel quite as low-level, and is not as dangerous as on Linux (Darwin uses a hybrid-kernel, whereas Linux a monolithic one), it still required a good understanding of the system components. Plus, many great filesystems, such as an SSH filesystem had already been implemented for FUSE on Linux.
Well, wait no more, since now the Mac users can make use of these systems as well. A Googler ported FUSE to the Mac, and I must say that although still a tad buggy, it fulfills its promises. I tested sshfs, an SSH filesystem built on FUSE, and it works wonderfully. The screenshot shows me surfing on our domestic Siusing server. Even watching videos (by a mysterious production company called "BangBros." :P) works flawlessly, if admittingly, a bit slow over my local WLAN. Now I don't have to envy those "fish" users anymore :).

Sounds awesome dude! Can you give us some more information? I would be interested in installation requirements. Is it painless to get working? Ready for productive use, or just for playing with? I don't need large explanations, just some short comments on those issues...

It's a cinch dude, download the binaries at the Google blog. At first I didn't notice this, but the binaries already contain the ssh-fs:
http://code.google.com/p/macfuse/
Then unpack the tar.bz2 like this:
sudo tar -C / -jxvpf fuse-binaries-0.1.0b006.tar.bz2
(You'll need to be root as you are unpacking into /usr/local/ and /System/Libraries).
Then reboot.
Create a folder somewhere as your mount point. I chose ~/External/Siusing for instance.
Now mount the drive like this:

sshfs -ovolname=Siusing -oping_diskarb $siusing:/ External/siusing

Here, $siusing contains my username + address to the Siusing server. Make sure to add the remote directory (here: root '/') to the host, as otherwise the tool will not function.

Is it stable? So far I have had no problems. But I couldn't get the volume properly unmounted. So expect to be having the volume on your desktop until reboot. You can of course place one of these mounts into a startup script. I will be hacking up a small GUI or a folder action for this. I'll post it when it's done.