diff --git a/v2v/v2v.ml b/v2v/v2v.ml index e221f293c..d9441c1fd 100644 --- a/v2v/v2v.ml +++ b/v2v/v2v.ml @@ -397,11 +397,7 @@ and do_fstrim g inspect = if mounted then ( 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 + warning (f_"fstrim on guest filesystem %s failed. Usually you can ignore this message. To find out more read \"Trimming\" in virt-v2v(1).\n\nOriginal message: %s") dev msg ) ) fses diff --git a/v2v/virt-v2v.pod b/v2v/virt-v2v.pod index 93d73bd19..5988b7756 100644 --- a/v2v/virt-v2v.pod +++ b/v2v/virt-v2v.pod @@ -1611,6 +1611,32 @@ one CPU core and between 512 MB and 1 GB of RAM per running instance. Virt-v2v can be run in a virtual machine. +=head2 Trimming + +Virt-v2v attempts to optimize the speed of conversion by ignoring +guest filesystem data which is not used. This would include unused +filesystem blocks, blocks containing zeroes, and deleted files. + +To do this, virt-v2v issues a non-destructive L operation. +As this happens to an overlay placed over the guest data, it does +B affect the source in any way. + +If this fstrim operation fails, you will see a warning, but virt-v2v +will continue anyway. It may run more slowly (in some cases much more +slowly), because it is copying the unused parts of the disk. + +Unfortunately support for fstrim is not universal, and it also depends +on specific details of the filesystem, partition alignment, and +backing storage. As an example, NTFS filesystems cannot be fstrimmed +if they occupy a partition which is not aligned to the underlying +storage. That was the default on Windows before Vista. As another +example, VFAT filesystems (used by UEFI guests) cannot be trimmed at +all. + +fstrim support in the Linux kernel is improving gradually, so over +time some of these restrictions will be lifted and virt-v2v will work +faster. + =head1 POST-CONVERSION TASKS =head2 Guest network configuration