Testing MacOS X read only ZFS capability
By user12611852 on Nov 06, 2007
When I first heard Jonathon Schwartz announce that MacOS 10.5 (aka Leopard) would include ZFS, I was psyched! As a Microsoft free user of Macs and Unix since the late 1980s, I was looking forward to seeing Sun's open source file system in MacOS and was convinced that its snapshot capability would be the basis of Time Machine, Apple's new backup facility. Imagine my disappointment when news trickled out that the first release of Leopard would only included a basic, read-only implementation of ZFS. What good is a read only file system?
Leopard shipped two weeks ago and ZFS is almost impossible to find by anyone but developers and OS nuts like me. It's completely invisible to the typical Mac user. Then I heard a different piece of news. Apple shipped 2 MILLION copies of Leopard in the first weekend! Once ZFS becomes a more prominent part of MacOS, they will be able to touch many more people than Sun ever could in our enterprise ready Solaris OS. I feel confident that Apple will continue to innovate on top of ZFS. And in typical Apple style, the end user (like my 82 year old mother who loves her Mac and has no idea that she's running Unix) may never know what ZFS is, but they will appreciate the benefits that they get. The same will no doubt be true in their implementation of Sun's Dtrace technology.
With that in mind, I set about to find a way to prove to myself that ZFS is in there and compatible with ZFS in Solaris 10. Here's what I did using my MacBook Pro, VMware Fusion 1.1RC1 beta and Solaris 10 08/07.
- Halt Solaris and shut down the VM
- VM > Settings > + > Add USB controller
- Boot Solaris
- Plug in the USB memory stick. (the VM must have focus)
- This was actually the most time consuming part of the whole exercise. It did not mount reliably)
- If you're lucky, mount shows: /rmdisk/noname on /vol/dev/dsk/c2t0d0/noname:c
- umount /rmdisk/noname
- zpool create usbpool /vol/dsk/noname
- zpool list
NAME SIZE USED AVAIL CAP HEALTH ALTROOT
usbpool 120M 88K 120M 0% ONLINE -
- zfs list
NAME USED AVAIL REFER MOUNTPOINT
usbpool 85K 87.9M 24.5K /usbpool
- zpool export usbpool
- Suspend the VM and quit Fusion to avoid confusion
- Re-insert the USB stick.
- Finder complains that the disk is not readable. Click Ignore
- Open a terminal on the Mac.
- sudo bash
- zpool import
status: The pool is formatted using an older on-disk version.
action: The pool can be imported using its name or numeric identifier, though
some features will not be available without an explicit 'zpool upgrade'.
- zpool import usbpool
- Mount shows:
- usbpool on /Volumes/usbpool (zfs, local, read-only)
- I was then able to view and copy files from the newly mounted pool
- Woooo Hoooo!
Why should you care?
ZFS is a truly easy to use, open source, endian independent, scalable, reliable file system. This is the first example of it being ported to a commercial, consumer oriented product.
Things to like about ZFS:
- Open source
- Multi-platform (Solaris, MacOS, BSD unix, Sparc, X86, PowerPC)
- Freely included in Solaris 10 (download now)
- Easy to use
- Built in data integrity
- Linux Torvalds likes it.
- Scalable 128 bit file system