Multiple Physical Drives in VM Guest

meluvalli

Member
Feb 19, 2012
18
0
21
Hello.

I have a VM and within the VM, I have the primary drive as a RAW image. I then added two physical drives to the VM using UUID. See below:

sata0: local-hd2:101/vm-101-disk-1.raw,size=40G
sata2: /dev/disk/by-uuid/F0DE690FDE68CF80,backup=no,size=410400M
sata3: /dev/disk/by-uuid/503C85DF3C85C088,backup=no,size=305000M


The problem I am having is in Windows, it shows Primary drive (C), but the other two drives (which are the same physical drive, just two partitions) keep changing... Sometimes SATA2 = Drive D and other times it = Drive E. This is causing problems with shares that I have setup in Windows.

I have to use the UUID because I sometimes add a USB drive to my server for backups and when I do this, it troughs off all the /dev/sdb, /dev/sdc settings... So, to get around this, I switched to UUID.

Any suggestions on how to resolve Windows from switching the drives around?

Thank you!
 
Hi,
have you tried to assign D/E again with the drivemgr in windows?

And what do you mean with same physical drive? Are behind the UUIDs two different disks with partitiontable and so on?

Udo

Thanks for the response. The hard drive is actually /dev/sdb. It has two partitions. Each partition has a UUID. To the best of my knowledge, there is no way to get the actual UUID of /dev/sdb. I had to get the UUID of each partition Ex: sdb1 and sdb2.

The odd thing is, in windows disk management, I can change the drive letter of one of them, but not the other. If I try to change the drive letter of the second one, I get an error in Windows saying that "The operation failed to complete because the Disk Management console view is not up-to-date. Refresh the view by using the refresh task. If the problem persists close the Disk Management console, then restart Disk Management or restart the computer." And of course, I have tried refresh, closing out, coming back in, and reboot and get the same error.

Also, the odd thing is, in Disk Management, it doesn't even show a drive letter assigned to the second on... But it's there in "Computer" AKA "My Computer".

Maybe the root of the problem is, I need to assign the drive just once using the actual drive UUID?? If so, how would I go about doing this?

Thank you so much!
 
there is no way to get the actual UUID of /dev/sdb.

You can, actually (by not using UUIDs). All you have to do is "ls -l /dev/disk/by-id/"

sample output:

Code:
root@prox1:~# ll /dev/disk/by-id/
total 0
lrwxrwxrwx 1 root root 10 Apr  3 04:23 dm-name-pve-data -> ../../dm-2
lrwxrwxrwx 1 root root 10 Apr  3 04:23 dm-name-pve-root -> ../../dm-0
lrwxrwxrwx 1 root root 10 Apr  3 04:23 dm-name-pve-swap -> ../../dm-1
lrwxrwxrwx 1 root root 10 Apr  3 04:23 dm-uuid-LVM-v32otOOyKt7JGgNLAeE8iEHN5KEZPvHudWfmmBKfgWiHsVKc2jWlCECOxaEWmqVP -> ../../dm-1
lrwxrwxrwx 1 root root 10 Apr  3 04:23 dm-uuid-LVM-v32otOOyKt7JGgNLAeE8iEHN5KEZPvHuLazUZu3WxucnV8NM0HN3okfAsWtS8jcb -> ../../dm-2
lrwxrwxrwx 1 root root 10 Apr  3 04:23 dm-uuid-LVM-v32otOOyKt7JGgNLAeE8iEHN5KEZPvHuyj4NLRuVYJadxhT0C2nhrsWZm3cFobln -> ../../dm-0
lrwxrwxrwx 1 root root  9 Apr  3 04:23 scsi-3600508b1001c6389114ecafd18fd9687 -> ../../sda
lrwxrwxrwx 1 root root 10 Apr  3 04:23 scsi-3600508b1001c6389114ecafd18fd9687-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Apr  3 04:23 scsi-3600508b1001c6389114ecafd18fd9687-part2 -> ../../sda2
lrwxrwxrwx 1 root root  9 Apr  3 04:23 wwn-0x600508b1001c6389 -> ../../sda
lrwxrwxrwx 1 root root 10 Apr  3 04:23 wwn-0x600508b1001c6389-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Apr  3 04:23 wwn-0x600508b1001c6389-part2 -> ../../sda2

You can see that these are merely links, so you can just grab the link pointing to the correct disk (sda in my sample). All youd have to figure out is whether to use the wwn or scsi identifier
 
Last edited:
You can, actually (by not using UUIDs). All you have to do is "ls -l /dev/disk/by-id/"

sample output:

Code:
root@prox1:~# ll /dev/disk/by-id/
total 0
lrwxrwxrwx 1 root root 10 Apr  3 04:23 dm-name-pve-data -> ../../dm-2
lrwxrwxrwx 1 root root 10 Apr  3 04:23 dm-name-pve-root -> ../../dm-0
lrwxrwxrwx 1 root root 10 Apr  3 04:23 dm-name-pve-swap -> ../../dm-1
lrwxrwxrwx 1 root root 10 Apr  3 04:23 dm-uuid-LVM-v32otOOyKt7JGgNLAeE8iEHN5KEZPvHudWfmmBKfgWiHsVKc2jWlCECOxaEWmqVP -> ../../dm-1
lrwxrwxrwx 1 root root 10 Apr  3 04:23 dm-uuid-LVM-v32otOOyKt7JGgNLAeE8iEHN5KEZPvHuLazUZu3WxucnV8NM0HN3okfAsWtS8jcb -> ../../dm-2
lrwxrwxrwx 1 root root 10 Apr  3 04:23 dm-uuid-LVM-v32otOOyKt7JGgNLAeE8iEHN5KEZPvHuyj4NLRuVYJadxhT0C2nhrsWZm3cFobln -> ../../dm-0
lrwxrwxrwx 1 root root  9 Apr  3 04:23 scsi-3600508b1001c6389114ecafd18fd9687 -> ../../sda
lrwxrwxrwx 1 root root 10 Apr  3 04:23 scsi-3600508b1001c6389114ecafd18fd9687-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Apr  3 04:23 scsi-3600508b1001c6389114ecafd18fd9687-part2 -> ../../sda2
lrwxrwxrwx 1 root root  9 Apr  3 04:23 wwn-0x600508b1001c6389 -> ../../sda
lrwxrwxrwx 1 root root 10 Apr  3 04:23 wwn-0x600508b1001c6389-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Apr  3 04:23 wwn-0x600508b1001c6389-part2 -> ../../sda2

You can see that these are merely links, so you can just grab the link pointing to the correct disk (sda in my sample). All youd have to figure out is whether to use the wwn or scsi identifier


Oh! Perfect! So I just added the drive using the below example:
sata1: /dev/disk/by-id/wwn-0x600508b1001c6389

And that seemed to fix my problem! Thank you so much!!!!!!
 

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!