Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I tried to download packages from Windows to my CentOS VM it said I have insufficient space on my filesystem. When I checked it it had only 5.4mb left while I've set the VM space limit to 30GB. I'm new to Linux and don't know what to do. How do I expand the size of my filesystem?

share|improve this question

migrated from stackoverflow.com Aug 28 '11 at 6:25

This question came from our site for professional and enthusiast programmers.

up vote 0 down vote accepted

Short story (you do want to read up every step in detail):

  • Enlarge Partition / Raid / LVM (in order of "loading")
  • Enlarge Filesystem with resize2fs (depending on filesystem)

Resizing in wrong order might corrupt your filesystem or file contents!

share|improve this answer

Perhaps you have already used up all your space. Do a df -h and see how big your filesystem is.

share|improve this answer
df -h

will provide you your disk space usage. If you see that /home is full and you have space in /, then try putting some files you don't regurarly use. Note: you will have to cp using sudo because you cannot copy to / with normal permissions OR as root do the following:

cd /; sudo mkdir extra_space ; cd  extra_space ; sudo mv /home/yourUSERNAME/music/*.mp3 .

Explanation: Change directory to /, then with super user credentials, create a new directory called "extra_space". Next go into "extra_space" and move as many as possible. mp3 files to this location from your home directory.

share|improve this answer
    
What if he doesn't store mp3s, or is really seeking to expand the size of his filesystem ? Also you're assuming / and /home are not using the same space, which is somehow a big assumption under a VM… – Nikana Reklawyks Oct 20 '12 at 9:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .