I have a database server that is running out of space. All my databases are being stored in a 80G /opt partition. Because I'm using LVM, wouldn't I be able to pop the HDDs (a h/w raid volume) in, add it to the LVM, and resize my ext3 /opt partition? Everything that I've been reading says this is possible, but I'm not sure. Has anyone done this and are there any pitfalls to watch out for? Is there a better way? I've thought about just rebuilding the server and restoring the databases from a backup on the new setup. Any suggestions on proper path would be appreciated. I'm running the current version of CentOS 5.
Regards,
Todd
On Jan 17, 2008 4:32 PM, Todd Reed treed@astate.edu wrote:
I have a database server that is running out of space. All my databases are being stored in a 80G /opt partition. Because I'm using LVM, wouldn't I be able to pop the HDDs (a h/w raid volume) in, add it to the LVM, and resize my ext3 /opt partition? Everything that I've been reading says this is possible, but I'm not sure. Has anyone done this and are there any pitfalls to watch out for? Is there a better way? I've thought about just rebuilding the server and restoring the databases from a backup on the new setup. Any suggestions on proper path would be appreciated. I'm running the current version of CentOS 5.
Hi,
This is perfectly possible with LVM. First add the HD (aka the HW RAID volume) to the OS. Then do a pvcreate on that disk so that LVM can use it. Then do a vgextend, this adds the disk to the volume group. A vgdisplay should then show that you have again free space in the volume group. Then you can do a lvextend and resize2fs as normal.
Regards, Tim
Thanks Tim. Just needed some reassurance that I was on the right track!
--Todd
-----Original Message----- From: centos-bounces@centos.org [mailto:centos-bounces@centos.org] On Behalf Of Tim Verhoeven Sent: Thursday, January 17, 2008 9:38 AM To: CentOS mailing list Subject: Re: [CentOS] Add more space to LVM
On Jan 17, 2008 4:32 PM, Todd Reed treed@astate.edu wrote:
I have a database server that is running out of space. All my
databases are
being stored in a 80G /opt partition. Because I'm using LVM, wouldn't
I be
able to pop the HDDs (a h/w raid volume) in, add it to the LVM, and
resize
my ext3 /opt partition? Everything that I've been reading says this
is
possible, but I'm not sure. Has anyone done this and are there any
pitfalls
to watch out for? Is there a better way? I've thought about just rebuilding the server and restoring the databases from a backup on the
new
setup. Any suggestions on proper path would be appreciated. I'm
running
the current version of CentOS 5.
Hi,
This is perfectly possible with LVM. First add the HD (aka the HW RAID volume) to the OS. Then do a pvcreate on that disk so that LVM can use it. Then do a vgextend, this adds the disk to the volume group. A vgdisplay should then show that you have again free space in the volume group. Then you can do a lvextend and resize2fs as normal.
Regards, Tim
Tim Verhoeven wrote:
This is perfectly possible with LVM. First add the HD (aka the HW RAID volume) to the OS. Then do a pvcreate on that disk so that LVM can use it. Then do a vgextend, this adds the disk to the volume group. A vgdisplay should then show that you have again free space in the volume group. Then you can do a lvextend and resize2fs as normal.
and, get it all -exactly- right, or its krispy kritters for your FS.
John R Pierce wrote:
Tim Verhoeven wrote:
This is perfectly possible with LVM. First add the HD (aka
the HW RAID
volume) to the OS. Then do a pvcreate on that disk so that
LVM can use
it. Then do a vgextend, this adds the disk to the volume group. A vgdisplay should then show that you have again free space in the volume group. Then you can do a lvextend and resize2fs as normal.
and, get it all -exactly- right, or its krispy kritters for your FS.
May I also add that one should be aware of what type of physical volumes your data is contained on too.
If your original data is on a software RAID array consisting of internal drives, say /dev/md3, and you add an external enclosure which is under hardware raid, say /dev/sde, you may want to just move your data off the software RAID PV onto the hardware RAID PV and remove the software RAID PV from the VG so you can rest easy knowing that ALL of your data is on the managed hardware RAID array and not split 60/40 between them. (Or keep the software RAID array in the VG for volume snapshots only).
To do this I would do a pvmove of all data on /dev/md3 to /dev/sde first, then remove /dev/md3 from the VG, pvremove /dev/md3 and then lvextend your LV further on to PV /dev/sde.
Later if you add an addition storage enclosure on to the hardware RAID I would still think about keeping separate LVs completely on separate enclosures and pvmove LVs from one PV to another to free up space before lvextending.
I always tell lvextend and lvcreate exactly which PVs to use on the command line.
-Ross
______________________________________________________________________ This e-mail, and any attachments thereto, is intended only for use by the addressee(s) named herein and may contain legally privileged and/or confidential information. If you are not the intended recipient of this e-mail, you are hereby notified that any dissemination, distribution or copying of this e-mail, and any attachments thereto, is strictly prohibited. If you have received this e-mail in error, please immediately notify the sender and permanently delete the original and any copy or printout thereof.