Skip to content

Commit 8ea26eb

Browse files
authored
Merge branch 'openzfs:master' into update-repo
2 parents d85b16c + d721f84 commit 8ea26eb

29 files changed

Lines changed: 1681 additions & 130 deletions

.github/workflows/publish.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 0
1719
- name: Prepare
1820
run: |
1921
sudo apt-get update -y
@@ -24,9 +26,7 @@ jobs:
2426
- name: Gen_feature_matrix
2527
run: make feature_matrix
2628
- name: Gen_sphinx
27-
uses: ammaraskar/sphinx-action@master
28-
with:
29-
docs-folder: "docs/"
29+
run: make html
3030
- name: Deploy
3131
uses: peaceiris/actions-gh-pages@v3
3232
with:

.github/workflows/pull_request.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ jobs:
77
runs-on: ubuntu-latest
88
steps:
99
- uses: actions/checkout@v4
10+
with:
11+
fetch-depth: 0
1012
- name: Prepare
1113
run: |
1214
sudo apt-get update -y
@@ -17,9 +19,7 @@ jobs:
1719
- name: Gen_feature_matrix
1820
run: make feature_matrix
1921
- name: Gen_sphinx
20-
uses: ammaraskar/sphinx-action@master
21-
with:
22-
docs-folder: "docs/"
22+
run: make html
2323
- uses: actions/upload-artifact@v4
2424
with:
2525
name: DocumentationHTML

.readthedocs.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Read the Docs configuration file for Sphinx projects
2+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
3+
4+
# Required
5+
version: 2
6+
7+
# Set the OS, Python version and other tools we might need
8+
build:
9+
os: ubuntu-24.04
10+
tools:
11+
python: "3.12"
12+
13+
# Build documentation in the "docs/" directory with Sphinx
14+
sphinx:
15+
configuration: docs/conf.py
16+
# Fail on all warnings to avoid broken references
17+
# fail_on_warning: true
18+
19+
# Optionally build docs in additional formats such as PDF and ePub
20+
# formats:
21+
# - pdf
22+
# - epub
23+
24+
# Optional but recommended, declare the Python requirements needed
25+
# to build the documentation
26+
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
27+
python:
28+
install:
29+
- requirements: docs/requirements.txt

README.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ The dependencies are available via pip::
2525
# Add ~/.local/bin to your $PATH, e.g. by adding this to ~/.bashrc:
2626
PATH=$HOME/.local/bin:$PATH
2727

28+
Or, you can use tox::
29+
30+
tox -e develop
31+
. .tox/develop/bin/activate
32+
2833
Build
2934
~~~~~
3035

docs/404.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,14 @@
44
===================
55

66
Please use left menu or search to find interested page.
7+
8+
.. raw:: html
9+
10+
<script>
11+
12+
.. raw:: html
13+
:file: ./_static/js/redirect.js
14+
15+
.. raw:: html
16+
17+
</script>

docs/Basic Concepts/Checksums.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ The checksum algorithm for a dataset can be changed by setting the
4545
| | | | deduped |
4646
| | | | datasets |
4747
+-----------+--------------+------------------------+-------------------------+
48-
| off | no | yes | Do not do use |
48+
| off | no | yes | Do not use |
4949
| | | | ``off`` |
5050
+-----------+--------------+------------------------+-------------------------+
5151
| fletcher2 | no | yes | Deprecated |

docs/Basic Concepts/RAIDZ.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
RAIDZ
22
=====
33

4-
tl;dr: RAIDZ is effective for large block sizes and sequential workloads.
5-
64
Introduction
75
~~~~~~~~~~~~
86

docs/Basic Concepts/VDEVs.rst

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
VDEVs
2+
=====
3+
4+
What is a VDEV?
5+
~~~~~~~~~~~~~~~
6+
7+
A vdev (virtual device) is a fundamental building block of ZFS storage pools. It represents a logical grouping of physical storage devices, such as hard drives, SSDs, or partitions.
8+
9+
What is a leaf vdev?
10+
~~~~~~~~~~~~~~~~~~~~
11+
12+
A leaf vdev is the most basic type of vdev, which directly corresponds to a physical storage device. It is the endpoint of the storage hierarchy in ZFS.
13+
14+
What is a top-level vdev?
15+
~~~~~~~~~~~~~~~~~~~~~~~~~
16+
17+
Top-level vdevs are the direct children of the root vdev. They can be single devices or logical groups that aggregate multiple leaf vdevs (like mirrors or RAIDZ groups). ZFS dynamically stripes data across all top-level vdevs in a pool.
18+
19+
What is a root vdev?
20+
~~~~~~~~~~~~~~~~~~~~
21+
22+
The root vdev is the top of the pool hierarchy. It aggregates all top-level vdevs into a single logical storage unit (the pool).
23+
24+
What are the different types of vdevs?
25+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
26+
27+
OpenZFS supports several types of vdevs. Top-level vdevs carry data and provide redundancy:
28+
29+
* **Striped Disk(s)**: A vdev consisting of one or more physical devices striped together (like RAID 0). It provides no redundancy and will lead to data loss if a drive fails.
30+
* **Mirror**: A vdev that stores the same data on two or more drives for redundancy.
31+
* `RAIDZ <./RAIDZ.html>`__: A vdev that uses parity to provide fault tolerance, similar to traditional RAID 5/6. There are three levels of RAIDZ:
32+
33+
* **RAIDZ1**: Single parity, similar to RAID 5. Requires at least 2 disks (3+ recommended), can tolerate one drive failure.
34+
* **RAIDZ2**: Double parity, similar to RAID 6. Requires at least 3 disks (5+ recommended), can tolerate two drive failures.
35+
* **RAIDZ3**: Triple parity. Requires at least 4 disks (7+ recommended), can tolerate three drive failures.
36+
37+
* `dRAID <./dRAID%20Howto.html>`__: Distributed RAID. A vdev that provides distributed parity and hot spares across multiple drives, allowing for much faster rebuild performance after a failure.
38+
39+
Auxiliary vdevs provide specific functionality:
40+
41+
* **Spare**: A drive that acts as a hot spare, automatically replacing a failed drive in another vdev.
42+
* **Cache (L2ARC)**: A Level 2 ARC vdev used for caching frequently accessed data to improve random read performance.
43+
* **Log (SLOG)**: A separate log vdev (SLOG) used to store the ZFS Intent Log (ZIL) for improved synchronous write performance.
44+
* **Special**: A vdev dedicated to storing metadata, and optionally small file blocks and the Dedup Table (DDT).
45+
* **Dedup**: A vdev dedicated strictly to storing the Deduplication Table (DDT).
46+
47+
How do vdevs relate to storage pools?
48+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
49+
50+
Vdevs are the building blocks of ZFS storage pools. A storage pool (zpool) is created by combining one or more top-level vdevs. The overall performance, capacity, and redundancy of the storage pool depend on the configuration and types of vdevs used.
51+
52+
Here is an example layout as seen in `zpool-status(8) <https://openzfs.github.io/openzfs-docs/man/master/8/zpool-status.8.html>`_ output
53+
for a pool with two RAIDZ1 top-level vdevs and 10 leaf vdevs:
54+
55+
::
56+
57+
datapoolname (root vdev)
58+
raidz1-0 (top-level vdev)
59+
/dev/dsk/disk0 (leaf vdev)
60+
/dev/dsk/disk1 (leaf vdev)
61+
/dev/dsk/disk2 (leaf vdev)
62+
/dev/dsk/disk3 (leaf vdev)
63+
/dev/dsk/disk4 (leaf vdev)
64+
raidz1-1 (top-level vdev)
65+
/dev/dsk/disk5 (leaf vdev)
66+
/dev/dsk/disk6 (leaf vdev)
67+
/dev/dsk/disk7 (leaf vdev)
68+
/dev/dsk/disk8 (leaf vdev)
69+
/dev/dsk/disk9 (leaf vdev)
70+
71+
How does ZFS handle vdev failures?
72+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
73+
74+
ZFS is designed to handle vdev failures gracefully. If a vdev fails, ZFS can continue to operate using the remaining vdevs in the pool,
75+
provided that the redundancy level of the pool allows for it (e.g., in a mirror, RAIDZ, or dRAID configuration).
76+
When there is still enough redundancy in the pool, ZFS will mark the failed vdev as "faulted" and will recover data from the remaining vdevs.
77+
Administrators can `zpool-replace(8) <https://openzfs.github.io/openzfs-docs/man/master/8/zpool-replace.8.html>`_ failed vdev with a new one and ZFS will automatically resilver (rebuild)
78+
the data onto the new vdev to return the pool to a healthy state.
79+
80+
How do I manage vdevs in ZFS?
81+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
82+
83+
Vdevs are managed using the `zpool(8) <https://openzfs.github.io/openzfs-docs/man/master/8/zpool.8.html>`_ command-line utility. Common operations include:
84+
85+
* **Creating a pool**: `zpool create` allows you to specify the vdev layout. See `zpool-create(8) <https://openzfs.github.io/openzfs-docs/man/master/8/zpool-create.8.html>`_.
86+
* **Adding vdevs**: `zpool add` attaches new top-level vdevs to an existing pool, expanding its capacity and performance (by increasing stripe width). See `zpool-add(8) <https://openzfs.github.io/openzfs-docs/man/master/8/zpool-add.8.html>`_.
87+
* **Removing vdevs**: `zpool remove` can remove certain types of top-level vdevs evacuating their data to other vdevs. See `zpool-remove(8) <https://openzfs.github.io/openzfs-docs/man/master/8/zpool-remove.8.html>`_.
88+
* **Replacing drives**: `zpool replace` swaps a failed or small drive with a new one. See `zpool-replace(8) <https://openzfs.github.io/openzfs-docs/man/master/8/zpool-replace.8.html>`_.
89+
* **Monitoring status**: `zpool status` shows the health and layout of all vdevs. See `zpool-status(8) <https://openzfs.github.io/openzfs-docs/man/master/8/zpool-status.8.html>`_.
90+
* **Monitoring performance**: `zpool iostat` displays I/O statistics for the pool and individual vdevs. See `zpool-iostat(8) <https://openzfs.github.io/openzfs-docs/man/master/8/zpool-iostat.8.html>`_.

