Reading a ZFS USB drive with Mac OS X Mountain Lion

The problem:

I'm using a MacBook, mainly with Solaris 11 (yes it works), but something with Mac OS X (ML). The only missing thing is that Mac OS X can't read my external ZFS based USB drive, where I store all my data. So, I decided to look for a simple solution, where the whole and latest features of ZFS would be possible for free, and even being able later to benefit from any ZFS update that might be included in any Solaris 11 updates.

Possible solution:

I decided to use VirtualBox with a Solaris 11 VM as a passthrough to my data. Here are the required steps:

  • Install a Solaris 11 VM

    • Install VirtualBox on your Mac OS X, add the extension pack (needed for USB)
    • Plug your ZFS based USB drive on your Mac, ignore it when asked to initialize it.
    • Create a VM for Solaris (with a host-only adapter like vbox-net0). and before installing it, create a USB filter (in the settings of your Vbox VM, go to Ports, then USB, then add a new USB filter from the attached device "grey usb-connector logo with green plus sign") 
    • Install a Solaris 11 VM, boot it, and install the Guest addition
    • check with "ifconfg -a" the IP address of your Solaris VM, let say 192.168.56.101
  • Creating a path to your ZFS USB drive

    • In MacOS X, use the "Disk Utility" to unmount the USB attached drive, and unplug the USB device.
    • Switch back to VirtualBox, select the top of the window where your Solaris 11 is running
    • plug your ZFS USB drive, select "ignore" if Mac OS invite you to initialize the disk
    • In the VirtualBox VM menu, go to "Devices" then "USB Devices" and select from the dropping menu your "USB device"

  • Connection your Solaris VM to the USB drive

  • Inside Solaris, you might now check that your device is accessible by using the "format" cli command
  • If not, repeat previous steps
  • Now, with root privilege, force a zpool import -f myusbdevicepoolname because this pool was created on another system
  • check that you see your new pool with "zpool status"
  • share your pool with NFS: share -F NFS -o rw=192.168.56.1,root=192.168.56.1 /myusbdevicepoolname
  • here  192.168.56.1 is the vbox-net0 adapter IP adress, that your Mac OS will automatically have once the Solaris VM has booted, supposing that you kept the 192.168.56.0 netwpork for vbox-net0 (standard)


  • Accessing the USB ZFS drive from Mac OS X

  • This is the easiest step: access an NFS share from mac OS
  • Create a "ZFSdrive" folder on your MacOS desktop
  • from a terminal under mac OS: mount -t nfs IPaddressofMySolarisVM:/myusbdevicepoolname  /Users/yourusername/Desktop/ZFSdrive

    Benefits

et voila ! you might access your data, on a ZFS USB drive, directly from your Mountain Lion Desktop.

You can now, from inside the Solaris 11 VM:

Next steps

You might want now to reduce the memory footprint of your Solaris VM at the minimum: this can be done in various ways before reducing the memory allocated to the VMS: You will need to keep the running Solaris services at the minimum, disable Gnome, and much more ...

You might notice that Solaris and Mac OS X do not count in the same way Gigabyte (ZFS LIST showing 287GB of available disk space, while Mac OS X seeing 307.87 GB of available network space). But this is another story.

Comments:

Have you tried using something like "Zevo" (the community edition is free) to read ZFS drives from OS X? (http://www.getgreenbytes.com/zevo/)

I haven't tried using ZFS mounts with OS X - yet - but there were a number of projects spun from the brief flirtation that Apple had with Sun/ZFS five or six years ago. I'm curious if any of them might work in your situation.

Posted by Chad Thompson on September 27, 2012 at 04:23 PM CEST #

No, I haven't tried it yet.

I rather prefer to use, in an easier and supported way, Oracle SW (VBox) in order to benefit from the latest developments of ZFS, through Solaris 11 VBox image.

Posted by Karim on September 27, 2012 at 05:15 PM CEST #

Thanks for a informative post.

Any chance you know if its possible to access a FW/ internal partition in the same way as the USB stick from virtual box?

Also do you normally boot your mac straight into Solaris 11 using EFI boot?

Thanks
Geff

Posted by Geff F on September 27, 2012 at 09:42 PM CEST #

Regarding accessing an internal partition from Vbox through USB, as long as the Mac OS let the VBox guest take controle of the USB device, and the guest OS is able to recognize the partition type and access the file system, there is no reason it should not work.

For booting the Mac straight into Solaris 11, yes, I do have a dedicated disk with a whole Solaris partition. Solaris just boot.

Posted by Karim on September 28, 2012 at 12:15 AM CEST #

Thanks for this post.
But It panic Solaris guest with same stack as https://www.virtualbox.org/ticket/10535

Which versions are you using ?

I use: OS X 10.8.2, Virtual Box 4.2.0 r80737 with Solaris 11.0 (Oracle Solaris 11 SRU 11.4)

Posted by guest on October 08, 2012 at 09:23 PM CEST #

Hi,

I'm using without problems the following config:
Mac OS X 10.8.2
Virtual Box 4.2.0 r80737
Solaris 11 11/11 (no SRU).

Posted by Karim on October 09, 2012 at 11:54 AM CEST #

Post a Comment:
Comments are closed for this entry.
About

The views expressed on this blog are my own and do not necessary reflect the views of Oracle. English Fran├žais

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today