From: Daniel Stekloff Subject: [PATCH][XM-TEST] Fix HVM disk.img file system size Date: Fri, 12 May 2006 09:47:48 -0700 Message-ID: <1147452468.5222.31.camel@localhost.localdomain> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-Jsw9fTHSE/97xEjrJKuR" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel , Ewan Mellor Cc: Dan Smith List-Id: xen-devel@lists.xenproject.org --=-Jsw9fTHSE/97xEjrJKuR Content-Type: text/plain Content-Transfer-Encoding: 7bit Hi, We're currently wasting space with xm-tests's HVM disk.img. We create an 8MB image but only use about half of that. The file system needs to be resized after we dd over the rootfs. We need this fix if we want to add more functionality to the disk.img - such as netperf, etc. We need the space. Thanks, Dan --=-Jsw9fTHSE/97xEjrJKuR Content-Disposition: attachment; filename=xmtest-resize-diskimg-fs.patch Content-Type: text/x-patch; name=xmtest-resize-diskimg-fs.patch; charset=UTF-8 Content-Transfer-Encoding: 7bit # HG changeset patch # User stekloff@elm3b216.beaverton.ibm.com # Node ID ee051233e94b68701490e1dde15f7851c535ef10 # Parent 32444375fd3da0ddaba3b321e352a33f79d912ea This patch resizes the file system on the xm-test HVM disk.img to use the entire space available. Signed-off-by: Daniel Stekloff diff -r 32444375fd3d -r ee051233e94b tools/xm-test/ramdisk/bin/create_disk_image --- a/tools/xm-test/ramdisk/bin/create_disk_image Mon May 8 09:36:13 2006 +++ b/tools/xm-test/ramdisk/bin/create_disk_image Tue May 9 15:55:45 2006 @@ -207,6 +207,13 @@ dd if="$ROOTFS" of="$LOOPP" > /dev/null 2>&1 if [ $? -ne 0 ]; then die "Failed to dd $ROOTFS to $LOOPP." + fi + + # Resize fs to use full partition + e2fsck -f $LOOPP + resize2fs $LOOPP + if [ $? -ne 0 ]; then + die "Failed to resize rootfs on $LOOPP." fi } --=-Jsw9fTHSE/97xEjrJKuR Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --=-Jsw9fTHSE/97xEjrJKuR--