Skip to contentSkip to conversation

Fix HVM disk.img file system size

PATCH Applied Daniel Stekloff 2 participants 2 messages May 12, 2006 – May 19, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix HVM disk.img file system size

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

# HG changeset patch
# User [email protected] # Node ID ee051233e94b68701490e1dde15f7851c535ef10 # Parent 32444375fd3da0ddaba3b321e352a33f79d912ea

This patch resizes the file system on the xm-test HVM disk.img to use the entire space available.

tools/xm-test/ramdisk/bin/create_disk_image +7 -0
diff -r 32444375fd3d -r ee051233e94b tools/xm-test/ramdisk/bin/create_disk_image
@@ -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
 }
 

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

Applied
#1 lore raw
Quoted 8 lines · Daniel Stekloff

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.

Applied, thanks.

Ewan.