How to figure out the physical disk passed through to a VM

Chris Thompson

Active Member
Aug 23, 2018
13
3
43
54
Yokosuka, Japan
I'm not sure if I should post this here or over on the TrueNAS community. I'm running TrueNAS (formerly FreeNAS) as a VM on my Proxmox host. I know, this isn't a best practice (I need a completely self contained environment for a testing/development environment on one server). Using this guide, I was able to pass-thru two physical harddrives to the TrueNAS VM and setup a ZFS mirror pool. It works great for what it's intended to do.

Only issue I'm trying to find a solution for is how I associate the physical drives in Proxmox with the drives as seen by TrueNAS. Using the aforementioned guide, I passed through the drives based on their /dev/disk/by-id/xxxxx designation (with xxxx being the unique disk identifier). Unfortunately, since I'm not passing through the disk controller, only the disks themselves, TrueNAS still seems to not see all the characteristics of the drives (such as the unique disk identifier or smart status):
1616972355425.png

I'm ok with not having the smart status or other details as I get all of this from Proxmox. However, what I do need to understand is if I had a drive failure, how would I correlated the failure as reported in TrueNAS (drives identified as "da1" and "da2") with the physical drive in Proxmox ("sdb" and "sdc"). So far, none of the commands I can issue in the TrueNAS FreeBSD terminal result in anything that would correlated to the drives as seen by Proxmox.

Here is the link to the aforementioned guide that I used to pass the drives through to the TrueNAS VM:
https://pve.proxmox.com/wiki/Passthrough_Physical_Disk_to_Virtual_Machine_(VM)

Thanks so very much. I appreciate the help. If it makes more sense for me to pursue this with the TrueNAS community, I'm happy to do so.
 
Last edited:
Ok, I've been able to answer my own question. Didn't do my homework. But hopefully this helps someone in the future. I found that when I issued the "blkid" command on the Proxmox CLI that the "UUID_SUB" details line up with what is shown in TrueNAS under disk details for the "GUID". So there is a correlation between Proxmox "UUID_SUB" and TrueNAS "GUID". Using these details, I can determine what the physical drive is in Proxmox.

TrueNAS:
1616974058950.png

Proxmox CLI:
1616974236790.png
 
Ok, I've been able to answer my own question. Didn't do my homework. But hopefully this helps someone in the future. I found that when I issued the "blkid" command on the Proxmox CLI that the "UUID_SUB" details line up with what is shown in TrueNAS under disk details for the "GUID". So there is a correlation between Proxmox "UUID_SUB" and TrueNAS "GUID". Using these details, I can determine what the physical drive is in Proxmox.

TrueNAS:
View attachment 24830

Proxmox CLI:
View attachment 24831
You've helped me tremendously with this info.
I've also created a freenas VM within Proxmox (Since I started my home lab and haven't changed over to a dedicated TrueNAS server because it just works).
Recently I had to make a few drive changes (size increase and failed drive) and I've been narrowing it down to a few drive types but no way of figuring out which drive it is by Serial #.
This was all I've been missing from my process. Thank you for the missing piece!
 
Same for me.
Appreciate this as I am expenology with a disk that went belly up. Same virtual qemu in the nas gui and its not likely I would guess the correct disk out of 5.
 

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!