openzfs / zfs

OpenZFS on Linux and FreeBSD
https://openzfs.github.io/openzfs-docs
Other
10.42k stars 1.72k forks source link

cannot install on centos 8 graviton processor - aws machine #12463

Open mihai-satmarean opened 3 years ago

mihai-satmarean commented 3 years ago

System information

Type Version/Name
Distribution Name Centos
Distribution Version 8
Kernel Version 4.18.0-240.10.1.el8_3.aarch64
Architecture arm
OpenZFS Version latest

Describe the problem you're observing

trying to install result in
OpenZFS for EL8 - dkms 365 B/s | 243 B 00:00 Errors during downloading metadata for repository 'zfs':

Describe how to reproduce the problem

yum install https://zfsonlinux.org/epel/zfs-release.el8_3.noarch.rpm gpg --quiet --with-fingerprint /etc/pki/rpm-gpg/RPM-GPG-KEY-zfsonlinux yum install epel-release,kernel-devel zfs

Thanks a lot for making this great filesystem available!

ziggythehamster commented 2 years ago

Their official repo does not support aarch64, and it's hosted on S3, so you get 403 instead of 404.

Here's what you need to do:

  1. Install the dev packages listed in the docs plus rpm-build and creatrerepo
  2. Add a new file /etc/modules-load.d/zfs.conf which contains zfs
  3. Download the release .tar.gz file, extract with tar --no-same-permissions -xzvf zfs-x.y.z.tar.gz -C /usr/local/src, fix permissions with chown -R operator:root /usr/local/src/zfs-x.y.z so you can compile as an unprivileged user
  4. As an unprivileged user (I used operator above, change it if you want a different user), cd /usr/local/src/zfs-x.y.z && ./configure --with-spec=redhat && make -j1 rpm-utils rpm-kmod (assuming you want a kABI version of ZFS, which you probably do on CentOS)
  5. Re-restrict ownership with chown -R root:root /usr/local/src/zfs-x.y.z
  6. Create and fill a local Yum repo with cd /usr/local/src/zfs-x.y.z && mkdir -p /usr/local/share/zfs-yumrepo/RPMS && cp -v *.rpm /usr/local/share/zfs-yumrepo/RPMS && chmod -R 0755 /usr/local/share/zfs-yumrepo && chown -R root:root /usr/local/share/zfs-yumrepo && createrepo --workers 1 /usr/local/share/zfs-yumrepo
  7. Cleanup the build dir with cd /usr/local/src/zfs-x.y.z && make clean && rm -rf *.rpm *.tar.gz
  8. Install a new repo into /etc/yum.repos.d pointing at file:///usr/local/share/zfs-yumrepo
  9. yum update && yum install zfs zfs-dracut
  10. systemctl restart systemd-modules-load
  11. dracut --verbose --force --kver your_kernel_version_here to rebuild your initramfs
  12. Activate the systemd integration: mkdir /etc/zfs/zfs-list.cache && chown root:root /etc/zfs/zfs-list.cache && chmod 0755 /etc/zfs/zfs-list.cache && ln -s /usr/libexec/zfs/zed.d/history_event-zfs-list-cacher.sh /etc/zfs/zed.d/history_event-zfs-list-cacher.sh
  13. Create your pool(s)
  14. touch /etc/zfs-list.cache/your_pool_name - this will have zfs-mount-generator keep systemd up to date from now on; ZFS integrates into systemd like a native Linux filesystem

I've been running this in production for a long time (the above is actually done with some Chef recipes, so if I missed something, let me know), and it works very well.

I don't see a GitHub issue for officially having aarch64 packages built, and I'd love to see what it would take to have them build it for both architectures. Should this issue change to something like "RHEL-based distro repo should ship aarch64 packages"?

stale[bot] commented 1 year ago

This issue has been automatically marked as "stale" because it has not had any activity for a while. It will be closed in 90 days if no further activity occurs. Thank you for your contributions.

ianvernon commented 1 year ago

If anyone has any suggestions on how to get this working on Amazon Linux as well, would be appreciated. Followed the above steps but cannot get a yum repo which has python-packaging, which is needed to build ZFS. Will post / amend my comment if I find a way to do this.

EDIT: found a way to do this with the Linux 4.14 kernel, but not with 5.x with aarch64.

reqlez commented 1 year ago

I'm having the same issue. Except i'm on Oracle Linux 9 on their aarch64 processors.

@ziggythehamster thanks for the building instructions.

Had to download a bunch of stuff manually too, this is not the way... I really hope they add a repo for EL9-aarch64