Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1366456 - Converting rhel7 host installed on RAID:warning: fstrim: fstrim: /sysroot/: the discard operation is not supported
Converting rhel7 host installed on RAID:warning: fstrim: fstrim: /sysroot/: t...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libguestfs (Show other bugs)
7.3
Unspecified Unspecified
low Severity low
: rc
: ---
Assigned To: Richard W.M. Jones
Virtualization Bugs
V2V
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-08-11 23:08 EDT by tingting zheng
Modified: 2016-11-03 14:03 EDT (History)
7 users (show)

See Also:
Fixed In Version: libguestfs-1.32.7-2.el7
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-11-03 14:03:35 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Detailed log info from virt-v2v (867.42 KB, text/plain)
2016-08-11 23:08 EDT, tingting zheng
no flags Details
screenshot from virt-p2v client (378.61 KB, image/jpeg)
2016-08-12 05:19 EDT, tingting zheng
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2016:2576 normal SHIPPED_LIVE Moderate: libguestfs and virt-p2v security, bug fix, and enhancement update 2016-11-03 08:06:51 EDT

  None (edit)
Description tingting zheng 2016-08-11 23:08:37 EDT
Created attachment 1190247 [details]
Detailed log info from virt-v2v

Description of problem:
The below warning shows when converting a host installed on RAID.
warning: fstrim: fstrim: /sysroot/: the discard operation is not supported

Version-Release number of selected component (if applicable):
libguestfs-1.32.6-5.el7
virt-v2v-1.32.6-5.el7
virt-p2v-1.32.6-5.el7

How reproducible:
100%

Steps to Reproduce:
1.Install a host on RAID,which are contains with 3 disks,the os is rhel7.2.
# lsblk
NAME          MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
sda             8:0    0 298.1G  0 disk  
├─sda1          8:1    0   1.3G  0 part  
│ └─rhel-swap 253:0    0   3.9G  0 lvm   [SWAP]
└─sda2          8:2    0 296.8G  0 part  
  └─md127       9:127  0 593.6G  0 raid5 /
sdb             8:16   0 298.1G  0 disk  
├─sdb1          8:17   0   1.3G  0 part  
│ └─rhel-swap 253:0    0   3.9G  0 lvm   [SWAP]
└─sdb2          8:18   0 296.8G  0 part  
  └─md127       9:127  0 593.6G  0 raid5 /
sdc             8:32   0 298.1G  0 disk  
├─sdc1          8:33   0   1.3G  0 part  
│ └─rhel-swap 253:0    0   3.9G  0 lvm   [SWAP]
└─sdc2          8:34   0 296.8G  0 part  
  └─md127       9:127  0 593.6G  0 raid5 /

2.Use virt-p2v to convert the host.
Warning shows as below:
warning: fstrim: fstrim: /sysroot/: the discard operation is not supported

warning from log:
commandrvf: mount -o  /dev/md127 /sysroot/^M
[  284.419007] XFS (md127): Mounting V4 Filesystem^M
[  284.559791] XFS (md127): Ending clean mount^M
libguestfs: trace: v2v: mount = 0
libguestfs: trace: v2v: fstrim "/"

fstrim: /sysroot/: the discard operation is not supported^M
guestfsd: error: fstrim: /sysroot/: the discard operation is not supported^M
guestfsd: main_llibguestfs: trace: v2v: fstrim = -1 (error)
libguestfs: trace: v2v: umount_all
virt-v2v: warning: fstrim: fstrim: /sysroot/: the discard operation is not
supported (ignored)

Actual results:
As above.

Expected results:
Improve the warning or just hide the warning from users,like bug 1168144.

