New to ZFS and Proxmox

digitalbots

Member
Dec 7, 2018
23
0
21
43
Hey guys.

Firstly this is an amazing hypervisor. But i think my understanding of linux is a bit dated.

Here is what I have....
I have a OpenMediaVault server that is going to be a Proxmox server that will host OpenMediaVault as a VM.

What I am trying to do...
ZFS RAID0 two 1tb HDs to hold VM images.

What have I done?

zpool create -f deadpool /dev/sda /dev/sdb

Confirmed it worked.......

root@pve:/# df -h
Filesystem Size Used Avail Use% Mounted on
udev 16G 0 16G 0% /dev
tmpfs 3.2G 9.1M 3.2G 1% /run
/dev/mapper/pve-root 37G 3.3G 32G 10% /
tmpfs 16G 40M 16G 1% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 16G 0 16G 0% /sys/fs/cgroup
/dev/sdc2 511M 304K 511M 1% /boot/efi
deadpool 1.8T 0 1.8T 0% /deadpool
/dev/fuse 30M 16K 30M 1% /etc/pve
tmpfs 3.2G 0 3.2G 0% /run/user/0

checked the ZFS pool status.....

root@pve:/# zpool status
pool: deadpool
state: ONLINE
scan: none requested
config:

NAME STATE READ WRITE CKSUM
deadpool ONLINE 0 0 0
sda ONLINE 0 0 0
sdb ONLINE 0 0 0

errors: No known data errors


I added it as a ZFS pool in the "Datacenter" area of Proxmox with the name of WadeWilson.

NOW THE PROBLEM.....
I can transfer VM's to the ZFS Pool (/deadpool) but I can not upload ISOs nor can I create vms in the pool.

I was told I need DIR's in the /deadpool dir. Which i did mkdir (I think this is where i went wrong)

root@pve:/deadpool# ls -l
total 2
drwxr-xr-x 2 root root 2 Dec 13 07:46 Files
drwxr-xr-x 2 root root 2 Dec 13 07:50 images
drwxr-xr-x 2 root root 2 Dec 13 07:45 ISOs
drwxr-xr-x 2 root root 2 Dec 13 07:45 VMs
root@pve:/deadpool#

so what did I do wrong?
 
Hi,

you have to add a storage form type Dir in your storage config.
This "dir" storage has the path /dedpool/VM and the content type "image".
 
Hi,

you have to add a storage form type Dir in your storage config.
This "dir" storage has the path /dedpool/VM and the content type "image".
figured it out. thanks for pointing me in the right direction!!!!
 
Last edited:
great scott....

now that i got the Dir's online and i moved my VMs to the new dir. I get the following error.

kvm: -drive file=/deadpool/VMs/images/100/vm-100-disk-0.qcow2,if=none,id=drive-scsi0,format=qcow2,cache=none,aio=native,detect-zeroes=on: file system may not support O_DIRECT
kvm: -drive file=/deadpool/VMs/images/100/vm-100-disk-0.qcow2,if=none,id=drive-scsi0,format=qcow2,cache=none,aio=native,detect-zeroes=on: Could not open '/deadpool/VMs/images/100/vm-100-disk-0.qcow2': Invalid argument
TASK ERROR: start failed: command '/usr/bin/kvm -id 100 -name OpenMediaVault -chardev 'socket,id=qmp,path=/var/run/qemu-server/100.qmp,server,nowait' -mon 'chardev=qmp,mode=control' -chardev 'socket,id=qmp-event,path=/var/run/qmeventd.sock,reconnect=5' -mon 'chardev=qmp-event,mode=control' -pidfile /var/run/qemu-server/100.pid -daemonize -smbios 'type=1,uuid=681819c5-6886-4511-bb92-4959fd0d8332' -smp '4,sockets=2,cores=2,maxcpus=4' -nodefaults -boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' -vnc unix:/var/run/qemu-server/100.vnc,x509,password -cpu kvm64,+lahf_lm,+sep,+kvm_pv_unhalt,+kvm_pv_eoi,enforce -m 2048 -device 'pci-bridge,id=pci.1,chassis_nr=1,bus=pci.0,addr=0x1e' -device 'pci-bridge,id=pci.2,chassis_nr=2,bus=pci.0,addr=0x1f' -device 'vmgenid,guid=c3994d02-a34b-492e-97f5-41683f02fe3a' -device 'piix3-usb-uhci,id=uhci,bus=pci.0,addr=0x1.0x2' -readconfig /usr/share/qemu-server/pve-usb.cfg -device 'usb-tablet,id=tablet,bus=uhci.0,port=1' -device 'usb-host,hostbus=2,hostport=1,id=usb0' -device 'VGA,id=vga,bus=pci.0,addr=0x2' -device 'virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3' -iscsi 'initiator-name=iqn.1993-08.org.debian:01:db975d145b26' -device 'virtio-scsi-pci,id=scsihw0,bus=pci.0,addr=0x5' -drive 'file=/deadpool/VMs/images/100/vm-100-disk-0.qcow2,if=none,id=drive-scsi0,format=qcow2,cache=none,aio=native,detect-zeroes=on' -device 'scsi-hd,bus=scsihw0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0,id=scsi0,bootindex=100' -netdev 'type=tap,id=net0,ifname=tap100i0,script=/var/lib/qemu-server/pve-bridge,downscript=/var/lib/qemu-server/pve-bridgedown,vhost=on' -device 'virtio-net-pci,mac=3E:89:5D:72:40:9B,netdev=net0,bus=pci.0,addr=0x12,id=net0,bootindex=300' -machine 'type=pc'' failed: exit code 1


im going to guess it is a issue with my pool but i can't make heads or tails of this.
 
kvm: -drive file=/deadpool/VMs/images/100/vm-100-disk-0.qcow2,if=none,id=drive-scsi0,format=qcow2,cache=none,aio=native,detect-zeroes=on: file system may not support O_DIRECT

With ZFS storage, your virtual disks' cache will need to be set to writeback.