-3

I am running Centos 6.5 guest on Windows 7 Pro host (VirtualBox v4.3.6) - all 64 bit. I am trying to increase the size of Centos virtual disk (which is currently about 15G) to 90G. I did run the following Command

VBoxManage modifyhd "C:_Ten\Centos 6.5.vdi" --resize 92160

I observed expected output

0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%

and so far everything looks good.

Then I booted my Centos VM into GParted utility and this is where things start get confusing. What I see in GParted is two partitions /dev/sda1 500MiB, /dev/sda2 30GiB and unallocated space of 60 GiB. What /dev/dev1 and /dev/sda2 represent? Which one of them do I need to grow?

I actually tried growing both (separately and simultaneously) nothing helps. What I really need is to add space available under /data (where I have my MongoDB databases). Prior to HD resize exercise "df -h /data" command in Centos was showing that that directory is using 98% of 28G available.

After running VBoxManage and GParted nothing changed no matter which partition I grow.

Question 1: How come my physical disk size is only 15GB but df shows that I have used 28 is there some kind of compression going on in VBoxManage?

Question 2: how do I get more space available to "/" and thus respectively to "/data"?

Thank you

closed as off-topic by Falcon Momot, MadHatter, MDMarra, dawud, Katherine Villyard Mar 3 '14 at 0:19

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions must be relevant to professional system administration. Server Fault is dedicated to professional system and network administrators. End user and enthusiast questions are off-topic (contact your system administrator or hire a professional to help you out). Please see the Help Center for more information." – Falcon Momot, MadHatter, MDMarra, dawud, Katherine Villyard
If this question can be reworded to fit the rules in the help center, please edit the question.

  • I found way to do it by adding another virtual hard drive to Centos (rather than extending existing one). I did not need GParted utility at all. I then followed steps from this blog and it all worked: link – Henry Mar 4 '14 at 13:46
2

Question 1: Could be a corrupt filesystem. Run fsck and see if it fixes the problem.

Question 2: You have to resize your partition and your filesystem. The partition can be resized using parted. The filesystem has to be resized using a tool specific for your filesystem, for example resize2fs for ext2/ext3/ext4, xfs_growfs for xfs and so on.

Here is a guide for the whole procedure: http://positon.org/resize-an-ext3-ext4-partition

And sda1 could be your boot or swap partition. Check your /etc/fstab.

Not the answer you're looking for? Browse other questions tagged or ask your own question.