Thursday, March 4, 2010

ZFS endian neutrality

One of the draws of ZFS is that a disk can be created on one machine architecture (say Intel) and used on another like Sparc. One has to be careful for this to work however.

The disk must also have an endian neutral partitioning scheme like EFI. If you use another partitioning scheme like Solaris VTOC, ZFS will work just fine on a single architecture but fail when taken to a different endian machine.

On Solaris, the fix was to run format with the -e (expert) field. -e enables both using EFI formats as well as removeable devices like a USB flash drive. See the OpenSolaris Bible (Ch. 7 and 8) and the System Administration Guide: Devices and File Systems.

Another gotcha is that some machines can't boot from an EFI formatted drive so that can complicate moving root disks between architectures.