Open jamesmarkchan opened 10 months ago
@jslcom can you help test? The first two commits https://github.com/jDiskMark/jdm-java/commit/5d69014b0eca79588a7fcd9d3cbd6f876dca2c70 https://github.com/jDiskMark/jdm-java/commit/aa5eabd0ff18522f9eb482657995f31392025cad may have resolved this issue but I don't have a LVM or RAID to verify.
This from @jslcom
James,
These three commands can provide hardware information, but in the case of a VM, the hypervisor only provides what it provides, and the child VM cannot probe.
hdparm -i /dev/vda
/dev/vda: HDIO_GET_IDENTITY failed: Inappropriate ioctl for device
hwinfo --disk 31: IDE 200.0: 10600 Disk
[Created at block.245] Unique ID: 3OOL.2crQejDA7N7 Parent ID: w7Y8.Uq6XLWd5W43 SysFS ID: /class/block/sda SysFS BusID: 2:0:0:0 SysFS Device Link: /devices/pci0000:00/0000:00:1f.2/ata2/host2/target2:0:0/2:0:0:0 Hardware Class: disk Model: "QEMU HARDDISK" Vendor: "QEMU" Device: "HARDDISK" Revision: "2.5+" Serial ID: "QM00003" Driver: "ahci", "sd" Driver Modules: "ahci" Device File: /dev/sda Device Files: /dev/sda, /dev/disk/by-id/ata-QEMU_HARDDISK_QM00003, /dev/disk/by-path/pci-0000:00:1f.2-ata-2.0, /dev/disk/by-path/pci-0000:00:1f.2-ata-2 Device Number: block 8:0-8:15 Geometry (Logical): CHS 31201/255/63 Size: 501253132 sectors a 512 bytes Capacity: 239 GB (256641603584 bytes) Config Status: cfg=new, avail=yes, need=no, active=unknown Attached to: #3 (SATA controller)32: None 00.0: 10600 Disk [Created at block.245] Unique ID: KSbE.Fxp0d3BezAE Parent ID: VNR8.+FFPFBVXZu6 SysFS ID: /class/block/vda SysFS BusID: virtio2 SysFS Device Link: /devices/pci0000:00/0000:00:02.2/0000:03:00.0/virtio2 Hardware Class: disk Model: "Disk" Driver: "virtio-pci", "virtio_blk" Device File: /dev/vda Device Files: /dev/vda, /dev/disk/by-path/virtio-pci-0000:03:00.0, /dev/disk/by-path/pci-0000:03:00.0 Device Number: block 253:0-253:15 Geometry (Logical): CHS 83220/16/63 Size: 83886080 sectors a 512 bytes Capacity: 40 GB (42949672960 bytes) Config Status: cfg=new, avail=yes, need=no, active=unknown Attached to: #26 (Storage controller)
lshw -class disk -virtio2
description: Virtual I/O device physical id: 0 bus info: virtio@2 logical name: /dev/vda size: 40GiB (42GB) capabilities: gpt-1.00 partitioned partitioned:gpt configuration: driver=virtio_blk guid=25eb1824-43fa-4bdd-9e14-6a83fb388003 logicalsectorsize=512 sectorsize=512 -cdrom description: DVD reader product: QEMU DVD-ROM vendor: QEMU physical id: 0 bus info: scsi@1:0.0.0 logical name: /dev/cdrom logical name: /dev/sr0 logical name: /media/laing/Ubuntu 22.04.1 LTS amd64 version: 2.5+ capabilities: removable audio dvd configuration: ansiversion=5 mount.fstype=iso9660 mount.options=ro,nosuid,nodev,relatime,nojoliet,check=s,map=n,blocksize=2048,uid=1000,gid=1000,dmode=500,fmode=400,iocharset=utf8 state=mounted status=ready -medium physical id: 0 logical name: /dev/cdrom logical name: /media/laing/Ubuntu 22.04.1 LTS amd64 capabilities: gpt-1.00 partitioned partitioned:gpt configuration: guid=9240a165-d190-4ab6-8a10-46dc207b42ee mount.fstype=iso9660 mount.options=ro,nosuid,nodev,relatime,nojoliet,check=s,map=n,blocksize=2048,uid=1000,gid=1000,dmode=500,fmode=400,iocharset=utf8 state=mounted -disk description: ATA Disk product: QEMU HARDDISK physical id: 1 bus info: scsi@2:0.0.0 logical name: /dev/sda version: 2.5+ serial: QM00003 size: 239GiB (256GB) capabilities: partitioned partitioned:dos configuration: ansiversion=5 logicalsectorsize=512 sectorsize=512
Steps to create LVM in Linux. (For posterity because it really doesn't make sense to run a benchmark on a LVM.)
pvcreate /dev/sda1 pvcreate /dev/vdb1 pvcreate /dev/vdb2 pvs vgcreate LVMvgTEST /dev/sda1 /dev/vdb1 /dev/vdb2 pvs lvcreate --type linear -L 300G --name LVM01 LVMvgTEST mkfs -t ext4 /dev/LVMvgTEST/LVM01 e2label /dev/LVMvgTEST/LVM01 LVM01 mkdir /LVM01 mount /dev/LVMvgTEST/LVM01 /LVM01
pvs PV VG Fmt Attr PSize PFree /dev/sda1 LVMvgTEST lvm2 a-- 239.01g 0 /dev/vdb1 LVMvgTEST lvm2 a-- <50.00g 0 /dev/vdb2 LVMvgTEST lvm2 a-- <50.00g 39.00g
vgs VG #PV #LV #SN Attr VSize VFree LVMvgTEST 3 1 0 wz--n- 339.00g 39.00g
df Filesystem 1K-blocks Used Available Use% Mounted on tmpfs 812356 1596 810760 1% /run /dev/vda3 40453376 22515520 15850740 59% / tmpfs 4061768 0 4061768 0% /dev/shm tmpfs 5120 4 5116 1% /run/lock /dev/vda2 524252 6220 518032 2% /boot/efi tmpfs 812352 96 812256 1% /run/user/1000 /dev/mapper/LVMvgTEST-LVM01 308521792 28 292776740 1% /LVM01
@jslcom noticed that drive info detection does not handle multiple drives in the case for Linux LVM or RAID partitions. It will just return the first physical drive name found.