Work
Projects- 3D Printing Projects
- Amateur Radio
- Automotive Projects
- Electronics Projects
- Homelab Projects
- Horticulture Projects
- Other Projects
- Project Projects
- Software Projects
- Tumblr (photography)
-
Work
ProjectsThis is an old revision of the document!
sudo dnf install --skip-broken 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) python3 python3-devel python3-setuptools python3-cffi libffi-devel git ncompress libcurl-devel python3-packaging dkms createrepo
git clone https://github.com/openzfs/zfs.git --branch zfs-2.3.0-rc1 --single-branch --depth=1
cd ./zfs
./autogen.sh
./configure
make rpm rpm-dkms
createrepo .
cat << EOF | sudo tee /etc/yum.repos.d/zfs-local.repo
[zfs-local]
name=ZFS on Linux for Fedora $releasever Local
baseurl=file:///path/to/git/zfs
enabled=1
EOF
sudo dnf upgrade –refresh zfs zfs-dkms
If you're trying to add a (generally older or SATA) SSD to a zpool, you may come across this error:
$ sudo zpool add tank log mirror ssd1 ssd2
cannot add to 'tank': adding devices with different physical sector sizes is not allowed
This is because the existing zpool was created with 4k sector drives, causing ZFS to detect and set ashift = 12 (2^ashift = 4096), and new devices being added to the zpool must have consistent physical sector sizes.
Below are some pre-checks that should be done before continuing to add the SSD(s), and how to override the newly detected inconsistent ashift value.
lsblk -do+LOG-SEC,PHY-SEC
sudo zpool add -o ashift=12 tank log mirror ssd1 ssd2
zpool list -v && zdb -C | grep "ashift\| name:"