how to resize a xen image (or any other fs)
By abate - Posted on June 24th, 2008
This is a small recipe to resize a disk image. In this case I wanted to make it bigger.
create a sparse file :
dd if=/dev/zero of=xen.img bs=1k count=1 seek=30M
copy the old file system to the sparse file:
dd if=old-xen.img of=xen.img conv=notrunc
now we resize the fs (reiserfs in this case)
resize_reiserfs xen.img
and we can happily mount it.
mount -o loop xen.img test/
now we have a bigger fs !
# df -h
Filesystem Size Used Avail Use% Mounted on
/home/xen.img 30G 338M 30G 2% /home/test

Recent comments
6 hours 38 min ago
1 week 5 days ago
4 weeks 14 hours ago
6 weeks 4 days ago
8 weeks 2 hours ago
37 weeks 3 days ago
41 weeks 2 days ago