Bug 1498955
| Summary: | RFE: option to mark virtual block device as rotational/non-rotational | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux Advanced Virtualization | Reporter: | Daniel Berrangé <berrange> |
| Component: | libvirt | Assignee: | Daniel Berrangé <berrange> |
| Status: | CLOSED ERRATA | QA Contact: | Han Han <hhan> |
| Severity: | high | Docs Contact: | |
| Priority: | high | ||
| Version: | 8.0 | CC: | berrange, coli, dyuan, eblake, jdenemar, jsuchane, kchamart, knoel, mailinglists35, markmc, qinwang, rbalakri, rkant, thomas, virt-bugs, virt-maint, xuzhang |
| Target Milestone: | rc | Keywords: | FutureFeature, Reopened, Triaged |
| Target Release: | 8.0 | Flags: | areis:
mirror+
|
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | libvirt-7.3.0-1.el8 | Doc Type: | Enhancement |
| Doc Text: | Story Points: | --- | |
| Clone Of: | 1498042 | Environment: | |
| Last Closed: | 2021-11-16 07:49:54 UTC | Type: | Feature Request |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | 7.3.0 |
| Embargoed: | |||
| Bug Depends On: | 1498042, 1664302 | ||
| Bug Blocks: | |||
|
Description
Daniel Berrangé
2017-10-05 15:47:01 UTC
In order to implement this properly, libvirt needs to be able to QAPI introspect device options. Once we can query for the rotation_rate property, it's fairly simple to expose it as an attribute within the XML. *** Bug 1595931 has been marked as a duplicate of this bug. *** After evaluating this issue, there are no plans to address it further or fix it in an upcoming release. Therefore, it is being closed. If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened. Support for setting rotation rate is proposed here https://listman.redhat.com/archives/libvir-list/2021-March/msg01438.html This is now merged upstream
commit 8dac0ca1b259c53d09983fe09f935baa18eb416c
Author: Daniel P. Berrangé <berrange>
Date: Wed Mar 31 10:17:07 2021 +0100
qemu: implement setting of rotation rate for SCSI/IDE disks
This is available in QEMU with "ide-hd" and "scsi-hd" device
types. It was originally mistakenly added to the "scsi-block"
device type too, but later removed. This doesn't affect libvirt
since we restrict usage to device=disk.
When this property is not set then QEMU's default behaviour
is to not report any rotation rate information, which
causes most guest OS to assume rotational storage.
https://bugzilla.redhat.com/show_bug.cgi?id=1498955
Reviewed-by: Ján Tomko <jtomko>
Signed-off-by: Daniel P. Berrangé <berrange>
commit feac14fa2e7cc737a0f5920fab531602703d2a13
Author: Daniel P. Berrangé <berrange>
Date: Wed Mar 31 10:14:12 2021 +0100
conf: add support for disk "rotation_rate" property
This lets the app expose the virtual SCSI or IDE disks as solid state
devices by setting a rate of '1', or rotational media by setting a
rate between 1025 and 65534.
https://bugzilla.redhat.com/show_bug.cgi?id=1498955
Reviewed-by: Ján Tomko <jtomko>
Signed-off-by: Daniel P. Berrangé <berrange>
This will become part of a future 7.3.0 libvirt release, so will get it automatically upon a rebase.
Test on libvirt-7.3.0-1.module+el8.5.0+11004+f4810536.x86_64 qemu-kvm-6.0.0-16.module+el8.5.0+10848+2dccc46d.x86_64
Steps
1. Start VM with ide/sata disk and set the rotation_rate
<disk type='file' device='disk'>
<driver name='qemu' type='raw'/>
<source file='/var/lib/libvirt/images/hda' index='2'/>
<backingStore/>
<target dev='hda' bus='ide' rotation_rate='5400'/>
<alias name='ide0-0-0'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
<disk type='file' device='disk'>
<driver name='qemu' type='raw'/>
<source file='/var/lib/libvirt/images/sdb' index='1'/>
<backingStore/>
<target dev='sdb' bus='sata' rotation_rate='5500'/>
<alias name='sata0-0-1'/>
<address type='drive' controller='0' bus='0' target='0' unit='1'/>
</disk>
2. Hot-plug scsi disk with rotation_rate
3. Check the rotation_rate inside the VM by `smartctl -i /dev/sdX`
All pass
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (virt:av bug fix and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2021:4684 |