Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1366456 - Converting rhel7 host installed on RAID:warning: fstrim: fstrim: /sysroot/: the discard operation is not supported
Summary: Converting rhel7 host installed on RAID:warning: fstrim: fstrim: /sysroot/: t...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libguestfs
Version: 7.3
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: ---
Assignee: Richard W.M. Jones
QA Contact: Virtualization Bugs
URL:
Whiteboard: V2V
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-12 03:08 UTC by tingting zheng
Modified: 2016-11-03 18:03 UTC (History)
7 users (show)

Fixed In Version: libguestfs-1.32.7-2.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-03 18:03:35 UTC


Attachments (Terms of Use)
Detailed log info from virt-v2v (deleted)
2016-08-12 03:08 UTC, tingting zheng
no flags Details
screenshot from virt-p2v client (deleted)
2016-08-12 09:19 UTC, tingting zheng
no flags Details


Links
System 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 12:06:51 UTC

Description tingting zheng 2016-08-12 03:08:37 UTC
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 07:56:28 UTC
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 09:18:38 UTC
(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 09:19:17 UTC
Created attachment 1190321 [details]
screenshot from virt-p2v client

Comment 5 Richard W.M. Jones 2016-08-12 09:24:14 UTC
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 09:38:54 UTC
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 10:52:28 UTC
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 10:30:10 UTC
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 09:20:47 UTC
I don't want to lose the original error message.  It might be something
important.

Comment 12 mxie@redhat.com 2016-08-24 04:22:07 UTC
According to comment 10 and comment 11, move this bug from ON_QA to VERIFIED

Comment 14 errata-xmlrpc 2016-11-03 18:03:35 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.

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.