3

I want to switch my data disk from the NTFS file system to ZFS when I replace it. I use Ubuntu 22.04.1 LTS installed in ZFS on an M4-CT256M4SSD2 256 GB SSD (I selected ZFS during installation). The new storage drive, which is the subject of this question, is a WDC WD100EFAX-68LHPN0 10TB. Other disks and peripherals have been unplugged.

The installation of the ZFS tools went well. Creating the ZFS partition also worked fine.

The problem is that I am unable to use this disk. It is impossible to mount this partition, neither by the GNOME Disks graphical tool, which always returns an error, nor using the mount command:

# mount -t zfs /dev/sdb1 /media/DOCUMENTS
filesystem 'dev/sdb1' cannot be mounted, unable to open the dataset

The DOCUMENTS partition does not appear under Dolphin, but it is clearly visible under GNOME Files. However, it is impossible to access it, as are the two system disk partitions, bpool and rpool.

Thanks for your help, best regards.


Additional information following Bardo's first response.

I created the ZFS partition the easiest way, following several tutorials that all advised the same thing:

  1. Install the ZFS application and verifying its installation:

    sudo apt update
    sudo apt install zfsutils-linux
    
  2. Check the ZFS version after installation:

    $ sudo zfs version
    zfs-2.1.4-0ubuntu0.1
    zfs-kmod-2.1.4-0ubuntu0.1
    
  3. Check the ZFS file storage directories using the whereis command:

    $ sudo whereis zfs
    zfs: /usr/sbin/zfs /etc/zfs /usr/share/zfs /usr/share/man/man8/zfs.8.gz /usr/share/man/man4/zfs.4.gz
    
  4. Create the ZFS partition:

    sudo zpool create -f DOCUMENTS /dev/sdb
    
  5. List ZFS partitions:

    $ sudo zpool list
    NAME        SIZE  ALLOC   FREE  CKPOINT  EXPANDSZ   FRAG    CAP  DEDUP    HEALTH  ALTROOT
    DOCUMENTS  9.09T   396K  9.09T        -         -     0%     0%  1.00x    ONLINE  -
    
  6. Check the status of the ZFS partition (pool):

    $ sudo zpool status
    pool: DOCUMENTS
    state: ONLINE
    config:  NAME        STATE     READ WRITE CKSUM
             DOCUMENTS   ONLINE       0     0     0
                 sda     ONLINE       0     0     0
    errors: No known data errors
    

So far, the procedure for creating the ZFS partition has gone well. But contrary to what the tutorials I have read and reread claim, the partition does not get mounted automatically when it is created and the disk is unusable. It is invisible under Dolphin and does not get mounted under GNOME Files.

Where did I make a mistake?

@ Artur Meinild.
I did not create a "dataset" on the Zpool. My whole procedure is above.

root@UBU2204:/# zfs list
NAME                                               USED  AVAIL     REFER  MOUNTPOINT
DOCUMENTS                                          360K  8.97T       96K  /DOCUMENTS
bpool                                              249M  1.51G       96K  /boot
bpool/BOOT                                         248M  1.51G       96K  none
bpool/BOOT/ubuntu_7yn8t5                           248M  1.51G      248M  /boot
rpool                                             9.75G   215G       96K  /
rpool/ROOT                                        8.45G   215G       96K  none
rpool/ROOT/ubuntu_7yn8t5                          8.45G   215G     4.71G  /
rpool/ROOT/ubuntu_7yn8t5/srv                        96K   215G       96K  /srv
rpool/ROOT/ubuntu_7yn8t5/usr                       232K   215G       96K  /usr
rpool/ROOT/ubuntu_7yn8t5/usr/local                 136K   215G      136K  /usr/local
rpool/ROOT/ubuntu_7yn8t5/var                      3.74G   215G       96K  /var
rpool/ROOT/ubuntu_7yn8t5/var/games                  96K   215G       96K  /var/games
rpool/ROOT/ubuntu_7yn8t5/var/lib                  3.34G   215G     3.19G  /var/lib
rpool/ROOT/ubuntu_7yn8t5/var/lib/AccountsService   108K   215G      108K  /var/lib/AccountsService
rpool/ROOT/ubuntu_7yn8t5/var/lib/NetworkManager    140K   215G      140K  /var/lib/NetworkManager
rpool/ROOT/ubuntu_7yn8t5/var/lib/apt               104M   215G      104M  /var/lib/apt
rpool/ROOT/ubuntu_7yn8t5/var/lib/dpkg             43.8M   215G     43.8M  /var/lib/dpkg
rpool/ROOT/ubuntu_7yn8t5/var/log                   414M   215G      414M  /var/log
rpool/ROOT/ubuntu_7yn8t5/var/mail                   96K   215G       96K  /var/mail
rpool/ROOT/ubuntu_7yn8t5/var/snap                 3.09M   215G     3.09M  /var/snap
rpool/ROOT/ubuntu_7yn8t5/var/spool                 112K   215G      112K  /var/spool
rpool/ROOT/ubuntu_7yn8t5/var/www                    96K   215G       96K  /var/www
rpool/USERDATA                                    1.25G   215G       96K  /
rpool/USERDATA/hyacinthe_nurhv0                   1.25G   215G     1.25G  /home/hyacinthe
rpool/USERDATA/root_nurhv0                         140K   215G      140K  /root
root@UBU2204:/#

