2

Currently using ZFS on ArchLinux. I have two datasets that I originally setup with legacy mountpoints:

# zfs get mountpoint tank/data/home
NAME            PROPERTY    VALUE       SOURCE
tank/data/home  mountpoint  legacy      local
# zfs get mountpoint tank/data/home/kevdog
NAME                   PROPERTY    VALUE       SOURCE
tank/data/home/kevdog  mountpoint  legacy      local

I have corresponding entries within /etc/fstab for these mountpoints

I'd like to change these mounts to be handled by zfs rather than mount

I logged in as root, and then did the following:

umount /home/kevdog
umount /home
zfs set mountpoint=/home tank/data/home
zfs set mountpoint=/home/kevdog tank/data/home/kevdog

I went ahead and commented out the corresponding fstab entries for these mounts

At this point I rebooted system however ran into a problem, the dataset tank/data/home/kevdog was mounted at /home/kevdog, however the directory was totally empty. After undoing what I just described above (setting legacy for management of these datasets) the /home/kevdog directory was no longer empty.

Just curious to know why the process didn't work. Did I have to export/import pool again to make this work? Did I forget to do something else?

1 Answer 1

0

(…) however the directory was totally empty.

At this point you have to check if the dataset was mounted. Did the system warns you about a non empty mountpoint?

Did I have to export/import pool again to make this work?

Probably, your description looks un-clear for me.


Here is the way I move legacy to ZFS mountpoints, even / and /boot:

  1. boot on another disk/system supporting ZFS
  2. export legacy pool
  3. import it again without mounting it
  4. set mountpoints, starting by parents mount points
  5. remove fstab entries
  6. export pool
  7. reboot

See my personal notes related to Proxmox installation about that.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .