[Solved] No SMART data for VIRTIO devices?


Recommended Posts

I've set up a new Slackware test VM and did add a raw disk as:

 

    <disk type='block' device='disk'>
      <driver name='qemu' type='raw' cache='writeback'/>
      <source dev='/dev/disk/by-id/ata-WDC_WD60EFRX-68L0BN1_WD-WX21DC5J23S0' index='1'/>
      <backingStore/>
      <target dev='hdc' bus='virtio'/>
      <serial>WX21DC5J23S0</serial>
      <alias name='virtio-disk1'/>
      <address type='pci' domain='0x0000' bus='0x1e' slot='0x00' function='0x0'/>
    </disk>

 

The performance within the VM is really good. But I can't read SMART values for this disk and this disk never spins down - even when using smartctl/hdparm.

 

I tried to add different parameters (-d sat, -d scsi, ...) to smartctl but nothing works.

 

Is there really no way to work with smartctl or hdparm on VIRTIO devices? Do I need to switch to a SATA or SCSI bus?

 

Thanks in advance.

 

 

Edited by hawihoney
Link to comment

Follow-Up:

 

SMART and HDPARM don't work on a passed through disk - even with bus=sata:

 

    <disk type='block' device='disk'>
      <driver name='qemu' type='raw' cache='writeback'/>
      <source dev='/dev/disk/by-id/ata-WDC_WD6003FFBX-68MU3N0_V8GDLSNR'/>
	  <serial>V8GDLSNR</serial>
      <target dev='hdd' bus='sata'/>
      <address type='drive' controller='0' bus='0' target='0' unit='3'/>
    </disk>

 

Is there really no way for a guest (VM) to check SMART values and spindown/spinup a passed through raw disk? I can't believe that ...

 

What am I doing wrong?

 

Link to comment
  • hawihoney changed the title to [Solved] No SMART data for VIRTIO devices?
1 hour ago, SimonF said:

Did you find a solution?

 

No. I found that this is simply not possible for individual disks. According to my findings the host is responsive for SMART and Spindown.

 

I kept it that way, marked the passed through disks as "passed through" within Unassigned Devices of the host. The host spins them down and shows SMART values. The guest spins them up, if required.

 

As I said, thats the fact for individual disks. If you pass through an HBA, its drives will be handled from the guest instead.

 

It's not what I did expect, but I can live with it.

 

Edited by hawihoney
  • Thanks 1
Link to comment
  • 1 year later...

Sorry for opening this thread again, but i have a similar issue but my disks spins down and i don't want it to, i installed unassigned devices and set the disk to "pass through" but i still cannot control the spin up/down from the settings page of the disk where as other disks that are in my array i have the option, see screenshots below:

 

Passed through disk:

image.thumb.png.80eb3fac0263360b04e6e935ccf557ee.png

 

disk in unraid array:

image.thumb.png.028b9bd613b8505d248f3da69007c783.png

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.