Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add ZFS toolings #197

Merged
merged 1 commit into from
Aug 21, 2023
Merged

Conversation

donch
Copy link
Contributor

@donch donch commented Aug 11, 2023

  • Add ZFS tools.
  • Add a service to automatically import ZFS pools on startup.

This extensions was built and tested on Talos 1.5.0
We have sucessfully tested it on Kubernetes with OpenEBS
The zpool-import-wrapper service works well, and ZFS pools are automatically imported on startup

If you want to test it and create a ZFS pool, you can use a node-shell with the host filesystem mounted on /host,
Then within the node-shell :

mount -o bind /host/dev /dev
mount -o bind /host/usr/local/sbin /usr/local/sbin

You will be able to create a ZFS pool:

zpool create zfs-pool /dev/sdX

Let me know if you need further informations.
Thanks

@donch donch force-pushed the feat/zfs-tools-ext branch 2 times, most recently from 0ad5b41 to f5c9196 Compare August 11, 2023 16:03
@JJGadgets
Copy link

+1, lack of ZFS tools on host is also blocking https://github.com/democratic-csi/democratic-csi's zfs-local modes from working.

democratic-csi uses chroot for the ZFS tools expecting them to be available on the host, to offload the burden of maintaining tools' version sync with the kernel module to the host who should already manage the kernel module versioning.

@travisghansen
Copy link

Not a lot of experience with talos but author democratic-csi and get questions about this a bit. For the startup procedure should any further tooling be included to support or work with native zfs encryption?

@frezbo frezbo force-pushed the feat/zfs-tools-ext branch 2 times, most recently from 340b754 to 40c0600 Compare August 17, 2023 16:02
@frezbo
Copy link
Member

frezbo commented Aug 17, 2023

/ok-to-test

storage/zfs/zfs-tools/pkg.yaml Outdated Show resolved Hide resolved
- rshared
- rbind
- rw
# ld-musl-x86_64.so.1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for my understanding, if the extension anyway execs in pid 1 mount namespace, why do we need all the mounts?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ahh good point, I'll drop those and test

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ahh it still needs those:

10.5.0.3: 2023/08/21 12:13:28 zpool-importer: reexec failed: gons/reexec: ReexecAction.Run: child failed with stderr message "err: exit status 1, /dev/zfs and /proc/self/mounts are required.\nTry running 'udevadm trigger' and 'mount -t proc proc /proc' as root.\n"

I think i starts from the parent and targets the mount of pid 1

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmmm... I'm not sure I understand this...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay /dev is not needed, the other mounts are shared libraries, from the looks of it it seems the shared libs are needed in the parent mount namespace

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

got it, thanks for checking!

Add ZFS user tools to manage ZFS pools.
Add zpool-importer service which automatically mount ZFS pools on startup.

Signed-off-by: David Donchez <david.donchez@enix.fr>
Signed-off-by: Noel Georgi <git@frezbo.dev>
@frezbo
Copy link
Member

frezbo commented Aug 21, 2023

/m

@talos-bot talos-bot merged commit d369468 into siderolabs:main Aug 21, 2023
12 of 13 checks passed
@bernardgut bernardgut mentioned this pull request Apr 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants