Posts Tagged ‘filesystem’

ZFS retardness

July 13, 2010

Normally I have nothing but praise for ZFS. But today is not one of these days.

This is one of the days that I am left puzzled at the design requirement that introduce a hard dependency between the filesystem and the host it runs at. If nothing else for a filesystem that boasts at how easy it is to move data even between boxes with different endianess it’s embarassingly easy to break the zpool status command. Here is how it normally works:

# hostid
# zpool status
pool: rpool
state: ONLINE
scrub: none requested

rpool ONLINE 0 0 0
c0d0s0 ONLINE 0 0 0

errors: No known data errors

And now for some fun let’s fake the hostid(1) output and try this again:

# /etc/init.d/hostid start
# hostid
# zpool status
pool: rpool
state: ONLINE
Assertion failed: reason == ZPOOL_STATUS_OK, file zpool_main.c, line 3182
Abort (core dumped)

Thankfully the hostname in the zdb(1M) output:

# zdb -l /dev/dsk/c0d0s0 | grep hostname

is there for strictly informational reasons and gets updated in case you decide to change it.