Passing a disk through to an OpenMediaVault VM

KirstyA

Active Member
Oct 16, 2018
11
0
41
62
Hi, I have an OMV setup as a QEMU virtual machine in Proxmox.
I want to pass through a physical disk to the virtual machine.
I have the command to do that:-

qm set 104 -virtio2 /dev/disk/by-id/ata-WDC_WD6003FFBX-68MU3N0_V8G3xxxx

I should also say that I created 2 partitions first on this disk, 1x 5TB and 1x 1TB, and want to format and use them as ext4 with OMV.
I have no need and no intention of using LVM for this particular drive as I don't intend to partition or extend it further. It is only going to be used to store data, no VM's or anything else.

The reason I am passing through like this is for easy recovery of data on another machine as it will be just pure ext4.

After running the above command and rebooting the QM virtual machine OMV it does indeed see the new drive, but not the partitions, just 1x 6TB drive.

I noticed that when I did a 'grep' on the disk from the command line it showed the whole disk, and the two partitions:-

root@pmx-1:~# ls -l /dev/disk/by-id | grep V8G3xxxx
lrwxrwxrwx 1 root root 9 Jan 27 19:04 ata-WDC_WD6003FFBX-68MU3N0_V8G3xxxx -> ../../sdb
lrwxrwxrwx 1 root root 10 Jan 27 19:04 ata-WDC_WD6003FFBX-68MU3N0_V8G3xxxx-part1 -> ../../sdb1
lrwxrwxrwx 1 root root 10 Jan 27 19:04 ata-WDC_WD6003FFBX-68MU3N0_V8G3xxxx-part2 -> ../../sdb2
root@pmx-1:~#


I'm thinking that I should be adding 2 lines to my OMV virtual machine and supplying the '. . . . -part1' and '. . . . -part2' instead of the entire drive.

Any comments on this anyone?

p.s. i'm not using just sbd/sdb1/sdb2/ as these ID's can change if I take the drive out and mount it elsewhere, hence using the drive's unique identifier.
 
Your using the right command.
Can you wipe the HDD from inside OMV and re-partition from there?
I'm using 3 HDD with FreeNAS with your same method and I was able to install and use ZFS on them without an issue.
Are you using any RAID controller for the HDD?
 
  • Like
Reactions: KirstyA
I cannot see any way of doing it from the GUI. I might be able to do it from the command line.
I have gone ahead and added the 2 lines into my VM 'conf' file for the 2 partitions.
This does seem to work perfectly. They show up in OMV as dev/vda1 and dev/vdb1, (virtual disks I guess).
I have formatted them both as ext4 and transferred 130GB to one so far, at a speed of approx 70MB/s for random files and 112MB/s for large zip files.
That's quite impressive considering all file transfers are from single mechanical hard disk to single mechanical hard disk over a gigabit network link.

No RAID for hard disk. All the data is going to be rsync'ed to a second and third OpenMediaVault, plus an external USB SSD backup.
All ext4 for easy data recovery in case of a system failure.
I am using LVM for the virtual machines, but not the data.
 

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!