0

I cannot get my zpool dataset to preserve and mount after reboot

I am sure I am missing something basic, but here goes:

I have Linux (Artix) installed on /dev/sda as ext4. Note: Artix does not use systemd.

I would like to add a data drive using zfs for snapshotting and software RAID.

I am testing my setup in Virtualbox before I commit to hardware (if that matters).

So I have zfs successfully installed

Tested with:

$ zpool status

I create my first pool

# zpool create tank -o ashift-12 /dev/disk/by-id/ata-VBOX_HARDDISK_XXXX

I create some datasets

# zfs create tank/data

Scrub for good measure

# zfs scrub tank

and here is where I am not sure what to do... I think I need to add something to fstab but not sure what?

If I reboot here all is lost.

I can get it back by doing

# zpool import tank

What is the right way to get this set up to auto-mount?

posop
  • 247
  • 2
  • 10
  • Not familiar with ZFS, but up til what you mentioned, it doesn't sound like you are talking about (auto) mounting, but the preparation to "populate" the block device for mounting into the system. In a systemd-distro, usually this is done with udev rules and/or systemd services. (Often upstream / the distro will already have them written to cover usual scenarios, like the case of LVM. You might want to check if the OpenZFS / ZFS-on-Linux project or the downstream package maintainer / provider provides any or suggest any approach.) – Tom Yan Sep 21 '21 at 01:14
  • 1
    What distro are you using? Does it use systemd? There are units you need to enable/start. – Zoredache Sep 21 '21 at 09:02
  • @Zoredache A am actually using Artix which does not use systemd. my init system is runit – posop Sep 21 '21 at 15:52

0 Answers0