Annotation of wikisrc/users/haad/porting_zfs.mdwn, revision 1.14

1.1       wiki        1: # 1. Status of NetBSD zfs port
                      2:  
                      3: NetBSD zfs port is work in progress and can easily panic your system.
1.2       wiki        4: 
1.9       wiki        5: **ZFS currently works ony on i386 and amd64!!**
1.2       wiki        6: 
1.1       wiki        7: ---
                      8: # 2. Using NetBSD ZFS port 
                      9: 
1.12      wiki       10: ## Installation 
1.1       wiki       11: 
1.2       wiki       12: Use any -current build from i386 or amd64 architecture. All tools and modules should be built by default, now. There are 2 modules used for ZFS solaris.kmod and zfs.kmod. Solaris module provides solaris like interfaces to zfs on NetBSD. The second module is zfs and provides zfs file system functions.
1.1       wiki       13: 
                     14: ## Configuration
                     15: 
1.2       wiki       16: User need to
                     17: 
1.5       wiki       18:     modload solaris
                     19:     modload zfs
1.2       wiki       20: 
                     21: After loading modules user can create zpool(zfs version of volume manager) and manage zfs file systems on it. 
                     22: 
1.5       wiki       23:     zpool create {zpool name} {type} {device} 
1.2       wiki       24: 
1.3       wiki       25: where type is:
                     26: 
                     27: * mirror
                     28: * raidz
                     29: * raidz2
                     30: * default is normal linear allocation
1.2       wiki       31: 
1.12      wiki       32: device is blod device on NetBSD /dev/sd0a for example.
1.2       wiki       33: 
1.5       wiki       34:     zpool create tank mirror /dev/sd0a /dev/sd1a  creates mirrored zpool between 2 disk partitions.
1.2       wiki       35: 
1.3       wiki       36: With zpool created we can create zfs filesystems or zvols(zfs logical volume disks)
                     37: 
1.5       wiki       38:     zfs create -V {size} tank/{zvol name} creates zvol with {zvol name} from ZPOOL called tank
1.3       wiki       39: 
                     40: Logical disk is created in 
                     41: 
1.5       wiki       42:     /dev/zvol/rdsk/{zpool name}/{zvol name} 
1.4       wiki       43: 
1.5       wiki       44:     /dev/zvol/dsk/{zpool name}/{zvol name}
1.3       wiki       45: 
1.5       wiki       46:     zfs create tank/{zfs name} create zfs filesystem on a zpool called tank 
1.2       wiki       47: 
1.1       wiki       48: ## Administration
                     49: 
1.4       wiki       50: After creating ZVOLS and filesystem they are saved in a /etc/zfs/zpool.cache file and loaded after nextzfs module load.
                     51: 
1.1       wiki       52: ---
                     53: # 3. Known Bugs
                     54: 
                     55: ## Show stoppers 
                     56: 
                     57: ### amd64
1.8       wiki       58: 
1.1       wiki       59: ### i386 
                     60: 
                     61: ### Both 
                     62: * vnode reclaiming deadlocks 
1.10      wiki       63: 
                     64: Current code is quite a hack but it works until I will find some time to rework vnode reclaiming on NetBSD.
                     65: 
                     66: http://nxr.netbsd.org/xref/src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c#4254
1.1       wiki       67:  
1.4       wiki       68: * vnode fsync bug 
                     69:   
                     70:   I think that we are hitting this bug, too. I have some patches in the tree which fixes deadlod in vnode reclaim but after that I'm getting another deadlock in VOP_FSYNC.
1.1       wiki       71: 
1.11      wiki       72: * kmem_cache_alloc/ aka pool_cache_get panicsdue to KM_NOSLEEP flag
1.14    ! wiki       73:  There are some problems in the NetBSD UVM subsytem when KM_NOSLEEP allocation can fail even if system has enough memory to use. I talked with ad@ about it and he said that there is one problem in uvm where some lock is held, KM_NOSLEEP allocation will fail.
1.11      wiki       74: 
1.1       wiki       75: ## Functional bugs 
                     76: * Snapshots
                     77: * Permissions
                     78: * Old code, we should update NetBSD zfs port to new code
1.7       wiki       79: * More tasks can be found at <http://nxr.netbsd.org/xref/src/external/cddl/osnet/TODO>
1.6       wiki       80: 
                     81: # External Documentation links
1.7       wiki       82: Nice zfs howto written for zfs + mac os x <http://code.google.com/p/maczfs/wiki/GettingStarted>

CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb