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?


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!


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

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.

  • 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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