Disks not available in KVM guest

Hi,

I’m running a Rockstor instance in a KVM guest on my laptop to get comfortable with things before I move on to allocating physical hardware.  Actually, I’ll probably keep the virtual guest on my laptop to provide storage to an oVirt instance that I also run in another guest.  I can’t get any of the attached disks to come up.
[root@ipa01 ~]# /usr/bin/lsblk -P -o NAME,MODEL,SERIAL,SIZE,TRAN,VENDOR,HCTL,TYPE,FSTYPE,LABEL,UUID
NAME=“sda” MODEL=“QEMU HARDDISK   " SERIAL=“QM00005” SIZE=“12G” TRAN=“sata” VENDOR=“ATA     " HCTL=“2:0:0:0” TYPE=“disk” FSTYPE=”” LABEL="" UUID="“
NAME=“sda1” MODEL=”" SERIAL="" SIZE=“500M” TRAN="" VENDOR="" HCTL="" TYPE=“part” FSTYPE=“ext4” LABEL="" UUID=“b13bbda9-dfdb-4968-bd27-77567d388626"
NAME=“sda2” MODEL=”" SERIAL="" SIZE=“1.2G” TRAN="" VENDOR="" HCTL="" TYPE=“part” FSTYPE=“swap” LABEL="" UUID=“6b4a6800-0153-41e9-aaaa-d22b2e95be54"
NAME=“sda3” MODEL=”" SERIAL="" SIZE=“10.3G” TRAN="" VENDOR="" HCTL="" TYPE=“part” FSTYPE=“btrfs” LABEL=“rockstor_rockstor” UUID=“4d19d498-1868-471f-98b3-d67c0b74afea"
NAME=“sr0” MODEL=“QEMU DVD-ROM    " SERIAL=“QM00003” SIZE=“1024M” TRAN=“ata” VENDOR=“QEMU    " HCTL=“1:0:0:0” TYPE=“rom” FSTYPE=”” LABEL=”" UUID="“
NAME=“vda” MODEL=”" SERIAL="" SIZE=“512M” TRAN="" VENDOR=“0x1af4” HCTL="" TYPE=“disk” FSTYPE="" LABEL="" UUID="“
NAME=“vdb” MODEL=”" SERIAL="" SIZE=“512M” TRAN="" VENDOR=“0x1af4” HCTL="" TYPE=“disk” FSTYPE="" LABEL="" UUID="“
NAME=“vdc” MODEL=”" SERIAL="" SIZE=“512M” TRAN="" VENDOR=“0x1af4” HCTL="" TYPE=“disk” FSTYPE="" LABEL="" UUID="“
NAME=“vdd” MODEL=”" SERIAL="" SIZE=“512M” TRAN="" VENDOR=“0x1af4” HCTL="" TYPE=“disk” FSTYPE="" LABEL="" UUID="“
NAME=“vde” MODEL=”" SERIAL="" SIZE=“512M” TRAN="" VENDOR=“0x1af4” HCTL="" TYPE=“disk” FSTYPE="" LABEL="" UUID="“
NAME=“vdf” MODEL=”" SERIAL="" SIZE=“512M” TRAN="" VENDOR=“0x1af4” HCTL="" TYPE=“disk” FSTYPE="" LABEL="" UUID="“
NAME=“vdg” MODEL=”" SERIAL="" SIZE=“512M” TRAN="" VENDOR=“0x1af4” HCTL="" TYPE=“disk” FSTYPE="" LABEL="" UUID="“
NAME=“vdh” MODEL=”" SERIAL="" SIZE=“512M” TRAN="" VENDOR=“0x1af4” HCTL="" TYPE=“disk” FSTYPE="" LABEL="" UUID=""
[root@ipa01 ~]# 
I’ve made sure through virsh edit $MACHINE_NAME that there is a serial number associated with each drive attached.  Virtual Machine Manager displays this serial number in it’s configuration editor.  But when I get through to the actual Rockstor OS, I see no serial numbers.
I thought Rockstor could cope with blank serial numbers for a start, but I’m not sure why the serial number I have allocated is not being passed through.

These disks are all logical volumes created on my host OS with names:

lv_rockstor01
lv_rockstor02
lv_rockstor03
etc



Thanks for lsblk output, very helpful.

Does the web-ui show any disks? Ideally, you should still see your disks vda through vdh in the storage -> disks screen, but with a warning about serial numbers.

