We have a large MySQL database currently running on a CentOS 3.x server with an external SCSI RAID device. This is currently an ext2 filesystem because it was migrated once previously from an even older RedHat system. We need to add storage capacity to this database and prepare for additional future growth. One of the options under consideration is to move to CentOS 5 and use LVM.
Of some concern is that we run some pretty heavy-duty queries against this database in close to real time, so we don't want the switch to scalable storage to have a significant impact on read latency.
Consequently I'm looking for sources of information on two topics: - What kind of performance can we expect from an LVM group as compared to mounting the RAID array directly? - What's involved in migrating our filesystem from ext2 to LVM with a minimum of downtime?
Thanks in advance for directions.
Bart Schaefer wrote:
We have a large MySQL database currently running on a CentOS 3.x server with an external SCSI RAID device. This is currently an ext2 filesystem because it was migrated once previously from an even older RedHat system.
umount /dev/sdb1 tunefs -j /dev/sdb1 vi /etc/fstab (and, change ext2 to ext3 on the mount line for this filesystem) mount /dev/sdb1
and voila, its EXT3 now, with journalling.
We need to add storage capacity to this database and prepare for additional future growth. One of the options under consideration is to move to CentOS 5 and use LVM.
Of some concern is that we run some pretty heavy-duty queries against this database in close to real time, so we don't want the switch to scalable storage to have a significant impact on read latency.
Consequently I'm looking for sources of information on two topics:
- What kind of performance can we expect from an LVM group as compared
to mounting the RAID array directly?
- What's involved in migrating our filesystem from ext2 to LVM with a
minimum of downtime?
Thanks in advance for directions. _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
On 7/6/07, John R Pierce pierce@hogranch.com wrote:
umount /dev/sdb1 tunefs -j /dev/sdb1 vi /etc/fstab (and, change ext2 to ext3 on the mount line for this filesystem) mount /dev/sdb1
and voila, its EXT3 now, with journalling.
Thanks, John, but is that really the whole answer? Once it's ext3 it can be put into a volume group with no further ado?
I would think that (particularly with a striped LVM such as Johnny mentioned) there has to be something else invovled.
Bart Schaefer wrote:
Thanks, John, but is that really the whole answer? Once it's ext3 it can be put into a volume group with no further ado?
I would think that (particularly with a striped LVM such as Johnny mentioned) there has to be something else invovled.
the file system and the volume manager are not directly related. the volume manager can contain any supported file system.
Bart Schaefer wrote:
On 7/6/07, John R Pierce pierce@hogranch.com wrote:
umount /dev/sdb1 tunefs -j /dev/sdb1 vi /etc/fstab (and, change ext2 to ext3 on the mount line for this filesystem) mount /dev/sdb1
and voila, its EXT3 now, with journalling.
Thanks, John, but is that really the whole answer? Once it's ext3 it can be put into a volume group with no further ado?
I would think that (particularly with a striped LVM such as Johnny mentioned) there has to be something else invovled.
You would need to copy the info off, create partitions, then PVs, then VG(s), LVs ... then use "mke2fs -j" to make the file systems on the LVs ... then copy the files back.
On 7/8/07, Bart Schaefer barton.schaefer@gmail.com wrote:
On 7/6/07, John R Pierce pierce@hogranch.com wrote:
and voila, its EXT3 now, with journalling.
Thanks, John, but is that really the whole answer? Once it's ext3 it can be put into a volume group with no further ado?
I should have read through the links Johnny posted more closely. It's pretty clear from the LVM-HOWTO that there's no way to get from here to there without copying the data; unless I've missed something, there's no conversion operations that encompasses pvcreate.
Bart Schaefer wrote:
We have a large MySQL database currently running on a CentOS 3.x server with an external SCSI RAID device. This is currently an ext2 filesystem because it was migrated once previously from an even older RedHat system. We need to add storage capacity to this database and prepare for additional future growth. One of the options under consideration is to move to CentOS 5 and use LVM.
Of some concern is that we run some pretty heavy-duty queries against this database in close to real time, so we don't want the switch to scalable storage to have a significant impact on read latency.
Consequently I'm looking for sources of information on two topics:
- What kind of performance can we expect from an LVM group as compared
to mounting the RAID array directly?
OK, the answer to this question is ...
RAID and LVM can be used together, or individually.
If you have 2 or more drives that are the same in the machine, you can "Stripe" your LVM. When doing this it behaves similarly to RAID0 (striping with no CRC / Redundancy).
LVM done this way is quite fast ... but obviously you would need to provide another way to protect your data.
See this article for how to use LVM striping:
http://www.redhat.com/magazine/009jul05/features/lvm2/
http://www.tldp.org/HOWTO/html_single/LVM-HOWTO/#recipethreescsistripe
Obviously, LVM with striping is faster than a normal LVM setup.
- What's involved in migrating our filesystem from ext2 to LVM with a
minimum of downtime?
On 7/7/07, Johnny Hughes mailing-lists@hughesjr.com wrote:
Bart Schaefer wrote:
- What kind of performance can we expect from an LVM group as compared
to mounting the RAID array directly?
OK, the answer to this question is ...
RAID and LVM can be used together, or individually.
Thanks for confirming that, though in this case it's a hardware RAID so I wouldn't expect LVM to need to treat it as anything other than big disk.
If you have 2 or more drives that are the same in the machine, you can "Stripe" your LVM.
Could you clarify "that are the same"? The primary point of this excercise is to make the filesystem resizable. It's already impossible to buy exactly the configuration of new hardware that's already attached; we wouldn't want to be limited to adding identical extents every time we expanded the storage.
LVM done this way is quite fast ... but obviously you would need to provide another way to protect your data.
Presumably using hardware RAIDs as the physical volumes would take care of that.
Thanks for the information.
Bart Schaefer wrote:
On 7/7/07, Johnny Hughes mailing-lists@hughesjr.com wrote:
Bart Schaefer wrote:
- What kind of performance can we expect from an LVM group as compared
to mounting the RAID array directly?
OK, the answer to this question is ...
RAID and LVM can be used together, or individually.
Thanks for confirming that, though in this case it's a hardware RAID so I wouldn't expect LVM to need to treat it as anything other than big disk.
If you have 2 or more drives that are the same in the machine, you can "Stripe" your LVM.
Could you clarify "that are the same"? The primary point of this excercise is to make the filesystem resizable. It's already impossible to buy exactly the configuration of new hardware that's already attached; we wouldn't want to be limited to adding identical extents every time we expanded the storage.
Well ... if you are using hardware RAID, then striping LVM will likely not give you any benefit speed wise. (Unless multiple controllers are used and read/write can be done in parallel).
The speed benefit happens if LVM can stripe the sectors to SATA or SCSI drives where simultaneous read/writes can happen. With hardware RAID, the controller normally handles all that, so LVM striping is not normally done.
Even w/o the speed benefit of striping, you can still use LVM on top of hardware RAID to be able to increase drive size ... (add more physical drives to your RAID controller, then use pvresize to extend the PV, then use vgextend to extend the VG and lvextend to extend the LVs .. then ext2online (CentOS-4) or resize2fs (CentOS-5) can be used to grow the ext3 file system.
LVM done this way is quite fast ... but obviously you would need to provide another way to protect your data.
Presumably using hardware RAIDs as the physical volumes would take care of that.
Correct.
On 7/8/07, Johnny Hughes johnny@centos.org wrote:
Well ... if you are using hardware RAID, then striping LVM will likely not give you any benefit speed wise. (Unless multiple controllers are used and read/write can be done in parallel).
The speed benefit happens if LVM can stripe the sectors to SATA or SCSI drives where simultaneous read/writes can happen. With hardware RAID, the controller normally handles all that, so LVM striping is not normally done.
What we have is a hardware RAID enclosure that already has all the drives it can handle, and is approaching capacity. So what we're currently considering is adding an entire additional RAID device and using LVM to combine them into a VG as a pair of SCSI drives. So it appears we could configure them as either striped or linear, and LVM2 would handle growing even a striped configuration if we add a third RAID later.
A performance boost from LVM striping would be a bonus, but what I'm really asking is whether there's a penalty for LVM linear.
I hadn't considered, though, that we could also rotate larger drives into the existing RAID and then grow the filesystem once they were all upgraded.