Link to home
Start Free TrialLog in
Avatar of tetrauk
tetraukFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Linux Partitions Resize

OK, I have a VPS server CentOS 6.5 , we have 100GB drive space available but when it was provisioned the partitions were setup as smaller partitions.

I'm not confident enough to resize these without some help.
So yeah, Help please!!!!

Preferably I would like to expand
/ -> 10GB
/usr -> 10GB
/var - > 10GB
/home -> 50GB

Below is some outputs that might be useful, I would like a guide of the commands, and maybe a link to some good reading material to let me figure out how this all works cause it seems pretty confusing to me.

Thanks in Advanced

[root@mx3 ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/xvda1            4.0G  795M  3.2G  20% /
/dev/mapper/vg00-usr  4.0G  1.5G  2.4G  39% /usr
/dev/mapper/vg00-var  4.0G  693M  3.1G  19% /var
/dev/mapper/vg00-home
                      4.0G  233M  3.6G   7% /home
none                  1.5G   64K  1.5G   1% /tmp

[root@mx3 ~]# fdisk -l

Disk /dev/xvda: 100.0 GB, 100000595968 bytes
255 heads, 63 sectors/track, 12157 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xad2b2367

    Device Boot      Start         End      Blocks   Id  System
/dev/xvda1               1         523     4200966   83  Linux
/dev/xvda2             524         785     2104515   82  Linux swap / Solaris
/dev/xvda3             786       12157    91345590   8e  Linux LVM

Disk /dev/mapper/vg00-usr: 4294 MB, 4294967296 bytes
255 heads, 63 sectors/track, 522 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000


Disk /dev/mapper/vg00-var: 4294 MB, 4294967296 bytes
255 heads, 63 sectors/track, 522 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000


Disk /dev/mapper/vg00-home: 4294 MB, 4294967296 bytes
255 heads, 63 sectors/track, 522 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

[root@mx3 ~]#  cat /etc/fstab
/dev/xvda1      /               ext3    defaults,noatime        1 1
/dev/xvda2      none            swap    sw
/dev/vg00/usr   /usr            ext4    defaults,noatime        0 2
/dev/vg00/var   /var            ext4    defaults,usrquota,noatime       0 2
/dev/vg00/home  /home           ext4    defaults,usrquota,noatime       0 2
#/dev/hdd/data  /data           ext4    defaults,usrquota,noatime       0 2
devpts          /dev/pts        devpts  gid=5,mode=620  0 0
none            /proc           proc    defaults        0 0
none            /tmp    tmpfs   defaults        0 0
[root@mx3 ~]#  pvs
  PV         VG   Fmt  Attr PSize  PFree
  /dev/xvda3 vg00 lvm2 a--  87.11g 75.11g
[root@mx3 ~]# pvscan
  PV /dev/xvda3   VG vg00   lvm2 [87.11 GiB / 75.11 GiB free]
  Total: 1 [87.11 GiB] / in use: 1 [87.11 GiB] / in no VG: 0 [0   ]

Open in new window

Avatar of Rafael
Rafael
Flag of United States of America image

I would do this using Gparted (http://gparted.sourceforge.net/).  Although I've never done it on Cent OS, I've used it on Redhat, Ubuntu, and a few others.  In all cases it has been the same process.  Here is a link with step by step details http://en.kioskea.net/faq/2036-how-to-resize-a-partition-using-gparted-on-linux.

You can also use Mondo Rescue to clone your partition before resizing http://comptia.idglabs.net/?p=4079

-HTH

-Rafael
Yep Gparted is the way to go.
SOLUTION
Avatar of gheist
gheist
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of tetrauk

ASKER

I've requested that this question be closed as follows:

Accepted answer: 0 points for tetrauk's comment #a40379331

for the following reason:

Answer provided by external source
Your second link EXACTLY SUGGESTS system-config-lvm as in http:#a40378319