zfs over iscsi write error

hifloh

New Member
Apr 12, 2024
7
3
3
Hello everyone, I recently came across the following problem when setting up my home server and got stuck.
Setup
pve1:
low power intel Atom Server​
zfs zvol for storage (/tank/zvol/)​
pve:
powerfull AMD Server​

My idea is to use pve1 24/7 and pve only when i need the Performance.
So most of the time pve1 will be running as a single host.
pve should access storage on pve1 using zfs over iscsi.
I followed this tutorial from Cristian to set the whole thing up.

Wen creating or moving disks on the new storage i get TASK ERROR: storage migration failed: Could not open /dev/tank/zvol/vm-105-disk-0 Cristian mentions that all zfs over iscsi requires all zvols to be accessible via /dev/poolname tough i have no idea how to do that on proxmox.

Has anyone Suggestions on how to solve this Problem?
 
After a reboot, the link will disappear. I also created a link using systed service. But it's a terrible crutch. We need to do it more properly
 
Last edited:
True.

There might be a way to create additional symlinks with udev rules but i haven't got it working jet.
Maybe i can get it working some time.

Also after a restart of the host, the vms won't start with the following error
Code:
TASK ERROR: Could not find lu_name for zvol vm-108-disk-0 at /usr/share/perl5/PVE/Storage/ZFSPlugin.pm line 112.
maybe this is due to the delayd creation of the link.
I "Solved" it by creating a new disk and manually copy the old one to the new one using dd.
 
Last edited:
I fixed the symlink error by creating a new udev rule.
I copied /usr/lib/udev/rules.d/60-zvol.rules to 99-zfs.rules and changed SYMLINK+="zvol/%c" to SYMLINK+="/%c"

Now I only have to solve how to mount encrypted pools at boot.
 
  • Like
Reactions: Ashu76
For anyone having the same problem with encrypted pools, i managed to solve it by
adding -la to MOUNT_EXTRA_OPTIONS in /etc/default/zfs and in /usr/lib/systemd/system/zfs-mount.service .
 
Last edited: