So this is one of those things I do for fun and academic reasons, not because it's practical.
https://files.lancethepants.com/Binaries/zfs/
zfs-0.8.0-rc5
zfs-0.8.0
zfs-0.8.3 now available.
Was playing around and managed to get zfs to compile for Tomato ARM. I use zfs other places, and wanted to see if a router could run it. Turns out it can, and it's not quite as terrible as you would think. Actually a bit better than I would have thought. I tested on my R7000 with 4tb hdd & usb3 over samba and got...
write: 6.5MB/s - 10MB/s
read: 23MB/s
Not spectacular numbers, but then again I had no idea what to expect, or whether it would even run.
I haven't tested too much, but it feels like ext4 isn't that much faster than this, at least that how it feels. Maybe someone out there will give this a whirl and come up with some more solid numbers. Makes me want to overclock my R7000 and see how much it can handle. Would be cool to see tomato run on beefier devices too like ASUS RT-AX88U.
I plugged in an external drive I have that already uses zfs for backups, and I was surprised that it mounted without issue. Through samba I was able to view my photos and they loaded very quickly, even raws. I loaded a mkv movie on, and was able to stream it to my pc.
It would be interesting to experiment more with & without checksums & encryption, or different types of checksums and encryptions, and see what performance hits/benefits you get.
Speaking of encryption, that is a nifty feature with this release. You can encrypt the whole pool, or just an individual file system natively with zfs. It is also really nice to create and destroy file systems on the fly. You don't have to worry about pre-partitioning your disk. Need /mmc, or /opt, or something under /mnt? Just create and mount it.
If you use upx to compress the zfs & zpool binaries (about the only binaries you'll need) and put them with the kernel modules, they take up about ~6MBs space, easily fitting into ARM jffs. If you want the full suite of things, you can extract to /opt. I compiled for that prefix.
I'm not going to get into too much detail of how to try this, there's plenty of zfs howtos already.
Load your kernel modules in this order.
and then you're good to go. zfs and zpool userspace tools should work.
If you don't already have usb enabled in the gui, you may have a few more kernel modules to load beforehand.
Maybe a couple useful commands to get you going
Create new pool (-m is mountpoint)
Create new pool with whole pool encryption
or create single filesystem with encryption
other useful commands
zvols currently don't work due to that code using kernel api's not found in 2.6.36.4, and me just commenting those lines out to get it to compile. They seem to claim compatibility back to 2.6.32, so I've submitted bug report with that and other apis not present in old kernels.
https://files.lancethepants.com/Binaries/zfs/
zfs-0.8.0
zfs-0.8.3 now available.
Was playing around and managed to get zfs to compile for Tomato ARM. I use zfs other places, and wanted to see if a router could run it. Turns out it can, and it's not quite as terrible as you would think. Actually a bit better than I would have thought. I tested on my R7000 with 4tb hdd & usb3 over samba and got...
write: 6.5MB/s - 10MB/s
read: 23MB/s
Not spectacular numbers, but then again I had no idea what to expect, or whether it would even run.
I haven't tested too much, but it feels like ext4 isn't that much faster than this, at least that how it feels. Maybe someone out there will give this a whirl and come up with some more solid numbers. Makes me want to overclock my R7000 and see how much it can handle. Would be cool to see tomato run on beefier devices too like ASUS RT-AX88U.
I plugged in an external drive I have that already uses zfs for backups, and I was surprised that it mounted without issue. Through samba I was able to view my photos and they loaded very quickly, even raws. I loaded a mkv movie on, and was able to stream it to my pc.
It would be interesting to experiment more with & without checksums & encryption, or different types of checksums and encryptions, and see what performance hits/benefits you get.
Speaking of encryption, that is a nifty feature with this release. You can encrypt the whole pool, or just an individual file system natively with zfs. It is also really nice to create and destroy file systems on the fly. You don't have to worry about pre-partitioning your disk. Need /mmc, or /opt, or something under /mnt? Just create and mount it.
If you use upx to compress the zfs & zpool binaries (about the only binaries you'll need) and put them with the kernel modules, they take up about ~6MBs space, easily fitting into ARM jffs. If you want the full suite of things, you can extract to /opt. I compiled for that prefix.
I'm not going to get into too much detail of how to try this, there's plenty of zfs howtos already.
Load your kernel modules in this order.
Code:
insmod spl.ko
insmod icp.ko
insmod zavl.ko
insmod zlua.ko
insmod znvpair.ko
insmod zunicode.ko
insmod zcommon.ko
insmod zfs.ko
and then you're good to go. zfs and zpool userspace tools should work.
If you don't already have usb enabled in the gui, you may have a few more kernel modules to load beforehand.
Maybe a couple useful commands to get you going
Create new pool (-m is mountpoint)
Code:
zpool create \
-m /mnt/tank \
tank \
/dev/sda
Create new pool with whole pool encryption
Code:
zpool create \
-m /mnt/tank \
-O encryption=aes-256-gcm \
-O keyformat=passphrase \
tank \
/dev/sda
or create single filesystem with encryption
Code:
zfs create \
-o encryption=on \
-o keyformat=passphrase \
tank/encrypted
other useful commands
Code:
zpool get all
zfs get all
zfs get checksum tank
zfs set checksum=on/off tank
zpool import tank
zpool import tank -l (prompt for encryption password)
zpool export tank
zfs mount -a
zfs mount -a -l (prompt for encryption password)
zfs set mount=/mmc tank/somefilesystem
zvols currently don't work due to that code using kernel api's not found in 2.6.36.4, and me just commenting those lines out to get it to compile. They seem to claim compatibility back to 2.6.32, so I've submitted bug report with that and other apis not present in old kernels.
Last edited: