?
Solved

Linux Partitions Resize

Posted on 2014-10-13
6
Medium Priority
?
467 Views
Last Modified: 2014-10-15
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

0
Comment
Question by:tetrauk
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 10

Expert Comment

by:Rafael
ID: 40376867
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
0
 
LVL 6

Expert Comment

by:Wylie Bayes
ID: 40377024
Yep Gparted is the way to go.
0
 
LVL 62

Assisted Solution

by:gheist
gheist earned 2000 total points
ID: 40378319
Install "system-config-lvm" and resize partitions to your liking.
While gparted will work, there is supported partitioner included with system that can resize live mounted filesystems without killing data.
0
Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

 
LVL 1

Accepted Solution

by:
tetrauk earned 0 total points
ID: 40379331
Couldnt use Gparted as its a hosted virtual server, question was answered best on another forum http://www.linuxquestions.org/questions/showthread.php?p=5253021#post5253021

This was also useful: http://www.linuxuser.co.uk/features/resize-your-disks-on-the-fly-with-lvm
0
 
LVL 1

Author Comment

by:tetrauk
ID: 40380460
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
0
 
LVL 62

Expert Comment

by:gheist
ID: 40380461
Your second link EXACTLY SUGGESTS system-config-lvm as in http:#a40378319
0

Featured Post

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Veeam Backup & Replication has added a new integration – Veeam Backup for Microsoft Office 365.  In this blog, we will discuss how you can benefit from Office 365 email backup with the Veeam’s new product and try to shed some light on the needs and …
In this article, I am going to show you how to simulate a multi-site Lab environment on a single Hyper-V host. I use this method successfully in my own lab to simulate three fully routed global AD Sites on a Windows 10 Hyper-V host.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses
Course of the Month12 days, 17 hours left to enroll

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question