Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Nov 2006 02:59:08 +0100
From:      Pawel Jakub Dawidek <>
Subject:   ZFS patches for FreeBSD.
Message-ID:  <>

next in thread | raw e-mail | index | archive | help

Content-Type: text/plain; charset=iso-8859-2
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable


This is a first set of patches, which allows to use ZFS file system from
OpenSolaris on FreeBSD.

To apply the patch you need to have recent FreeBSD source (be sure you
have rev. 1.284 of src/sys/kern/kern_synch.c).

To try it out you need i386 machine (this is what I tested) and kernel
without WITNESS compiled in (there are probably some warnings still).

Currently it can only be compiled as a kernel module.

To apply the patch you need the following steps:

	# cd /usr/src
	# mkdir -p cddl/lib/lib{avl,nvpair,umem,uutil,zfs,zpool}
	# mkdir -p cddl/usr.bin/ztest
	# mkdir -p cddl/usr.sbin/{zdb,zfs,zpool}
	# mkdir -p compat/opensolaris/{include,misc}
	# mkdir -p contrib/opensolaris/cmd/{zdb,zfs,zpool,ztest}
	# mkdir -p contrib/opensolaris/common/{acl,avl,nvpair,zfs}
	# mkdir -p contrib/opensolaris/head
	# mkdir -p contrib/opensolaris/lib/libnvpair
	# mkdir -p contrib/opensolaris/lib/lib{uutil,zfs}/common
	# mkdir -p contrib/opensolaris/lib/libzpool/common/sys
	# mkdir -p sys/compat/opensolaris/{kern,machine,rpc,sys}
	# mkdir -p sys/contrib/opensolaris/uts/common/fs/zfs/sys
	# mkdir -p sys/contrib/opensolaris/uts/common/{os,rpc}
	# mkdir -p sys/contrib/opensolaris/uts/common/sys/fm/fs
	# mkdir -p sys/contrib/opensolaris/uts/common/sys/fs
	# mkdir -p sys/modules/zfs
	# fetch
	# bzip2 -d zfs_20061117.patch.bz2
	# patch < zfs_20061117.patch
	# make buildworld
	# make kernel
	# make installworld
	# kldload zfs.ko
	(zfs and zpool command should work now)

	Before reboot:
	# zfs export <your_pool>

	After reboot:
	# kldload zfs.ko
	# zfs import <your_pool>

	After a panic:
	# kldload zfs.ko
	# zfs mount -a
	# zfs volinit

Most of the functionality should work, but there are exceptions.

zfs share/unshare don't work yet, you also won't be able to export ZFS
files systems via NFS.

ACLs don't work yet.

The ZFS file system is MPSAFE (it operates without the Giant lock), but
performance isn't quite there yet. Please do not report that it is
slower than UFS, etc. I know it is. On the other hand you should report
if there are some huge differences in performance between UFS and ZFS,
for example if ZFS is few times slower in some workloads.

Under very heavy load (or maybe even under not that heavy load, but
after a longer time) it may panic with
"kmem_malloc(X): kmem_map too small: Y total allocated"
message. The back-presure mechanism doesn't work well and SUN guys are
helping me to figure out why. If you see such panic, please do not
report it, just reboot your machine and continue (or not).

Please do report any other strange panics or situations (like various
commands not working as they should, you see strange file system
behaviour, etc.), _but_ before reporting any issue, verify that it
wasn't already reported on mailing list.

If you have any questions or comments, I'd prefer if you send them to
the mailing list instead of me privately, as it's quite possible others
would like to know too.

Good luck and enjoy!

Big thanks to ZFS developers for great work and to SUN for opening ZFS

Pawel Jakub Dawidek                              
FreeBSD committer                         Am I Evil? Yes, I Am!

Content-Type: application/pgp-signature
Content-Disposition: inline

Version: GnuPG v1.4.4 (FreeBSD)



Want to link to this message? Use this URL: <>