Additional info:
Log priority,can move to rhel7.4
Comment 2 Richard W.M. Jones 2016-08-12 03:56:28 EDT
The warning is only emitted when in verbose mode (which was
the precise fix for bug 1168144).  The current code is:

        try g#fstrim "/"
        with G.Error msg ->
          (* Only emit this warning when debugging, because otherwise
           * it causes distress (RHBZ#1168144).
           *)
          if verbose () then
            warning (f_"%s (ignored)") msg

If this warning is hidden when not verbose, then this is NOTABUG.
Comment 3 tingting zheng 2016-08-12 05:18:38 EDT
(In reply to Richard W.M. Jones from comment #2)
> The warning is only emitted when in verbose mode (which was
> the precise fix for bug 1168144).  The current code is:
> 
>         try g#fstrim "/"
>         with G.Error msg ->
>           (* Only emit this warning when debugging, because otherwise
>            * it causes distress (RHBZ#1168144).
>            *)
>           if verbose () then
>             warning (f_"%s (ignored)") msg
> 
> If this warning is hidden when not verbose, then this is NOTABUG.

From https://bugzilla.redhat.com/show_bug.cgi?id=1167623#c12,"Enable server-side debugging" button is removed.

So I just launch virt-p2v client and use the default configuration,the warning info shows just in the virt-p2v client.I think the info shows on virt-p2v client is not in debug mode,the log from virt-p2v server is in debug mode.

Pls check the screenshot from virt-p2v client.
Comment 4 tingting zheng 2016-08-12 05:19 EDT
Created attachment 1190321 [details]
screenshot from virt-p2v client
Comment 5 Richard W.M. Jones 2016-08-12 05:24:14 EDT
OK I see this is a virt-p2v transfer.  Yes, debugging is
always enabled "behind the scenes" now.

This warning indicates a real problem.  During any conversion
the fstrim is used to reduce the amount of data that needs to
be copied.  If the fstrim cannot be done then conversion will
run more slowly (in some cases much much more slowly).

Perhaps we should always display the warning (reverting
bug 1168144) but change the wording to make it clear what
is happening.
Comment 6 Richard W.M. Jones 2016-08-12 05:38:54 EDT
Patches posted:

https://www.redhat.com/archives/libguestfs/2016-August/thread.html#00087

Note this reverts the fix for bug 1168144.  The warning is
always enabled with these patches.
Comment 7 mxie@redhat.com 2016-08-12 06:52:28 EDT
This warning also will be shown when convert rhel7.3-sata-uefi host to libvirt by virt-p2v
Comment 10 mxie@redhat.com 2016-08-19 06:30:10 EDT
I can reproduce the bug as comment7 said

Verify this bug with below builds:
virt-v2v-1.32.7-2.el7.x86_64
libguestfs-1.32.7-2.el7.x86_64
virt-p2v-1.32.7-2.el7.x86_64


Steps:

1.Convert uefi guest from vmware to libvirt
# virt-v2v -ic vpx://root@10.66.145.47/data/10.73.3.19/?no_verify=1 juzhou-test-efi -of qcow2 --password-file /tmp/passwd
[   0.0] Opening the source -i libvirt -ic vpx://root@10.66.145.47/data/10.73.3.19/?no_verify=1 juzhou-test-efi
[   0.8] Creating an overlay to protect the source from being modified
[   1.5] Initializing the target -o libvirt -os default
[   1.5] Opening the overlay
[  23.0] Inspecting the overlay
[  83.2] Checking for sufficient free disk space in the guest
[  83.2] Estimating space required on target for each disk
[  83.2] Converting Windows Server 2012 R2 Standard to run on KVM
virt-v2v: warning: there is no QXL driver for this version of Windows (6.3 
x86_64).  virt-v2v looks for this driver in /usr/share/virtio-win

The guest will be configured to use a basic VGA display driver.
virt-v2v: This guest has virtio drivers installed.
[  93.4] Mapping filesystem data to avoid copying unused and blank areas
virt-v2v: warning: fstrim on guest filesystem /dev/sda2 failed.  Usually 
you can ignore this message.  To find out more read "Trimming" in 
virt-v2v(1).

Original message: fstrim: fstrim: /sysroot/: the discard operation is not 
supported
[  94.0] Closing the overlay
[  94.0] Checking if the guest needs BIOS or UEFI to boot
virt-v2v: This guest requires UEFI on the target to boot.
[  94.0] Assigning disks to buses
[  94.0] Copying disk 1/1 to /var/lib/libvirt/images/juzhou-test-efi-sda (qcow2)
    (100.00/100%)
[ 596.7] Creating output metadata
Pool default refreshed

Domain juzhou-test-efi defined from /tmp/v2vlibvirtb2b963.xml

[ 597.1] Finishing off

2.Convert rhel7.3-sata-uefi host to libvirt by virt-p2v, the warning about  fstrim shows as step1

Hi rjones,

Why need to reserve original message: fstrim: fstrim: /sysroot/: the discard operation is not supported in warning? 

Thanks
Comment 11 Richard W.M. Jones 2016-08-22 05:20:47 EDT
I don't want to lose the original error message.  It might be something
important.
Comment 12 mxie@redhat.com 2016-08-24 00:22:07 EDT
According to comment 10 and comment 11, move this bug from ON_QA to VERIFIED
Comment 14 errata-xmlrpc 2016-11-03 14:03:35 EDT
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.

https://rhn.redhat.com/errata/RHSA-2016-2576.html

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