[CentOS] resize an image file

John R Pierce pierce at hogranch.com
Wed Nov 21 19:32:08 UTC 2007

Jerry Geis wrote:
> However, once I have the image file I actually want to uncompress it 
> and resize it
> so its down to the 10G. I will be using this file as a virtual image. 
> I dont want it setting there taking
> up 100G when all it really is for me is 10G.
> How do I CHOP off the unneeded 90G.

create a file the size you want on the destination, run newfs on it, and 
loopback mount it, then...

    tar clzf - / /home | ssh root at machine '(cd /mountpoint ; tar xvzf -)'

More information about the CentOS mailing list