root@UBU2204:/# zfs get all | grep mountpoint DOCUMENTS mountpoint /DOCUMENTS default bpool mountpoint /boot local bpool/BOOT mountpoint none local bpool/BOOT/ubuntu_7yn8t5 mountpoint /boot local rpool mountpoint / local rpool/ROOT mountpoint none local rpool/ROOT/ubuntu_7yn8t5 mountpoint / local rpool/ROOT/ubuntu_7yn8t5/srv mountpoint /srv inherited from rpool/ROOT/ubuntu_7yn8t5 rpool/ROOT/ubuntu_7yn8t5/usr mountpoint /usr inherited from rpool/ROOT/ubuntu_7yn8t5 rpool/ROOT/ubuntu_7yn8t5/usr/local mountpoint /usr/local inherited from rpool/ROOT/ubuntu_7yn8t5 rpool/ROOT/ubuntu_7yn8t5/var mountpoint /var inherited from rpool/ROOT/ubuntu_7yn8t5 rpool/ROOT/ubuntu_7yn8t5/var/games mountpoint /var/games inherited from rpool/ROOT/ubuntu_7yn8t5 rpool/ROOT/ubuntu_7yn8t5/var/lib mountpoint /var/lib inherited from rpool/ROOT/ubuntu_7yn8t5 rpool/ROOT/ubuntu_7yn8t5/var/lib/AccountsService mountpoint /var/lib/AccountsService inherited from rpool/ROOT/ubuntu_7yn8t5 rpool/ROOT/ubuntu_7yn8t5/var/lib/NetworkManager mountpoint /var/lib/NetworkManager inherited from rpool/ROOT/ubuntu_7yn8t5 rpool/ROOT/ubuntu_7yn8t5/var/lib/apt mountpoint /var/lib/apt inherited from rpool/ROOT/ubuntu_7yn8t5 rpool/ROOT/ubuntu_7yn8t5/var/lib/dpkg mountpoint /var/lib/dpkg inherited from rpool/ROOT/ubuntu_7yn8t5 rpool/ROOT/ubuntu_7yn8t5/var/log mountpoint /var/log inherited from rpool/ROOT/ubuntu_7yn8t5 rpool/ROOT/ubuntu_7yn8t5/var/mail mountpoint /var/mail inherited from rpool/ROOT/ubuntu_7yn8t5 rpool/ROOT/ubuntu_7yn8t5/var/snap mountpoint /var/snap inherited from rpool/ROOT/ubuntu_7yn8t5 rpool/ROOT/ubuntu_7yn8t5/var/spool mountpoint /var/spool inherited from rpool/ROOT/ubuntu_7yn8t5 rpool/ROOT/ubuntu_7yn8t5/var/www mountpoint /var/www inherited from rpool/ROOT/ubuntu_7yn8t5 rpool/USERDATA mountpoint / local rpool/USERDATA/hyacinthe_nurhv0 mountpoint /home/hyacinthe local rpool/USERDATA/root_nurhv0 mountpoint /root local root@UBU2204:/#

I'm trying to understand the process of 10 years ago. Not easy ! askubuntu.com/questions/123126/how-do-i-mount-a-zfs-pool

@Amitie 10g

If you can import the pool, you may want to set the mountpoint flag rather than using the traditional mount command: zfs set mountpoint=

I don't quite understand your proposal. I just want to replace my ten year old NTFS formatted 4TB data drive with a brand new ZFS formatted 10TB drive due to the better performance of this file system. I naively thought that formatting a drive to ZFS was as easy as formatting it to FAT32, NTFS, exFAT, or ext4. I see that is not the case. But if until today, I cannot manage to use my disk in ZFS, there must be an explanation. Which ? Where did I make a mistake?

  • As you can clearly see from the output of zfs list, the Zpool is already mounted at /DOCUMENTS. Refer to Amitie's answer about how to change the mountpoint. – Artur Meinild Nov 29 '22 at 14:13
  • 1
    Does this answer your question? How do I mount a ZFS pool? – Artur Meinild Nov 29 '22 at 14:16
  • If the Zpool is already mounted, why can't I use it to store data? I can't save files or copy-paste to this disk. Maybe I should rephrase the question to "How do I use a ZFS-formatted disk, mounted in /DOCUMENTS, but invisible in Dolphin?" – Montagne Nov 29 '22 at 18:06
  • Does this answer your question? How do I mount a ZFS pool ? For now "How do I mount a ZFS pool?" did not allow me to unblock the situation! – Montagne Nov 29 '22 at 18:06
  • Yes, it would be a good idea to rephrase the question. Maybe you should mount it in /home/your_user/Documents, and set permissions accordingly to your user. – Artur Meinild Nov 29 '22 at 19:40

1 Answers1

0

If you can import the pool, you may want to set the mountpoint flag rather than using the traditional mount command: zfs set mountpoint=<mountpoint> <dataset>

Also, you may try to upgrade the pool to the lates version supported by the installed zfs in your box: zpool upgrade -v to check, and zpool upgrade -a to perform the upgrade. Be sure to have backups!