zfs on Ubuntu touch
-
Hello
I have an external harddrive that I use for as a portable 'home partition'. Its formatted with zfs and I have been using to to effortlessly move between using different computers (laptop, desktop, work) and have all my files all the time.
If I wanted to use it with an Ubuntu touch device, I would need to have a functioning zfs installation on the device. I heard in one of the podcasts that installing things via apt is not supported and the root partition only has 3GB of space.Is it feasible/possible to install zfs on UT? I guess a snap installation of zfs is very unlikely.
-
@RJDan The problem in this case is worse than that of installing packages via apt (which has workarounds).
Zfs needs a dkms package installed which as far as I know cannot work in UT kernels. It should be possible however to compile the kernel with zfs support beforehand.
An other way is to use libfuse to have the filesystem in userspace to not mess up with the OS, you have to search how to do that on your own though.Also, do you really need all the features of zfs or can btrfs work for you (which is in-tree)?
-
@ikoz
Im already using zfs and when I was reading about which is better supported on linux, it seemed to be a clear win for zfs.
I use zfs for snapshot and schedules backups. I could probably swap to btrfs I just need to read what the differences would be.I dont know enough about linux to be adding things to the kernel.
-
TL;DR: use BTRFS or proxy the ZFS via NFS
@RJDan said in zfs on Ubuntu touch:
[...] better supported on linux, it seemed to be a clear win for zfs.
Well, unfortunately that is not the case, ZFS is not supported without adding kernel modules via DKMS. That is because of licensing issues which prevent it from being built-in the kernel like BTRFS and EXT4. DKMS cannot work on Halium kernels as they are based on patched downstream android kernel.
I thought FUSE was an option, but after trying to install it on my device I found out
zfs-fuse
is deprecated, and I couldn't make it work.So the only way is to build the kernel with patches for the ZFS module, beforehand. This is however very complex and I wouldn't recommend it.
There is a workaround, to have a NFS/Samba as a proxy to the ZFS file system so that the UT device accesses the file system remotely.
The more straight-forward approach is to change the file system to BTRFS, assuming it meets your use cases. If you only need snapshots and backups, you should be fine.