I am a little confused on how to do this exactly, I have a system running ext4.
Someone gave me a thumb drive but said its formatted as ZFS. How do I access the data off it? Do I need to install some compatability package to be able to see the information on the drive?
Edit: To clarify, I thought it would operate like a regular thumb drive and mount instantly in my file manager (Dolphin). I can see the drive, but it isn’t mounting automatically,
SOLVED: The solution is a little wonky, but made very messy due to the zfs drive being encrypted. But mounting the drive and enabling your computer to run ZFS, a large part of that solution is provided in a post by mbod
I’ll answer the last question first, I’m running the default kernel that comes with EOS (just updated)
Yup, linux headers is installed. “pacman -Qs linux-headers” returns: “local/linux-headers 6.18.2.arch2-1
Headers and scripts for building modules for the Linux kernel”
First you need to install the zfs packages: zfs-dkms and zfs-utils
zfs-dkms compiles the zfs module for your kernels. This module needs to be loaded. Either manualy with modprobe zfs or automatically with a config file in /etc/modules-load.d/
zfs-utils contains the user space program: zpool and zfs.
In a terminal window type: zpool version to see if everything is loaded and working.
# zpool version
zfs-2.4.0-1
zfs-kmod-2.4.0-1
Now you can plugin the usb drive an check which pools are available.
Type zpool import and zfs will check all attached devices if it finds a pool and it gives you the name of the pool.
Then you need to import the pool to work with it. zpool import -R /mnt/ <poolname>
The -R /mnt option is important because zfs is different to other filesystem in regard to how it mounts directories. The mountpoints are stored in the datasets. If the usb drive contains a dataset which has the mountpoint set to /home/, it will mount the dataset on top of your /home directory, which is not what you want. With -R /mnt you tell zfs to mount everything relative to the /mnt directory.
Once the import is complete, you can access the data in the pool.
My reading of the wiki was that you could do it either through dkms or through kernel specific packages. I am already unfamiliar and uncomfortable in dealing with the kernel, so opted for the non-dkms option
So yeah, someone I know just started using Truenas. I don’t have one built yet (and with ram prices, who knows when that’s going to happen), so he still wanted me to be his off-site backup for the important things.
Thank you for the detailed answer. Can I pick your brain a little bit?
I do have zfs-utils installed but don’t have zfs-dkms installed. I thought the arch wiki said you could opt for one way or the other; since I’m not at all faimilar with what dkms is or does, I opted to go the way without it. Am I wrong in that understanding?
zpool version returns exactly what you got
How do I load the module? just type the command “modprobe zfs?” Do I have to type that everytime I restart or need to access the pool?