{"id":59,"date":"2007-01-17T22:33:29","date_gmt":"2007-01-18T04:33:29","guid":{"rendered":"https:\/\/geekmuse.dreamhosters.com\/wp\/?p=59"},"modified":"2007-01-18T12:47:17","modified_gmt":"2007-01-18T18:47:17","slug":"trying-out-fuse-on-the-mac","status":"publish","type":"post","link":"https:\/\/geekmuse.dreamhosters.com\/wp\/?p=59","title":{"rendered":"Trying out FUSE (on the Mac)"},"content":{"rendered":"<p>Following our latest podcast where we mentioned <a href=\"http:\/\/googlemac.blogspot.com\/\">Google&#8217;s Mac Blog<\/a>, I figured I&#8217;d give <a href=\"http:\/\/fuse.sourceforge.net\/\">FUSE (Filesystem in User Space)<\/A> a shot.  I downloaded the Mac installable page from <a href=\"http:\/\/code.google.com\/p\/macfuse\/\">here<\/a>.  A couple clicks and a reboot and I&#8217;m all set to go.<\/p>\n<p>The Mac package from Google just contains <a href=\"http:\/\/fuse.sourceforge.net\/sshfs.html\">sshfs<\/a>, 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 &#8216;sshfs&#8217; with some mount-like arguments:<\/p>\n<blockquote><p><span style=\"font-size: 12px; font-family: monospace;\">mkdir \/path\/to\/mountpoint<br \/>\nsshfs username@somehost:\/path\/to\/dir \/path\/to\/mountpoint<\/span><\/BLOCKQUOTE><\/p>\n<p>To unmount, you use the OS provided &#8216;umount&#8217;:<\/p>\n<blockquote><p><span style=\"font-size: 12px; font-family: monospace;\">umount \/path\/to\/mountpoint<\/span><\/BLOCKQUOTE><\/p>\n<p>If you&#8217;re going for your home directory and have the same username, you can use the usual &#8216;ssh&#8217; shortcut:<\/p>\n<blockquote><p><span style=\"font-size: 12px; font-family: monospace;\">sshfs somehost: \/path\/to\/mountpoint<\/span><\/BLOCKQUOTE><\/p>\n<p>If you run an ssh-agent and have your authorized_keys file set up on the remote host, it shouldn&#8217;t ask you for a password or anything.  If not, you&#8217;ll get the usual SSH passphrase prompt.<\/p>\n<p>There are a <B>ton<\/B> of options to sshfs.  Half are ssh related, the other half are FUSE related.  The only one that&#8217;s of practical interest is the &#8216;-C&#8217; option, to turn on compression.  If you like long arguments, you can use &#8220;-o compression=true&#8221;.  This&#8217;ll be really helpful if you&#8217;re working with text files, but it&#8217;ll slow things down if you&#8217;re working with images\/movies\/MP3\/etc.<\/p>\n<p>The integration with OS X leaves a bit to be desired.  The mount shows up in &#8216;df&#8217;, but the filesystem stats are set to a terabyte, with zero bytes used.  The mount doesn&#8217;t place nice with the Desktop like other typical mounts, and there&#8217;s no integration (yet, I&#8217;m hoping) with the Finder &#8220;Connect to Server&#8221; (Cmd-K) interface.  How doesn&#8217;t the mount play nice with the Desktop?  Well, the mount didn&#8217;t show up on the Desktop, but it does if you open it via Finder (enter the command: &#8220;open \/tmp\/testsshfs&#8221; in a terminal window).  Then it doesn&#8217;t go away, even when you unmount it.  Later, it did go away when I mounted something new.  Weird.  Anyways, I wasn&#8217;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.<\/p>\n<p>I&#8217;m still experimenting, but I&#8217;ve been brainstorming a few uses:<UL><LI>Analyzing web log entries from our remote server on <a href=\"http:\/\/dreamhost.com\/\">Dreamhost<\/a><br \/>\n<LI>Using the nice Mac Finder icon preview for my digital photos (on my Solaris box)<br \/>\n<LI>Accessing my large source repository remotely<br \/>\n<LI>Anything else I need, when I&#8217;m going to accessing and moving\/copies files around a lot<br \/>\n<\/UL><\/p>\n<p>&#8212; Nem<br \/>\n<HR><br \/>\n<strong>Update<\/strong>: Thursday, January 18th, 2006<\/p>\n<p>There&#8217;s a <A HREF=\"http:\/\/www.macosxhints.com\/article.php?story=20070112074843863\">hint today on MacOSXhints<\/A> about FUSE.  Of particular note are the options to the &#8216;sshfs&#8217; command to get it working nicely with the Desktop (this should be entered on one line):<\/p>\n<blockquote><p><span style=\"font-size: 12px; font-family: monospace;\">sshfs username@somehost:\/path\/to\/dir \/path\/to\/mount -o ping_diskarb,volname=SomeName<\/span><\/BLOCKQUOTE><\/p>\n<p>The &#8216;ping_diskrab&#8217; command makes OS X recognize that a new volume has been mounted (and puts it on the Desktop).  The &#8216;volname&#8217; command just gives that volume a custom name, other than &#8220;FUSE Volume <I>n<\/I>&#8220;.<\/p>\n<p>Works quite nicely nice, actually.<\/p>\n<p>Of note, if you download the Google Code base mentioned here, it does <b>not<\/b> come with the &#8216;fusermount&#8217; command.  Just use &#8216;umount&#8217; like I describe here.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Following our latest podcast where we mentioned Google&#8217;s Mac Blog, I figured I&#8217;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&#8217;m all set to go. The Mac package from Google just contains sshfs, but it also contains all the [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-59","post","type-post","status-publish","format-standard","hentry","category-news"],"_links":{"self":[{"href":"https:\/\/geekmuse.dreamhosters.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/59","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/geekmuse.dreamhosters.com\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/geekmuse.dreamhosters.com\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/geekmuse.dreamhosters.com\/wp\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/geekmuse.dreamhosters.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=59"}],"version-history":[{"count":0,"href":"https:\/\/geekmuse.dreamhosters.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/59\/revisions"}],"wp:attachment":[{"href":"https:\/\/geekmuse.dreamhosters.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=59"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/geekmuse.dreamhosters.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=59"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/geekmuse.dreamhosters.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=59"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}