0

I need to enlarge the space of my file system on a CentOs5 vm. (I use VMware player where I already extended the disk size to around 7.1GB - but I think I need to run some commands in the vm)

[cloudera@localhost ~]$ df -h
Filesystem            Size  Used Avail Use% Mounted on
rootfs                4.7G  4.7G  2.7M 100% /
/dev/root             4.7G  4.7G  2.7M 100% /
/dev                  1.1G   68K  1.1G   1% /dev
/dev/sda2              95M   11M   83M  12% /boot
tmpfs                 1.1G     0  1.1G   0% /dev/shm
.host:/               453G  220G  234G  49% /mnt/hgfs

With which commands can I enlarge my file system space? Just tell me if you need more informations.

1 Answer 1

0

where is your root fs? by default centos installs it on lvm, so you would have to expand the physical volume first (add and delete partion, or edit partition, then use pvresize to resize the physical volume), and then add new extents to your root fs, and then resize2fs to resize the filesystem. use fdisk to check that indeed your disk size has changed. it is safer to do this by booting into a rescue cd image, however, instead of inplace.

if your root fs is on a partition itself, then you can omit the lvm operations.

2
  • Thx. I am a beginner. Do you no if there is page that shows step-by-step what I need to do? My CentOs VM is povided by Cloudera (CDH3u4) and I don't know where my root fs is. How can I check that? Sorry for the basic questions but I'm thankful for your help.
    – Roman
    Nov 19, 2012 at 21:02
  • this one is fairly complete, assuming you do use lvm, which is the centos default: kb.hyve.com/wiki/…, but if you are a beginning, be sure to back up anything you cannot afford to lose, and try to understand all the steps, before you actually doing this. i suggest that you practice it on a vm or a disk that you can afford to trash first.
    – johnshen64
    Nov 19, 2012 at 21:10

You must log in to answer this question.

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