From owner-freebsd-fs@FreeBSD.ORG Thu Nov 16 01:59:26 2006 Return-Path: X-Original-To: freebsd-fs@FreeBSD.org Delivered-To: freebsd-fs@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 45D9316A412; Thu, 16 Nov 2006 01:59:26 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (arm132.internetdsl.tpnet.pl [83.17.198.132]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9DC6843D4C; Thu, 16 Nov 2006 01:59:24 +0000 (GMT) (envelope-from pjd@garage.freebsd.pl) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id DA30748800; Thu, 16 Nov 2006 02:59:23 +0100 (CET) Received: from localhost (djy66.neoplus.adsl.tpnet.pl [83.24.2.66]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 3A10045684; Thu, 16 Nov 2006 02:59:17 +0100 (CET) Date: Thu, 16 Nov 2006 02:59:08 +0100 From: Pawel Jakub Dawidek To: freebsd-fs@FreeBSD.org Message-ID: <20061116015908.GB63195@garage.freebsd.pl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="aM3YZ0Iwxop3KEKx" Content-Disposition: inline X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 7.0-CURRENT i386 User-Agent: mutt-ng/devel-r804 (FreeBSD) X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=BAYES_00,RCVD_IN_NJABL_DUL autolearn=no version=3.0.4 Cc: freebsd-current@FreeBSD.org Subject: ZFS patches for FreeBSD. X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-fs@FreeBSD.org List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Nov 2006 01:59:26 -0000 --aM3YZ0Iwxop3KEKx Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi. 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 http://people.freebsd.org/~pjd/patches/zfs_20061117.patch.bz2 # 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 After reboot: # kldload zfs.ko # zfs import 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 freebsd-fs@FreeBSD.org 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 source! --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --aM3YZ0Iwxop3KEKx Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.4 (FreeBSD) iD8DBQFFW8XsForvXbEpPzQRAopsAKCxij/eju0khuMs7X9QQyXlM8ZunwCdG59o GSciI9I5WqSCoCavql2RGAk= =3p1N -----END PGP SIGNATURE----- --aM3YZ0Iwxop3KEKx--