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 982979 - Disable fstrim API/command in RHEL 6
Summary: Disable fstrim API/command in RHEL 6
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libguestfs
Version: 6.5
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Pino Toscano
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 983331 1088685 1088686
TreeView+ depends on / blocked
 
Reported: 2013-07-10 09:06 UTC by bfan
Modified: 2015-02-15 03:24 UTC (History)
4 users (show)

Fixed In Version: libguestfs-1.20.11-4.el6
Doc Type: Bug Fix
Doc Text:
Cause: The fstrim feature is marked as available. Consequence: Calling the fstrim API always results in errors. Fix: Mark the fstrim feature as not available, as fstrim is not going to work with the kernel and qemu available in RHEL 6. Result: The fstrim feature is not available, and calling the fstrim API reports that.
Clone Of:
: 983331 1088685 1088686 (view as bug list)
Environment:
Last Closed: 2014-10-14 06:34:50 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:1458 0 normal SHIPPED_LIVE libguestfs bug fix update 2014-10-14 01:10:57 UTC

Description bfan 2013-07-10 09:06:48 UTC
Description of problem:
fstrim and btrfs are not supported in RHEL 6, command 'supported' and 'available' has wrong output for them


Version-Release number of selected component (if applicable):
libguestfs-1.20.9-6.el6.x86_64


How reproducible:
100%


Steps to Reproduce:
><fs> supported
         acl yes
      augeas yes
       btrfs yes
      fstrim yes
       gdisk no
        grub yes
       hivex yes
     inotify yes
         ldm no
   linuxcaps yes
 linuxfsuuid yes
linuxmodules yes
 linuxxattrs yes
        luks yes
        lvm2 yes
       mdadm yes
       mknod yes
      ntfs3g yes
   ntfsprogs yes
    realpath yes
       rsync yes
       scrub yes
     selinux yes
      wipefs yes
         xfs no
          xz yes
    zerofree no

><fs> available fstrim
><fs> available btrfs


Actual result:
Commands does not give error for fstrim and btrfs


Expect result:
Commands should give error for fstrim and btrfs


Additional info:
Same issue in rhel7

Comment 1 Richard W.M. Jones 2013-07-18 13:50:02 UTC
I'm not convinced this is a real bug.

btrfs certainly *exists* on RHEL 6:

$ rpm -qf /lib/modules/2.6.32-358.6.2.el6.x86_64/kernel/fs/btrfs/btrfs.ko
kernel-2.6.32-358.6.2.el6.x86_64
$ rpm -qf /sbin/btrfs
btrfs-progs-0.20-0.2.git91d9eec.el6.x86_64

I'm sure it works as well on RHEL 6 as it does anywhere else,
which is to say, not very well.

fstrim exists on RHEL 6:

$ rpm -qf /sbin/fstrim
util-linux-ng-2.17.2-12.9.el6.x86_64

Maybe there is an issue with the use of the word "supported",
which is an unfortunate choice in the context of RHEL but
can't be changed for backwards compatibility reasons.

We could forcibly disable these in RHEL 6 & 7 on the basis
that they don't really work very well.  Especially on RHEL 6,
btrfs is likely to be broken and fstrim likely does nothing.

Comment 2 Richard W.M. Jones 2013-07-19 10:43:17 UTC
I discussed this with Matt and we agreed it would be
a regression if we were to disable btrfs (which "worked"
previously in RHEL 6).

However fstrim (a new command in libguestfs) can be disabled.

Comment 3 RHEL Program Management 2013-10-14 03:10:50 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 4 Richard W.M. Jones 2013-10-16 12:05:41 UTC
Kick this out to RHEL 6.6.  It's not so important.

Comment 6 Richard W.M. Jones 2014-03-12 14:28:08 UTC
Turns out that libguestfs's implementation of fstrim was
spectacularly broken.  The fix is:

https://github.com/libguestfs/libguestfs/commit/5e105e06be4cc6c88b5d3fc5cf79acb48947e197

However it's still unlikely that fstrim will work on
RHEL 6.  It requires more recent qemu, kernel & virtio-scsi
than we have in RHEL 6.  Thus there is still a case for
removing the API here.

Comment 8 bfan 2014-06-03 06:09:20 UTC
Verified with libguestfs-1.20.11-4.el6.x86_64, fstrim is not supported and available

><fs> supported
         acl yes
      augeas yes
       btrfs yes
      fstrim no
       gdisk no
        grub yes
       hivex yes
     inotify yes
         ldm no
   linuxcaps yes
 linuxfsuuid yes
linuxmodules yes
 linuxxattrs yes
        luks yes
        lvm2 yes
       mdadm yes
       mknod yes
      ntfs3g yes
   ntfsprogs yes
    realpath yes
       rsync yes
       scrub yes
     selinux yes
      wipefs yes
         xfs no
          xz yes
    zerofree no

><fs> available fstrim
libguestfs: error: available: fstrim: group not available

Comment 10 errata-xmlrpc 2014-10-14 06:34:50 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, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2014-1458.html


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