2

I am searching for an answer on how to create and pass through a raw device to a VM using proxmox. Through that I am hoping to have full control of the disk including S.M.A.R.T. stats and disk spindown. Currently I am using passthrough using the SATA passthrough offered by proxmox. Unfortunately I have no clue how to create a raw disk file from my (empty) disk). Furthermore I am not entirely certain on how to bind it to the VM.

I hope someone knows the relevant steps.


Side notes: This question is just a measure I want to try out to achieve a certain goal. For the sake of simplicity I posed my question confined to the part above. However, if you have a better idea, feel free to give me a hint. So far I have tried a lot of things to achieve my ultimate goal.

Goal that I want to achieve: I am using Proxmox VE 5.3-8 on a HP Proliant Gen 8 server. It hosts several VMs among which OMV should serve as a NAS. Since the files will not be accessed too often, I opt for a spindown of the drives. My goal is reduction of noise and power savings.

Current status: I passed through two disks by adding them to /etc/pve/nodes/pve/qemu-server/vmid.conf sata1: /dev/disk/by-id/{disk-id}

Through that I do see SMART stats and everything except disk spindown works fine. Using virtio instead of SATA does not give me SMART values. using hdparm -y to put a drive to sleep does not work inside the VM. Doing the same on the proxmox console result in a sleep, but it wakes up a few seconds later.

Passing through the entire HBA is currently not an option.

I read in a forum that first installing Debian and then manually installing the proxmox packages resulted in a success. However that was still for Debian jessie and three years ago. Install Proxmox VE on Debian Stretch Before I try this as a last resort, I want to make sure if passing the disk through as a raw file will lead to the result.

Maybe someone has an idea on how to achieve my ultimate goal.

JAT
  • 21
  • 1
  • 5

1 Answers1

0

I do not have a clear answer to your question, as per "passing through" the disk, but i recently found a good enough solution for my use case.

I have an HDD that i planned to use as a backup dir for VMs, but i also wanted to put any kind of data on it, and share that disk with any VM that would like to.

The solution i found is to format the disk using ZFS, then creating mount points for different usage (vzdump backup, shared nas folder accross VMs + ISO mounting point etc...). I followed this guide: https://forum.level1techs.com/t/how-to-create-a-nas-using-zfs-and-proxmox-with-pictures/117375

I ended up installing samba on proxmox host itself, with a config to share some folder/mount point of the disk, via SMB. Now the device appears as a normal disk over the network, with excellent read/write speed as everything is local.

Sorry that this post does not "answer" your question (no SMART data or things low level like that :'( ) BUT shared storage ^^'

jav974
  • 1,022
  • 10
  • 22