|
|
e76f14 |
From 91db4de9f068eb7d90f30e1d7205b3f0c988cce7 Mon Sep 17 00:00:00 2001
|
|
|
e76f14 |
From: "Richard W.M. Jones" <rjones@redhat.com>
|
|
|
e76f14 |
Date: Fri, 12 Aug 2016 10:32:26 +0100
|
|
|
e76f14 |
Subject: [PATCH] v2v: Make fstrim warning clearer (RHBZ#1366456).
|
|
|
e76f14 |
|
|
|
e76f14 |
This reverts the change made for RHBZ#1168144. The warning is now
|
|
|
e76f14 |
always displayed.
|
|
|
e76f14 |
|
|
|
e76f14 |
It would be nice to make the warning actionable, but there is not a
|
|
|
e76f14 |
lot that end users can do since fstrim is such a complex topic
|
|
|
e76f14 |
interacting with all filesystem and storage layers.
|
|
|
e76f14 |
|
|
|
e76f14 |
(cherry picked from commit 66816e11332b07a07efd6821e7ecf090691ce441)
|
|
|
e76f14 |
---
|
|
|
e76f14 |
v2v/v2v.ml | 6 +-----
|
|
|
e76f14 |
v2v/virt-v2v.pod | 26 ++++++++++++++++++++++++++
|
|
|
e76f14 |
2 files changed, 27 insertions(+), 5 deletions(-)
|
|
|
e76f14 |
|
|
|
e76f14 |
diff --git a/v2v/v2v.ml b/v2v/v2v.ml
|
|
|
e76f14 |
index 4b06bc1..21f8d77 100644
|
|
|
e76f14 |
--- a/v2v/v2v.ml
|
|
|
e76f14 |
+++ b/v2v/v2v.ml
|
|
|
e76f14 |
@@ -425,11 +425,7 @@ and do_fstrim g no_trim inspect =
|
|
|
e76f14 |
if mounted then (
|
|
|
e76f14 |
try g#fstrim "/"
|
|
|
e76f14 |
with G.Error msg ->
|
|
|
e76f14 |
- (* Only emit this warning when debugging, because otherwise
|
|
|
e76f14 |
- * it causes distress (RHBZ#1168144).
|
|
|
e76f14 |
- *)
|
|
|
e76f14 |
- if verbose () then
|
|
|
e76f14 |
- warning (f_"%s (ignored)") msg
|
|
|
e76f14 |
+ 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
|
|
|
e76f14 |
)
|
|
|
e76f14 |
) fses
|
|
|
e76f14 |
|
|
|
e76f14 |
diff --git a/v2v/virt-v2v.pod b/v2v/virt-v2v.pod
|
|
|
e76f14 |
index 9fc0b72..434f57e 100644
|
|
|
e76f14 |
--- a/v2v/virt-v2v.pod
|
|
|
e76f14 |
+++ b/v2v/virt-v2v.pod
|
|
|
e76f14 |
@@ -1512,6 +1512,32 @@ one CPU core and between 512 MB and 1 GB of RAM per running instance.
|
|
|
e76f14 |
|
|
|
e76f14 |
Virt-v2v can be run in a virtual machine.
|
|
|
e76f14 |
|
|
|
e76f14 |
+=head2 Trimming
|
|
|
e76f14 |
+
|
|
|
e76f14 |
+Virt-v2v attempts to optimize the speed of conversion by ignoring
|
|
|
e76f14 |
+guest filesystem data which is not used. This would include unused
|
|
|
e76f14 |
+filesystem blocks, blocks containing zeroes, and deleted files.
|
|
|
e76f14 |
+
|
|
|
e76f14 |
+To do this, virt-v2v issues a non-destructive L<fstrim(8)> operation.
|
|
|
e76f14 |
+As this happens to an overlay placed over the guest data, it does
|
|
|
e76f14 |
+B<not> affect the source in any way.
|
|
|
e76f14 |
+
|
|
|
e76f14 |
+If this fstrim operation fails, you will see a warning, but virt-v2v
|
|
|
e76f14 |
+will continue anyway. It may run more slowly (in some cases much more
|
|
|
e76f14 |
+slowly), because it is copying the unused parts of the disk.
|
|
|
e76f14 |
+
|
|
|
e76f14 |
+Unfortunately support for fstrim is not universal, and it also depends
|
|
|
e76f14 |
+on specific details of the filesystem, partition alignment, and
|
|
|
e76f14 |
+backing storage. As an example, NTFS filesystems cannot be fstrimmed
|
|
|
e76f14 |
+if they occupy a partition which is not aligned to the underlying
|
|
|
e76f14 |
+storage. That was the default on Windows before Vista. As another
|
|
|
e76f14 |
+example, VFAT filesystems (used by UEFI guests) cannot be trimmed at
|
|
|
e76f14 |
+all.
|
|
|
e76f14 |
+
|
|
|
e76f14 |
+fstrim support in the Linux kernel is improving gradually, so over
|
|
|
e76f14 |
+time some of these restrictions will be lifted and virt-v2v will work
|
|
|
e76f14 |
+faster.
|
|
|
e76f14 |
+
|
|
|
e76f14 |
=head1 POST-CONVERSION TASKS
|
|
|
e76f14 |
|
|
|
e76f14 |
=head2 Guest network configuration
|
|
|
e76f14 |
--
|
|
|
aa0300 |
2.7.4
|
|
|
e76f14 |
|