Centos primary disk resize or create new disk and move

General support questions
Post Reply
Nacnud
Posts: 5
Joined: 2015/05/14 10:30:20

Centos primary disk resize or create new disk and move

Post by Nacnud » 2015/07/01 13:19:41

Hi
I have a centos 6.6 production server, hosted on VMware accessed via a portal. I have been looking at the disk configuration it is as follows:
1 x 16 gig drive - 4 x Primary partitions
dev/sda - 1x537 boot
dev/sda - 1x2147 swap
dev/sda - 1x8052 lvm
dev/sda1 - 1x6442 lvm
The last 2 partitions are for log files that are created by an in-house application, but these keep the drive full and on the odd occasion it has stopped due to running out of space. I can add another 16gig of space to the drive that’s already there, then extend one of the primary partitions, but not sure that's the answer and isn't there a lot of work involved?

So my questions are...
Is it easy to extend the partitions already on the server or would it be easier to create a new disk (sdb) and move the log files to this disk?
I have been looking at this to make sure I get it right and I think my best bet is to use fdisk, but if anyone has better idea, what do you suggest

The server is used most of the time and so anything that doesn't disrupt day to day running is better, although I know that the longer this carries on the more chance it has of causing lots of flapping and finger pointing.

Thanks for your valued suggestions

aks
Posts: 3073
Joined: 2014/09/20 11:22:14

Re: Centos primary disk resize or create new disk and move

Post by aks » 2015/07/01 16:18:42

You can extend the LVM stuff see http://tldp.org/HOWTO/LVM-HOWTO/extendlv.html and http://wiki.centos.org/TipsAndTricks/ExpandLV

The way you go about this is:
1) Backup the volume(s) to be extended - in fact backup everything.
2) Increase the space presented to the vSCSI disk(s) (use VMware's tools for this).
3) Expand the LVM
4) Expand the filesystem.
If you need to expand the root disk (i.e.: /), you'll have to boot off some other media (such as a CDROM) as the volume must be inactive and umounted to complete the operation.

Whoever
Posts: 1361
Joined: 2013/09/06 03:12:10

Re: Centos primary disk resize or create new disk and move

Post by Whoever » 2015/07/02 06:02:50

aks wrote: If you need to expand the root disk (i.e.: /), you'll have to boot off some other media (such as a CDROM) as the volume must be inactive and umounted to complete the operation.
On-line expansion of ext* filesystems is supported.

aks
Posts: 3073
Joined: 2014/09/20 11:22:14

Re: Centos primary disk resize or create new disk and move

Post by aks » 2015/07/02 16:28:14

Warning
Do not attempt to resize a partition on a device that is in use.
source:
https://access.redhat.com/documentation ... -part.html

Whoever
Posts: 1361
Joined: 2013/09/06 03:12:10

Re: Centos primary disk resize or create new disk and move

Post by Whoever » 2015/07/03 02:31:32

aks wrote:
Warning
Do not attempt to resize a partition on a device that is in use.
source:
https://access.redhat.com/documentation ... -part.html
That article is about resizing a physical partition, not extending the filesystem or LVM. Depending on the original setup, it may be possible to do some of the operations while the system is booted.

aks
Posts: 3073
Joined: 2014/09/20 11:22:14

Re: Centos primary disk resize or create new disk and move

Post by aks » 2015/07/03 19:08:53

LOL

Post Reply