Mac OS X supports a handful of common file systems—HFS+, FAT32, and exFAT, with read-only support for NTFS. It can do this because the file systems are supported by the OS X kernel. Formats such as Ext3 for Linux systems are not readable, and NTFS can’t be written to. But that doesn’t mean that there aren’t occasions when you’d want to use one of them. With FUSE (Filesystem in Userspace) you can.
FUSE mimics the kernel’s handling of file systems and allows OS X to both interact with unsupported formats and use many other storage routines, some of which are rather creative. With FUSE, such formats can be handled very similarly to natively supported file systems and allow you to interact with drives your Mac otherwise could not read to or write from. Here’s how you can put FUSE to work.
What is FUSE?
FUSE works by providing a behind-the-scenes interface between Apple’s storage routines and specially programmed modules that you install on your Mac. These modules can read various storage formats, and then, with FUSE’s help, can be mounted and accessed as a drive-like storage medium. For instance, if you have several cloud-based storage accounts, you can write a small module that will connect all of these services with FUSE. You can then mount them as a single volume on the system, much like you’d plugged in a USB drive.
FUSE has its limitations, however. File system access performs less well than with native kernel support, for example. On the other hand it offers vast flexibility in storage options. For instance, in addition to using multiple Web storage services as a single drive, FUSE modules have been written to use PNG image files for storing drive data. In this case a mounted storage device’s data will be spread out among a number of garbled PNG images (a perhaps amusing, but frankly bizarre, way to manage your files).
These approaches are experimental and fun, but FUSE does have useful options that allow you to expand your Mac’s file system support beyond the natively supported formats, including allowing access to Ext3 drives, full NTFS support, and even letting you mount SFTP shares as local drives.
To get started, download and install FUSE for OS X. Once installed, you can install the desired module for the various file systems you would like to manage on your Mac. Keep in mind that some modules are well tested and regularly used, while others might not be. And some are more integrated in OS X while others will require Terminal commands to mount their file systems.
FUSE and NTFS
For NTFS support, one of the more popular FUSE modules is NTFS-3G, an open-source package from Tuxera. To acquire it you have several options. You can download an older precompiled version of NTFS-3G. The more technically inclined can download and compile the latest source code either directly from Tuxera or by using a package manager like MacPorts or Fink.
Once installed, an attached NTFS drive should be automatically recognized and mounted using NTFS-3G and FUSE. In addition, you should be able to format drives as NTFS using Disk Utility.
For Linux Ext2 and Ext3 file systems, you can use the fuse-ext2 module, and then mount Ext2 and Ext3 drives using Terminal (automatic mounting and managing in Disk Utility is not yet supported). Follow these steps:
1. Install the ext2 FUSE module.
2. Enable Disk Utility’s Debug menu, using the following command in Terminal, followed by opening Disk Utility and choosing the option in the Debug menu to show all partitions:
defaults write com.apple.DiskUtility DUDebugMenuEnabled 1
3. Attach your ext2/ext3 drive and when it appears in Disk Utility (grayed out), select the volume and press Command-I to produce its Information window. In this window note the device name, which should be something like “disk2s2,” or “disk3s2.”
4. Create a new folder somewhere in your user account to use as a mount point for the drive (I recommend a folder called “mount” directly in your home folder).
5. Mount the drive using the following Terminal command syntax, replacing the device name and mount path with that of your disk and the path to the mount folder you created:
fuse-ext2 /dev/disk2s2 /Volumes/mountpoint
This will mount the drive as read-only, but you can use the “-o force” flag in the following manner to implement write support:
fuse-ext2 -o force /dev/disk2s2 /Volumes/mountpoint
After performing these steps, the ext2/ext3 drive will be fully accessible from the folder you created and specified to use as the mount point.
In addition to supporting locally attached drives, FUSE can be used to access remote systems and mount their shared resources locally. Granted, you can do this with SMB and AFP protocols when you have enabled File Sharing on a remote Mac, but since enabling SSH with the Remote Login service also enables SFTP access, you can use the SSHFS module for FUSE to access your Mac’s files directly over the encrypted SFTP connection.
1. Download and install the SSHFS module (available from the FUSE for OS X page).
2. As with managing Ext2 and Ext3 drives, create a folder on your Mac to use as a mount point
3. In Terminal, run a command similar to the following to access a folder on the remote system and mount it at the folder you created:
sshfs username@hostname:/remote/directory/path /local/mount/point
In this command,
/remote/directory/path is the path to the desired folder on the remote server that you have access to. (Alternatively, you can just use a forward slash to mount the root directory.) The
/local/mount/point is the full path on your current system to the new mount folder. For example, if you want to mount the entire root file system from the remote computer at a folder called “mount” in your home directory, then you would run a command similar to the following:
sshfs username@hostname:/ ~/mount
While these approaches with FUSE can be used to mount various file system formats, for the most part, you will not need special approaches for handling hard drives and other storage media. The built-in support in OS X is enough for most uses, but there are some special cases where the storage management options offered by FUSE can be useful.