docs/Developer Resources/Building ZFS.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ additional utilities must be installed.
211211
There are a few helper scripts provided in the top-level scripts
212212
directory designed to aid developers working with in-tree builds.
213213

214-
- **zfs-helper.sh:** Certain functionality (i.e. /dev/zvol/) depends on
214+
- **zfs-helpers.sh:** Certain functionality (i.e. /dev/zvol/) depends on
215215
the ZFS provided udev helper scripts being installed on the system.
216216
This script can be used to create symlinks on the system from the
217217
installation location to the in-tree helper. These links must be in

docs/Developer Resources/Custom Packages.rst

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,11 @@ your needs are.
3636
and may be used with Enterprise Linux distributions like Red Hat and
3737
CentOS. These distributions provide a stable kABI (Kernel Application
3838
Binary Interface) which allows the same binary modules to be used
39-
with new versions of the distribution provided kernel.
39+
with new versions of the distribution provided kernel. Note that these
40+
packges do not quite follow Redhat's rules, so there is a slight possibility
41+
that a new kernel could fail with one of these packages. The probability
42+
is low, but we recommend that for production servers, you disable
43+
automatic kernel updates when using one of these builds.
4044

4145
By default the build system will generate user packages and both DKMS
4246
and kmod style kernel packages if possible. The user packages can be
@@ -70,7 +74,7 @@ ZFS 2.1 release:
7074
sudo yum install epel-release gcc make autoconf automake libtool rpm-build libtirpc-devel libblkid-devel libuuid-devel libudev-devel openssl-devel zlib-devel libaio-devel libattr-devel elfutils-libelf-devel kernel-devel-$(uname -r) python python2-devel python-setuptools python-cffi libffi-devel ncompress
7175
sudo yum install --enablerepo=epel dkms python-packaging
7276
73-
**NOTE:** RHEL/CentOS 7 is end of life. Use yum instead of dnf for install instructions below.
77+
**NOTE:** RHEL/CentOS 7 is end of life. Use dnf instead of yum for install instructions below.
7478

7579
- **RHEL/CentOS 8**:
7680

@@ -118,7 +122,7 @@ Linux kernel must be specified. At configure time the build system will
118122
make an educated guess as to which kernel you want to build against.
119123
However, if configure is unable to locate your kernel development
120124
headers, or you want to build against a different kernel, you must
121-
specify the exact path with the *--with-linux* and *--with-linux-obj*
125+
specify the exact path with the ``--with-linux`` and ``--with-linux-obj``
122126
options.
123127

124128
.. code:: sh
@@ -142,9 +146,14 @@ kABI-tracking kmod
142146
The process for building kABI-tracking kmods is almost identical to for
143147
building normal kmods. However, it will only produce binaries which can
144148
be used by multiple kernels if the distribution supports a stable kABI.
145-
In order to request kABI-tracking package the *--with-spec=redhat*
149+
In order to request kABI-tracking package the ``--with-spec=redhat``
146150
option must be passed to configure.
147151

152+
Be aware that these packages do not completely follow Redhat's rules, so
153+
there is a slight chance that they will not work with a new kernel.
154+
We recommend disabling automatic kernel updates when using these builds
155+
on a production server.
156+
148157
**NOTE:** This type of package is not available for Fedora.
149158

150159
.. code:: sh
@@ -212,7 +221,7 @@ Make sure that the required packages are installed:
212221

213222
.. code:: sh
214223
215-
sudo apt install build-essential autoconf automake libtool gawk alien fakeroot dkms libblkid-dev uuid-dev libudev-dev libssl-dev zlib1g-dev libaio-dev libattr1-dev libelf-dev linux-headers-generic python3 python3-dev python3-setuptools python3-cffi libffi-dev python3-packaging debhelper-compat dh-python po-debconf python3-all-dev python3-sphinx libpam0g-dev
224+
sudo apt install alien autoconf automake build-essential debhelper-compat dh-dkms dh-python dkms fakeroot gawk libaio-dev libattr1-dev libblkid-dev libcurl4-openssl-dev libelf-dev libffi-dev libpam0g-dev libssl-dev libtirpc-dev libtool libudev-dev linux-headers-generic po-debconf python3 python3-all-dev python3-cffi python3-dev python3-packaging python3-setuptools python3-sphinx uuid-dev zlib1g-dev
216225
217226
`Get the source code <#get-the-source-code>`__.
218227

@@ -226,7 +235,7 @@ Linux kernel must be specified. At configure time the build system will
226235
make an educated guess as to which kernel you want to build against.
227236
However, if configure is unable to locate your kernel development
228237
headers, or you want to build against a different kernel, you must
229-
specify the exact path with the *--with-linux* and *--with-linux-obj*
238+
specify the exact path with the ``--with-linux`` and ``--with-linux-obj``
230239
options.
231240

232241
To build RPM converted Debian packages:

0 commit comments

Comments
 (0)