Import and accessing a ZFS pool in Ubuntu

I’ve previously been a FreeNAS user but decided to move over to Ubuntu.
I want to use ZFS on linux to keep the data integrity and performance ZFS offers, but I’ll gain access to a greater variety of apps (docker, snaps, .deb and everything in the repos).

I’ve just done a fresh install of Ubuntu 18.04.1 and added the ZFS package:
sudo apt install zfsutils-linux

I can see my two test pools I created in FreeNAS in the CLI:

max@Ubuntu-Server:~$ zfs list
NAME USED AVAIL REFER MOUNTPOINT
test1t 2.36G 897G 2.36G /test1t
test2 7.51G 438G 7.51G /test2


max@Ubuntu-Server:~$ zpool list
NAME SIZE ALLOC FREE EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT
test1t 928G 2.36G 926G - 0% 0% 1.00x ONLINE -
test2 460G 7.51G 452G - 0% 1% 1.00x ONLINE -


max@Ubuntu-Server:~$ zpool status
pool: test1t
state: ONLINE
status: Some supported features are not enabled on the pool. The pool can
still be used, but some features are unavailable.
action: Enable all features using ‘zpool upgrade’. Once this is done,
the pool may no longer be accessible by software that does not support
the features. See zpool-features(5) for details.
scan: none requested
config:

NAME             STATE     READ    WRITE     CKSUM
test1t             ONLINE       0          0                0
  mirror-0      ONLINE       0          0                 0
    sdb             ONLINE       0          0                0
    sda             ONLINE       0          0                 0

errors: No known data errors

pool: test2
state: ONLINE
status: Some supported features are not enabled on the pool. The pool can
still be used, but some features are unavailable.
action: Enable all features using ‘zpool upgrade’. Once this is done,
the pool may no longer be accessible by software that does not support
the features. See zpool-features(5) for details.
scan: none requested
config:

NAME            STATE     READ      WRITE     CKSUM
test2             ONLINE       0              0             0
  mirror-0     ONLINE       0              0             0
    sdc            ONLINE       0              0             0
    sdd           ONLINE       0               0            0

errors: No known data errors

Everything looks fine but then if I open the Files app I see multiple drives available rather than the 2 pools i was expecting. Also if I try to open them i get the following error:
Unable to access location. Error mounting /dev/sdd2 at /Media/max/test2: unknown filesystem type ‘zfs_member’.

Any idea what I’m missing here?
I have tried google and random commands i can find (using these spare disks so it doesn’t matter is i do something wrong) and i cant get it to work.

Thanks for any help.

Sorry about the formatting above.
I’ve no idea why its come out looking like that!

Also if needed my hardware is as follows:
Supermicro X8SLI
Xeon X3430
16G ECC RAM
2x IBM1015 SAS cards flashed to LSI 9211-i8 in IT mode
6x 4TB HDD in RAID Z2 (currently not attached to protect data from my fumbling)
2x 1TB mirror
2x 500GB mirror

Thanks again!

You can’t mount ZFS using the standard mount command (dumb, I know). You have to set the mountpoint with the zfs command.
sudo zfs set mountpoint=/foo_mount poolname

1 Like

Actually yes you can mount ZFS using /etc/fstab :-

✓ root@pica» zfs create pool1/test
✗ root@pica» zfs set mountpoint=legacy pool1/test
✓ root@pica» mount -t zfs pool1/test /mnt
✗ root@pica» df -h /mnt 
Filesystem      Size  Used Avail Use% Mounted on
pool1/test      3.4T     0  3.4T   0% /mnt

But I’m not sure why you’d want to.

To make use of existing pools, you want to (optionally) use zfs set mountpoint, and then import the pools: zpool import test2.

1 Like

Thanks :slight_smile:
I managed to get my test pools mounted fine and have been playing about with Ubuntu as my new home NAS/server.

I will probably be done with testing and experimenting soon and then I will import my actual pool and get my final setup running.

Thanks again

1 Like