Quick tip for mounting zfs disks in arch, its trivial.
- install zfs dkms modul from aur -
yay zfs-dkms - reboot, have the zfs disk plugged in
- shows importable pools -
sudo zpool import - import it -
sudo zpool import Pool-01
if it was not exported before unplugging from the original machine then add -f flag
- the import command will mount it in the root by its name, with datasets under it
- when you are done with whatever -
sudo zpool export Pool-01
If you need to access snapshots, you find them in a hidden .zfs directory inside datasets.
Show hidden files wont help, nor ls -al but you can cd in to it cd /Pool-01/Dataset-01/.zfs or paste the full path in to your file explorer.
/background for this
I am setting up homeserver for selfhosted stuff. Truenas scale in a VM is going to be serving as a NAS. It is centered around zfs, and I wanted to test that I can just unplug the disk out, put it elsewhere and access data. Would go for open media vault if it felt like cumbersome process.
The above process took me surprisingly long, as I spent time dicking with repos and switching kernels and reading whatnot...
When all that is needed is the zfs dksm modul and then import the disk. Somehow I went in with the impression I am about to do a rocket surgery.
About this post
- Posted
- Archived
- Score
- 1 · 60% up
- Kind
- Text
- ID
- varwmc
1 comment
Thank you, your use case is almost exactly what I'm trying to do and turns out
zfs-dkmswas all I needed... This saved me an hour or five