Desperately trying to share storage from Promox host (ZFS)

lowrisk

New Member
Sep 5, 2023
6
0
1
I have the storage on my proxmox host using ZFS (not even sure if that a good idea? It's a M.2 SSD 2TB mostly for Plex)
-- should I use another filesystem ?

on the host I can access the file at /Storage using SSH.


I have Plex runing on one LXC and connected with "pct set 100 --mp0 /Storage,mp=/mnt/storage "
I want the same path for other VMs or Unprivileged LXC to access the same file


if I'm sharing the path to an unprivileged LXC, I'm getting read/write issue (using pct set 101 --mp0 /Storage,mp=/mnt/storage )

Then I created a SMB share from a privileged LXC to a unprivileged LXC : doesn't work (and expected I think)


a VM would be a better (safer) approach,

I added in the last ligne of etc/pve/qemu-server/102.conf


Code:
args: -chardev socket,id=virtfs0,path=/run/virtiofs-102.sock -device vhost-user-fs-pci,queue-size=1024,chardev=virtfs0,tag=storage -object memory-backend-file,id=mem,size=32768M,mem-path=/dev/shm,share=on -numa node,memdev=mem

Code:
root@kevinn:~# qm config 102
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LC_CTYPE = "UTF-8",
    LANG = "en_GB.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_GB.UTF-8").
agent: 1
args: -chardev socket,id=virtfs0,path=/run/virtiofs-102.sock -device vhost-user-fs-pci,queue-size=1024,chardev=virtfs0,tag=storage -object memory-backend-file,id=mem,size=32768M,mem-path=/dev/shm,share=on -numa node,memdev=mem
boot: order=scsi0;ide2;net0
cores: 2
cpu: x86-64-v2-AES
ide2: none,media=cdrom
machine: q35
memory: 4096
meta: creation-qemu=8.0.2,ctime=1693763532
name: UbuntuStart
net0: virtio=B6:BC:17:C9:1A:15,bridge=vmbr0,firewall=1,tag=20
numa: 0
onboot: 1
ostype: l26
scsi0: SSD:vm-102-disk-0,iothread=1,size=32G
scsihw: virtio-scsi-single
smbios1: uuid=eba09d83-953d-476a-9025-a777fb21afbd
sockets: 1
vmgenid: e0d68acd-902c-4b3e-b505-bf4aeaa790c4

Code:
root@kevinn:~# qm showcmd 102 --pretty
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LC_CTYPE = "UTF-8",
    LANG = "en_GB.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_GB.UTF-8").
/usr/bin/kvm \
  -id 102 \
  -name 'UbuntuStart,debug-threads=on' \
  -no-shutdown \
  -chardev 'socket,id=qmp,path=/var/run/qemu-server/102.qmp,server=on,wait=off' \
  -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/102.pid \
  -daemonize \
  -smbios 'type=1,uuid=eba09d83-953d-476a-9025-a777fb21afbd' \
  -smp '2,sockets=1,cores=2,maxcpus=2' \
  -nodefaults \
  -boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' \
  -vnc 'unix:/var/run/qemu-server/102.vnc,password=on' \
  -cpu qemu64,+aes,enforce,+kvm_pv_eoi,+kvm_pv_unhalt,+pni,+popcnt,+sse4.1,+sse4.2,+ssse3 \
  -m 4096 \
  -object 'iothread,id=iothread-virtioscsi0' \
  -readconfig /usr/share/qemu-server/pve-q35-4.0.cfg \
  -device 'vmgenid,guid=e0d68acd-902c-4b3e-b505-bf4aeaa790c4' \
  -device 'usb-tablet,id=tablet,bus=ehci.0,port=1' \
  -device 'VGA,id=vga,bus=pcie.0,addr=0x1' \
  -chardev 'socket,path=/var/run/qemu-server/102.qga,server=on,wait=off,id=qga0' \
  -device 'virtio-serial,id=qga0,bus=pci.0,addr=0x8' \
  -device 'virtserialport,chardev=qga0,name=org.qemu.guest_agent.0' \
  -device 'virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3,free-page-reporting=on' \
  -iscsi 'initiator-name=iqn.1993-08.org.debian:01:e5d423ef5466' \
  -drive 'if=none,id=drive-ide2,media=cdrom,aio=io_uring' \
  -device 'ide-cd,bus=ide.1,unit=0,drive=drive-ide2,id=ide2,bootindex=101' \
  -device 'virtio-scsi-pci,id=virtioscsi0,bus=pci.3,addr=0x1,iothread=iothread-virtioscsi0' \
  -drive 'file=/dev/zvol/SSD/vm-102-disk-0,if=none,id=drive-scsi0,format=raw,cache=none,aio=io_uring,detect-zeroes=on' \
  -device 'scsi-hd,bus=virtioscsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0,id=scsi0,bootindex=100' \
  -netdev 'type=tap,id=net0,ifname=tap102i0,script=/var/lib/qemu-server/pve-bridge,downscript=/var/lib/qemu-server/pve-bridgedown,vhost=on' \
  -device 'virtio-net-pci,mac=B6:BC:17:C9:1A:15,netdev=net0,bus=pci.0,addr=0x12,id=net0,rx_queue_size=1024,tx_queue_size=256,bootindex=102' \
  -machine 'type=q35+pve0' \
  -chardev 'socket,id=virtfs0,path=/run/virtiofs-102.sock' \
  -device 'vhost-user-fs-pci,queue-size=1024,chardev=virtfs0,tag=storage' \
  -object 'memory-backend-file,id=mem,size=32768M,mem-path=/dev/shm,share=on' \
  -numa 'node,memdev=mem'

I'm a bit confuse though, because if I run that "
/usr/libexec/virtiofsd --syslog --socket-path /run/virtiofs-102.sock --shared-dir /Storage --announce-submounts --inode-file-handles=mandatory
" into SSH, nothin happen


-- also I'm not sure the QEMU Guest Agent is installed properly on the Ubuntu VM, I keep trying to install it but I still don't have copy / past
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!