LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Virtualization and Cloud (https://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/)
-   -   How to shrink a partition of a Linux VMWare guest? (https://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/how-to-shrink-a-partition-of-a-linux-vmware-guest-847999/)

taylorkh 12-02-2010 02:49 PM

How to shrink a partition of a Linux VMWare guest?
 
VMWare tools allows me to shrink the "disk" for a Windows guest. vmware-toolbox presents me with the option to "Select the partitions you wish to shrink." on a Linux guest. However, there are no partitions shown to be selected. Anyone had success doing this?

TIA,

Ken

taylorkh 12-02-2010 02:50 PM

:doh: I hate it when I answer my own question - a little investigation tells me that this will not work on a journaling file system. I guess I had best create future Linux VMs with ext2 - what a pain.

Ken

unSpawn 12-02-2010 03:46 PM

Not using vmware-tools but booting a Linux guest from an ISO containing (g)parted hasn't posed any partition or file system resizing problems for me yet.

taylorkh 12-02-2010 05:06 PM

Thanks unSpawn. I booted my Ubuntu 10.04 VM from a like live CD on one monitor while reading the pared docs on the other. I invoked parted and - bottom line - the VM is ext4 and it appears that parted does not support ext4 nor ext3. Pray tell what trick do you use (or do you not have ext4 or ext3 partitions in your VMs?)

Ken

unSpawn 12-02-2010 05:32 PM

Uh. Sorry. ext3 needs resize2fs. I just use the Gparted Live CD. Haven't touched ext4 yet but apparently resize2fs speaks ext4 as well.

taylorkh 12-02-2010 05:45 PM

That's what I thought - the error message told me to go pound sand and use resize2fs. I have 5 TB on my newly rebuilt server to backup VMs and other stuff so I don't really NEED to shrink - just thought I would explore the methodology. I will give resize2fs a try after I re-inflate my Ubuntu VM (I just erased it and replaced it with a backup copy from the server after parted didn't).

Ken


All times are GMT -5. The time now is 05:41 AM.