OpenMediaVault-Plugin-Developers / openmediavault-zfs

OpenMediaVault plugin for zfs
74 stars 15 forks source link

Unable to create ZFS pool #94

Closed PopeFelix closed 4 months ago

PopeFelix commented 4 months ago

Running openmediavault-zfs v7.1 on OpenMediaVault 7 hosted on a Proxmox (QEMU) VM. When I attempt to create a ZFS pool via the GUI I get the following error message:

 500 - Internal Server Error
Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C.UTF-8; export LANGUAGE=; ls -la /dev/disk/by-id | grep 'sdb$'' with exit code '1': 

Output of lsblk:

sda      8:0    0   32G  0 disk 
├─sda1   8:1    0   31G  0 part /
├─sda2   8:2    0    1K  0 part 
└─sda5   8:5    0  975M  0 part [SWAP]
sdb      8:16   0  1.8T  0 disk 
sdc      8:32   0  1.8T  0 disk 
sdd      8:48   0  1.8T  0 disk 
sde      8:64   0  1.8T  0 disk 
sdf      8:80   0  1.8T  0 disk 
sr0     11:0    1  631M  0 rom  

I'm trying to create a RAIDZ1 pool with /dev/sdb, /dev/sdc, /dev/sdd, /dev/sde, and /dev/sdf. Setting the "Force creation" flag doesn't help.

PopeFelix commented 4 months ago

OK, I see why this is happening. /dev/disk/by-id is not listing all of the disks that lsblk is. Maybe I've passed the disks through from proxmox wrong.

root@openmediavault2:~# export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C.UTF-8; export LANGUAGE=; ls -la /dev/disk/by-id 
total 0
drwxr-xr-x 2 root root 160 Jul 11 13:41 .
drwxr-xr-x 8 root root 160 Jul 11 13:41 ..
lrwxrwxrwx 1 root root   9 Jul 11 13:41 ata-QEMU_DVD-ROM_QM00003 -> ../../sr0
lrwxrwxrwx 1 root root   9 Jul 11 13:41 scsi-0QEMU_QEMU_HARDDISK_disk001 -> ../../sdd
lrwxrwxrwx 1 root root   9 Jul 11 13:41 scsi-0QEMU_QEMU_HARDDISK_drive-scsi0 -> ../../sda
lrwxrwxrwx 1 root root  10 Jul 11 13:41 scsi-0QEMU_QEMU_HARDDISK_drive-scsi0-part1 -> ../../sda1
lrwxrwxrwx 1 root root  10 Jul 11 13:41 scsi-0QEMU_QEMU_HARDDISK_drive-scsi0-part2 -> ../../sda2
lrwxrwxrwx 1 root root  10 Jul 11 13:41 scsi-0QEMU_QEMU_HARDDISK_drive-scsi0-part5 -> ../../sda5

This is pretty clearly a problem on my end, and not OMV, but I'm going to leave this up in case the devs here have any suggestions.

ryecoaaron commented 4 months ago

You cannot use by-id on kvm VMs because there is no id for the virtual disks (by default). Unfortunately, the plugin can't change this. I use the 'none' device alias when working on a kvm VM.

PopeFelix commented 4 months ago

"I use the 'none' device alias when working on a kvm VM." - Would you elaborate on that, please?

ryecoaaron commented 4 months ago

When creating a pool, there is a field called "Device alias". Set it to none.

image