public inbox for pve-user@lists.proxmox.com
 help / color / mirror / Atom feed
From: Chris Hofstaedtler | Deduktiva <chris.hofstaedtler@deduktiva.com>
To: Proxmox VE user list <pve-user@lists.proxmox.com>
Subject: Re: [PVE-User] Matching WUI VM hardware disks to Linux guest disks
Date: Tue, 10 Nov 2020 10:53:31 +0100	[thread overview]
Message-ID: <20201110095331.rq2nwbvk26izj6r2@zeha.at> (raw)
In-Reply-To: <mailman.377.1604995422.377.pve-user@lists.proxmox.com>

Hi,

* Eneko Lacunza via pve-user <pve-user@lists.proxmox.com> [201110 09:03]:
> I have hit a simple problem. Let be a VM with 3 disks, with .conf extract:
> 
> scsi0: ceph-proxmox:vm-100-disk-1,cache=writeback,size=6G
> scsi1: ceph-proxmox:vm-100-disk-0,cache=writeback,size=400G
> scsi2: ceph-proxmox:vm-100-disk-3,cache=writeback,size=400G
> 
> We have two virtual disks with identical size (400G).
> 
> How can I be sure what device on Linux guest is each?

You can also check - and use in /etc/fstab - the /dev/disk/by-*
symlinks.

In a VM, maybe the most relevant "id" is the actual path.
/dev/disk/by-path has these links (in my case):

  pci-0000:06:05.0-scsi-0:0:0:0 -> sda
  pci-0000:00:05.0-scsi-0:0:0:1 -> sdb

If your sdb/sdc are swapped, the SCSI IDs in the path should still
be correct.

If you don't like the pci path in there, /dev/disk/by-id has:
  scsi-0QEMU_QEMU_HARDDISK_drive-scsi0 -> sda
  scsi-0QEMU_QEMU_HARDDISK_drive-scsi1 -> sdb

But you'll have to check if those match with the VM settings (I'd
expect them to).

As you've discovered and others have said, lsscsi, or lsblk -S can
be used to see the SCSI IDs, too. The same info is also availabe
from udevadm: udevadm info /dev/sda
If you dig around in /sys, it's also there ;-)

HTH,
Chris
-- 
Chris Hofstaedtler / Deduktiva GmbH (FN 418592 b, HG Wien)
www.deduktiva.com / +43 1 353 1707



      parent reply	other threads:[~2020-11-10  9:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.377.1604995422.377.pve-user@lists.proxmox.com>
2020-11-10  9:26 ` Dominik Csapak
2020-11-10  9:53 ` Chris Hofstaedtler | Deduktiva [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201110095331.rq2nwbvk26izj6r2@zeha.at \
    --to=chris.hofstaedtler@deduktiva.com \
    --cc=pve-user@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal