Podcasting What Geeks Really Want To Hear

Wednesday, January 17, 2007

Following our latest podcast where we mentioned Google’s Mac Blog, I figured I’d give FUSE (Filesystem in User Space) a shot. I downloaded the Mac installable page from here. A couple clicks and a reboot and I’m all set to go.

The Mac package from Google just contains sshfs, but it also contains all the FUSE libraries, so the other interfaces should compile fairly painlessly (I would hope). To mount a filesystem, a user just calls ‘sshfs’ with some mount-like arguments:

mkdir /path/to/mountpoint
sshfs username@somehost:/path/to/dir /path/to/mountpoint

To unmount, you use the OS provided ‘umount’:

umount /path/to/mountpoint

If you’re going for your home directory and have the same username, you can use the usual ‘ssh’ shortcut:

sshfs somehost: /path/to/mountpoint

If you run an ssh-agent and have your authorized_keys file set up on the remote host, it shouldn’t ask you for a password or anything. If not, you’ll get the usual SSH passphrase prompt.

There are a ton of options to sshfs. Half are ssh related, the other half are FUSE related. The only one that’s of practical interest is the ‘-C’ option, to turn on compression. If you like long arguments, you can use “-o compression=true”. This’ll be really helpful if you’re working with text files, but it’ll slow things down if you’re working with images/movies/MP3/etc.

The integration with OS X leaves a bit to be desired. The mount shows up in ‘df’, but the filesystem stats are set to a terabyte, with zero bytes used. The mount doesn’t place nice with the Desktop like other typical mounts, and there’s no integration (yet, I’m hoping) with the Finder “Connect to Server” (Cmd-K) interface. How doesn’t the mount play nice with the Desktop? Well, the mount didn’t show up on the Desktop, but it does if you open it via Finder (enter the command: “open /tmp/testsshfs” in a terminal window). Then it doesn’t go away, even when you unmount it. Later, it did go away when I mounted something new. Weird. Anyways, I wasn’t expecting it to work nice with the Desktop, although you can interact with a mounted volume via the Finder interface, just like any other directory.

I’m still experimenting, but I’ve been brainstorming a few uses:

  • Analyzing web log entries from our remote server on Dreamhost
  • Using the nice Mac Finder icon preview for my digital photos (on my Solaris box)
  • Accessing my large source repository remotely
  • Anything else I need, when I’m going to accessing and moving/copies files around a lot

— Nem

Update: Thursday, January 18th, 2006

There’s a hint today on MacOSXhints about FUSE. Of particular note are the options to the ‘sshfs’ command to get it working nicely with the Desktop (this should be entered on one line):

sshfs username@somehost:/path/to/dir /path/to/mount -o ping_diskarb,volname=SomeName

The ‘ping_diskrab’ command makes OS X recognize that a new volume has been mounted (and puts it on the Desktop). The ‘volname’ command just gives that volume a custom name, other than “FUSE Volume n“.

Works quite nicely nice, actually.

Of note, if you download the Google Code base mentioned here, it does not come with the ‘fusermount’ command. Just use ‘umount’ like I describe here.

posted by Nem W Schlecht at 22:33 in News    

No Comments »

No comments yet.

RSS feed for comments on this post.

Leave a comment

You must be logged in to post a comment.

22 queries. 0.037 seconds.