--- wikisrc/zfs.mdwn 2020/03/02 00:16:06 1.13 +++ wikisrc/zfs.mdwn 2020/03/02 00:41:17 1.14 @@ -15,6 +15,7 @@ See the man pages for zfs(8) and zpool(8 - [Oracle ZFS Administration Manual](https://docs.oracle.com/cd/E26505_01/html/E37384/index.html) - [FreeBSD Handbook ZFS Chapter](https://www.freebsd.org/doc/handbook/zfs.html) + - [OpenZFS admin docs index page](https://github.com/openzfs/zfs/wiki/Admin-Documentation) # Status of ZFS in NetBSD @@ -32,6 +33,8 @@ Currently, there are multiple ZFS projec OpenZFS is a coordinating project to align open ZFS codebases. There is a notion of a shared core codebase and OS-specific adaptation code. +See [FreeBSD's history](https://wiki.freebsd.org/ZFSTuningGuide) + ## NetBSD code history \todo This section really needs help. @@ -72,9 +75,7 @@ The ZFS code in current is very similar There is initial support for [[ZFS root|wiki/RootOnZFS]], via booting from ffs and pivoting. -One can make a ccd using a zvol as a component. This allows reading a -GPT label from the zvol, which is useful in case the zvol had been -exported via iscsi and some other system created a label. +One can make a ccd using a zvol as a component. See the zvol section below. ## things that aren't supported yet @@ -100,6 +101,15 @@ and report.) The main configuration is to put zfs=YES in rc.conf, so that the rc.d scripts bring up ZFS and mount ZFS file systems. +## pool locations + +One can add disks or parts of disks into pools. Methods of specifying +areas to be included include: + + - entire disks (e.g., /dev/rwd0d on amd64) + - disklabel partitions (e.g., /dev/sd0e) + - wedges (e.g., /dev/dk0) + ## legacy vs ? mount points \todo Explain, if this is NetBSD specific. Explain consequences, as @@ -115,6 +125,25 @@ NFS. A workaround is to use noauto and NetBSD current after 20200301 mounts ZFS first. \todo Explain consequences. +## zvol + +Within a ZFS pool, the standard approach is to have file systems, but +one can also create a zvol, which is a block device of a certain size. + +\todo The zvol will appear as /dev/???? and can be used in many +respects like a slice. However, the system will not read disklabels +and gpt labels from a zvol; in this respect it is more like a disklabel +partition or wedge than a disk drive. + +\todo Explain that one can export a zvol via iscsi. + +\todo Explain if one can swap on a zvol. + +\todo Explain that one can use ccd to create a normal-looking disk +from a zvol. This allows reading a GPT label from the zvol, which is +useful in case the zvol had been exported via iscsi and some other +system created a label. + ## TRIM There is some notion of TRIM and zfs using it. @@ -152,4 +181,17 @@ should do instead. \todo Explain pool version and feature flags relationship to FreeBSD, Linux, OpenIndiana/Illumos/?, and ? +# Quick Start + +See the [FreeBSD Quickstart +Guide](https://www.freebsd.org/doc/handbook/zfs-quickstart.html); only +the first item is NetBSD specific. + + - Put zfs=YES in rc.conf. + + - Create a pool as "zpool create pool1 /dev/dk0". + + - df and see /pool1 + + - Really, read the FreeBSD docs and the