ZFS block device

Hey :slightly_smiling_face:

I would like to use a ZFS dataset as a raw device for a KVM and would need to have the /dev/zvol/ block devices. But they are not showing up. There should also be something like /sys/block/zdev but this is also not there. Is there some setting to make ZFS datasets available as block devices in NixOS?

Best wishes
Phillip

A dataset is a filesystem tree while you want a zvol; are you sure you’re creating the right thing in ZFS?

1 Like

Ah, you are completely right. I was creating datasets using zfs create -o quota=50G data/vm/debian but it should be a ZFS volume, like zfs create -V 50G data/vm/debian and then it also shows up as /dev/zvol/data/vm/debian. Stupid mistake from my side. Thanks for the hint :slight_smile:

2 Likes