RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1152037 - RFE: use virtio-scsi disk bus with discard='unmap' for guests that support it
Summary: RFE: use virtio-scsi disk bus with discard='unmap' for guests that support it
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: gnome-boxes
Version: 8.3
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: rc
: 8.3
Assignee: Felipe Borges
QA Contact: Radek Duda
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-10-13 11:39 UTC by David Jaša
Modified: 2021-05-18 14:38 UTC (History)
6 users (show)

Fixed In Version: gnome-boxes-3.36.5-8.el8
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-05-18 14:38:08 UTC
Type: Feature Request
Target Upstream Version:
Embargoed:
feborges: needinfo-


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
GNOME Bugzilla 738444 0 Normal RESOLVED Use virtio-scsi rather than virtio-blk 2021-01-22 09:09:47 UTC

Description David Jaša 2014-10-13 11:39:46 UTC
Description of problem:
gnome-boxes by default uses virtio-blk disks backed by qcow2 files stored in home directories. It would be nice to use virtio-scsi disks by default with "<driver ... discard='unmap'/>" option tuned on for guests that support virtio-scsi (IIRC RHEL >= 6.4, RHEL 7, Windows >= 7 with virtio drivers). That way, valuable space in user's home can be conserved:

## backing file usage on host
$ du -sm .local/share/gnome-boxes/images/rhel7.0 
8820	.local/share/gnome-boxes/images/rhel7.0
## run fstrim in the guest:
[root@rhel7 ~]# fstrim -v /
/: 2.4 GiB (2528993280 bytes) trimmed
## backing file usage after guest's fstrim
[djasa@cihla ~]$ du -sm .local/share/gnome-boxes/images/rhel7.0 
6768	.local/share/gnome-boxes/images/rhel7.0

Note that Windows 7 by default issue discards without user intervention, in RHEL (and IIRC Fedora as well), you either have to set up a cron job for fstrim or add "discards" to mount options


Version-Release number of selected component (if applicable):
gnome-boxes-3.8.3-9.el7.x86_64

How reproducible:
always

Steps to Reproduce:
1. install a guest that supports virtio-scsi
2. inspect domain xml for the VM
3.

Actual results:
virtio-blk is used

Expected results:
virtio-scsi with discard='unmap' is configured

Additional info:

Comment 1 Vladimir Benes 2015-05-06 11:45:06 UTC
still unfixed in 3.14, would it be possible to implement it or do we need to file it upstream first?

Comment 3 Zeeshan Ali 2020-04-14 09:53:57 UTC
I don't know and I'm not responsible any more (I hope) for Boxes so moving over to Felipe. :)

Comment 6 Felipe Borges 2020-11-02 14:57:16 UTC
Ever since QEMU 4.0, virtio-blk disks have gained discard support[0]. For this reason, we don't need to migrate to virtio-scsi to benefit from discard support.

I proposed changes to make Boxes pass discard=unmap for virtio-blk disks drivers. This should suffice to fix this bugzilla.

You can verify that this works by checking the presence of "<driver ... discard='unmap'/>" in the disk driver node.

[0] https://bugzilla.redhat.com/1672680

Comment 11 errata-xmlrpc 2021-05-18 14:38:08 UTC
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 (Moderate: GNOME security, 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/RHSA-2021:1586


Note You need to log in before you can comment on or make changes to this bug.