Вести с полей

From
Slawa Olhovchenkov (2:5030/500)
To
All
Date
2006-11-20T13:41:42Z
Area
RU.UNIX.BSD
Hello All!

20 Nov 06, Slawa Olhovchenkov writes to All:

 SO> Porting ZFS to FreeBSD

 SO>    URL:
 SO>    http://perforce.freebsd.org/depotTreeBrowser.cgi?FSPC=//depot/user/pjd
 SO>    /zfs
 SO>    URL: http://www.opensolaris.org/os/community/zfs/porting/
 SO>    URL: http://docs.freebsd.org/cgi/mid.cgi?20060822104516.GB16033

 SO>    Contact: Pawel Jakub Dawidek <pjd@FreeBSD.org>

 SO>    My work is moving slowly forward. ZVOL is, I believe, fully functional
 SO>    (I recently fixed snapshots and clones on zvols), which means you can
 SO>    put UFS on top of RAID-Z volume, take a snapshot of the volume, clone
 SO>    it if needed, etc. Very cool. The hardest part is the ZPL layer, I'm
 SO>    still working on it. Most file system methods work, but probably need
 SO>    detailed review and many fixes. Most of the time these days I'm
 SO>    spending on implementing mmap(2) correctly. It works more or less in
 SO>    simple tests but fails under fsx program. On the other hand, 'fsx -RW'
 SO>    works very stable and reliable. Other test programs (those that don't
 SO>    use mmap(2)) also work quite well. There is still a lot of work to do,
 SO>    mostly in ZPL area, many clean-ups, etc. Some functionality (like
 SO>    ACLs) I haven't even tried to touch yet.

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 <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 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!


... Специалист подобен флюсу: полнота его одностороння.
--- GoldED+/BSD 1.1.5
 * Origin:  (2:5030/500)
SEEN-BY: 50/12 203 400/814 450/186 1024 451/30 550/196 4614/20 4635/4
SEEN-BY: 5000/5000 5011/13 5012/46 5015/28 5019/31 5020/154 175 400 545 549
SEEN-BY: 5020/758 1523 1604 1630 2142 2238 2395 2450 2590 2871 4441 5021/3 29
SEEN-BY: 5022/128 5025/3 750 5027/12 5029/32 5030/49 500 556 966 1063 1080
SEEN-BY: 5030/1900 1957 2828 5031/47 70 5035/38 5040/47 5042/13 5045/7 5049/50
SEEN-BY: 5049/97 5054/1 4 8 9 11 28 35 36 37 45 63 66 67 70 75 84 85 5055/95
SEEN-BY: 5059/9 37 5062/1 10 5063/3 5064/7 5076/1 5077/70 5080/80 1003 5082/6
SEEN-BY: 5083/21 5084/9 5085/13 5090/108 5094/4 5095/20 5096/18 5099/11
SEEN-BY: 6001/10
PATH: 5030/500 5020/4441 545 5054/1 37