From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Hajnoczi Subject: Re: [Qemu-devel] implement lvm-aware P2V to reduce time cost significantly for linux server Date: Fri, 2 Jan 2015 10:19:29 +0000 Message-ID: <20150102101929.GA10823@stefanha-thinkpad.redhat.com> References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="envbJBWh7q8WU6mo" Cc: kvm-devel , qemu-devel , Paolo Bonzini To: Haoyu Zhang Return-path: Received: from mail-we0-f175.google.com ([74.125.82.175]:36071 "EHLO mail-we0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750761AbbABK1f (ORCPT ); Fri, 2 Jan 2015 05:27:35 -0500 Received: by mail-we0-f175.google.com with SMTP id k11so4302530wes.34 for ; Fri, 02 Jan 2015 02:27:34 -0800 (PST) Content-Disposition: inline In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: --envbJBWh7q8WU6mo Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sat, Dec 27, 2014 at 09:28:53AM +0800, Haoyu Zhang wrote: > I want to P2V a redhat server to kvm vm, and lvm was used to manage disks > in the redhat server. > I want to only migrate the really used storage to vm image, which can > reduce the time cost significantly sometimes, > so I need the information of logical volume to physical disks bitmap, to > know which physical sectors were really used, > any ideas? > Is there a tool off-the-shelf have implemented the target? Have you looked at virt-p2v(1)? http://libguestfs.org/virt-p2v.1.html I'm not sure if it sparsifies the disk image during conversion or whether you would have to run virt-sparsify(1) afterwards (http://libguestfs.org/virt-sparsify.1.html). virt-sparsify(1) can definitely unmap LVM's unused space. Stefan --envbJBWh7q8WU6mo Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJUpnCxAAoJEJykq7OBq3PIpaUIAJlIYtyFCSpIjO+fP/n/gjt0 7/2Y6y1/nkfX2X5lFZs1PYpMRk5Pzeuu5XG6LB+kwI0JrLZfGpUxGwVYrP/5C0nP Eog5l0JnmWOp/9lTYkIoV1UsQ9OxUpbNmxAugTxmn0w26kiWI9afEFM2Tg+b0OXZ EVlcIZ5YOZYMCNKlZCGCI6pJqyI/out96GHNqaPTdJCjPdMT7/w5J9SUaudAO0gb BiPUDkzxYng4o+HbhNYa8GSZ2OHdFgeyPWiFTDHETOoZRUzyiaORcFPNtw3SCOAf bj4afBirMQAsQ0h+/b0qiWmAH6fm53cROlJD+dHVP+4xGXjKmaOg9WINgsmk3uY= =ZdqO -----END PGP SIGNATURE----- --envbJBWh7q8WU6mo--