I don’t run Rockstor over kvm, but some users have run into a similar issuewith vmware and fixed it in configuration to assign serial numbers.

 Hi,

The WebUI shows only my rockstar-rockstar disk which the main OS sits on.
I’ve just changed the type of disks from VirtIO to VirtIO SCSI disk.  It’s changed the lsblk output:
[root@ipa01 ~]# /usr/bin/lsblk -P -o NAME,MODEL,SERIAL,SIZE,TRAN,VENDOR,HCTL,TYPE,FSTYPE,LABEL,UUID
NAME=“sda” MODEL=“QEMU HARDDISK   " SERIAL=“drive-scsi0-0-0-2” SIZE=“512M” TRAN=”" VENDOR=“QEMU    " HCTL=“14:0:0:2” TYPE=“disk” FSTYPE=”" LABEL="" UUID="“
NAME=“sdb” MODEL=“QEMU HARDDISK   " SERIAL=“drive-scsi0-0-0-1” SIZE=“512M” TRAN=”” VENDOR=“QEMU    " HCTL=“14:0:0:1” TYPE=“disk” FSTYPE=”" LABEL="" UUID="“
NAME=“sdc” MODEL=“QEMU HARDDISK   " SERIAL=“QM00005” SIZE=“12G” TRAN=“sata” VENDOR=“ATA     " HCTL=“2:0:0:0” TYPE=“disk” FSTYPE=”” LABEL=”" UUID="“
NAME=“sdc1” MODEL=”" SERIAL="" SIZE=“500M” TRAN="" VENDOR="" HCTL="" TYPE=“part” FSTYPE=“ext4” LABEL="" UUID=“b13bbda9-dfdb-4968-bd27-77567d388626"
NAME=“sdc2” MODEL=”" SERIAL="" SIZE=“1.2G” TRAN="" VENDOR="" HCTL="" TYPE=“part” FSTYPE=“swap” LABEL="" UUID=“6b4a6800-0153-41e9-aaaa-d22b2e95be54"
NAME=“sdc3” MODEL=”" SERIAL="" SIZE=“10.3G” TRAN="" VENDOR="" HCTL="" TYPE=“part” FSTYPE=“btrfs” LABEL=“rockstor_rockstor” UUID=“4d19d498-1868-471f-98b3-d67c0b74afea"
NAME=“sr0” MODEL=“QEMU DVD-ROM    " SERIAL=“QM00003” SIZE=“1024M” TRAN=“ata” VENDOR=“QEMU    " HCTL=“1:0:0:0” TYPE=“rom” FSTYPE=”” LABEL=”" UUID=""
[root@ipa01 ~]# 

I’ve only re-connected 2 of the drives at this point to test.  I’m now getting a serial number (although not something that looks overly unique), but still nothing in the WebUI.

You are probably expecting the web-ui to show sda and sdb. But they are only 512MB. Rockstor ignores anything less than 1GB. Can you bump up the size and try?

Ha - no problem.  I only selected 512Mb as I was trying to use as little space as possible to play about with at the moment. :slight_smile:

Thanks for that - 1Gb drives are recognised properly and are now available.  They do have the

"Warning! Disk serial number or UUID is not legitimate or unique.
message in the WebUI still, although I’m pretty sure I allocated Serial Numbers to each of the disks:

[root@ipa01 ~]# /usr/bin/lsblk -P -o NAME,MODEL,SERIAL,SIZE,TRAN,VENDOR,HCTL,TYPE,FSTYPE,LABEL,UUID
NAME=“sda” MODEL=“QEMU HARDDISK   " SERIAL=“QM00005” SIZE=“12G” TRAN=“sata” VENDOR=“ATA     " HCTL=“2:0:0:0” TYPE=“disk” FSTYPE=”” LABEL=”" UUID="“
NAME=“sda1” MODEL=”" SERIAL="" SIZE=“500M” TRAN="" VENDOR="" HCTL="" TYPE=“part” FSTYPE=“ext4” LABEL="" UUID=“b13bbda9-dfdb-4968-bd27-77567d388626"
NAME=“sda2” MODEL=”" SERIAL="" SIZE=“1.2G” TRAN="" VENDOR="" HCTL="" TYPE=“part” FSTYPE=“swap” LABEL="" UUID=“6b4a6800-0153-41e9-aaaa-d22b2e95be54"
NAME=“sda3” MODEL=”" SERIAL="" SIZE=“10.3G” TRAN="" VENDOR="" HCTL="" TYPE=“part” FSTYPE=“btrfs” LABEL=“rockstor_rockstor” UUID=“4d19d498-1868-471f-98b3-d67c0b74afea"
NAME=“sr0” MODEL=“QEMU DVD-ROM    " SERIAL=“QM00003” SIZE=“1024M” TRAN=“ata” VENDOR=“QEMU    " HCTL=“1:0:0:0” TYPE=“rom” FSTYPE=”” LABEL=”" UUID="“
NAME=“vda” MODEL=”" SERIAL="" SIZE=“1G” TRAN="" VENDOR=“0x1af4” HCTL="" TYPE=“disk” FSTYPE=“btrfs” LABEL=“test” UUID=“603d5e32-5561-4011-8bff-840a1791488d"
NAME=“vdb” MODEL=”" SERIAL="" SIZE=“1G” TRAN="" VENDOR=“0x1af4” HCTL="" TYPE=“disk” FSTYPE=“btrfs” LABEL=“test” UUID=“603d5e32-5561-4011-8bff-840a1791488d"
NAME=“vdc” MODEL=”" SERIAL="" SIZE=“1G” TRAN="" VENDOR=“0x1af4” HCTL="" TYPE=“disk” FSTYPE=“btrfs” LABEL=“test” UUID=“603d5e32-5561-4011-8bff-840a1791488d"
NAME=“vdd” MODEL=”" SERIAL="" SIZE=“1G” TRAN="" VENDOR=“0x1af4” HCTL="" TYPE=“disk” FSTYPE=“btrfs” LABEL=“test” UUID=“603d5e32-5561-4011-8bff-840a1791488d”
[root@ipa01 ~]#

(by this point, I’ve already put the vdX disks in the pool “test”), but the SERIAL seems unset, despite showing a Serial Number for each of the disks in Virtual Machine Manager
The xml file for my libvirt machine shows the disks as:

 
 
 
  vm_rockstor01
 
 
 
 
  vm_rockstor02
 
 
 
 
  vm_rockstor03
 
 
 
 
  vm_rockstor04
 

So I'm not sure why the lsblk output is showing blank Serial Numbers.

Sorry, I don’t have Rockstor on kvm here to test your scenario. I’ll certainly come back and post if/when I play with rockstor+kvm. Perhaps someone else in the community can help?

On the issue:

"Warning! Disk serial number or UUID is not legitimate or unique"

could it be the block devices (/dev/rhel/vm_rockstor0X) you use for KVM as disks are copies of the same file or something ?

Because in your lsblk output it says all vdX’s have the same:
UUID=“603d5e32-5561-4011-8bff-840a1791488d”

Hadn’t noticed that - good spot.

They’re all created as separate Logical Volumes which are then attached to the guest as virtual disks.  I don’t use plain files for disk storage:
[root@laptop ~]# vgs
  VG   #PV #LV #SN Attr   VSize   VFree
  rhel   1  23   0 wz–n- 465.26g 11.31g
[root@laptop ~]# lvs
  LV                     VG   Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  home                   rhel -wi-ao----  62.50g
  opt                    rhel -wi-ao----   3.91g
  root                   rhel -wi-ao----  50.00g
  swap                   rhel -wi-ao----   7.82g
  tmp                    rhel -wi-ao----   3.91g
  var                    rhel -wi-ao----  19.81g
  var_lib_elasticsearch  rhel -wi-ao----  31.25g
  var_lib_libvirt_images rhel -wi-ao---- 125.00g
  var_log                rhel -wi-ao----   3.91g
  var_log_audit          rhel -wi-ao----   3.91g
  vm_foreman             rhel -wi-a-----  12.00g
  vm_ipa01               rhel -wi-a-----  11.94g
  vm_katello             rhel -wi-a-----  70.00g
  vm_log01               rhel -wi-a-----  28.00g
  vm_log02               rhel -wi-a-----  12.00g
  vm_rockstor01          rhel -wi-a-----   1.00g
  vm_rockstor02          rhel -wi-a-----   1.00g
  vm_rockstor03          rhel -wi-a-----   1.00g
  vm_rockstor04          rhel -wi-a-----   1.00g
  vm_rockstor05          rhel -wi-a-----   1.00g
  vm_rockstor06          rhel -wi-a-----   1.00g
  vm_rockstor07          rhel -wi-a-----   1.00g
  vm_rockstor08          rhel -wi-a-----   1.00g
[root@laptop ~]#