April 27, 2007 / 0 Comments
A while back I faced a difficult issue concerning a full partition that needed to be expanded – logical volume management was in use but there was no extra physical disk space to be partitioned. Here’s what I did… The solution/information below pertains to a CentOS/Redhack EL box. Release 4 or higher. BACK UP YOUR DATA!
Real World Problem:
Server "foo" has 50KB free on /home and has no additional disks to grow to. This server has all slots full and is running RAID5.
Real World Solution:
Copy the partition to another new disk (or disk array) pop into cfdisk, create a new partition on the extra free space, grow the logical volume. Resize with ext2online. Here’s a step-by-step:
- Use DD or whatever disk imaging to copy the disk to the new disk
- Boot from the new disk
- Download the CFDisk RPM
- Download ncurses-4 and ncurses-5
- Install above mentioned RPM’s
(rpm -ivh cfdisk-glibc-0.8g-1.i386.rpm; rpm –force -ivh ncurses4-5.0-12.i386.rpm; rpm –force -ivh ncurses-devel-5.4-13.i386.rpm)
- Run cfdisk /dev/device (probably /dev/sda or sdb .. you should know the device!)
- Create new partition and write changes – reboot.
- Create pv (pvcreate /dev/sda6) this creates the pv on sda6
- Add pv to volume group (vgextend VolGroup00 /dev/sda6) this
- vgdisplay will show volume group’s total size, now we can extend our lv
- Unmount the mount being used (in our case it was /home) umount /home
- lvextend -L+100GB /dev/mapper/VolGroup00/LogVol00-Home – This extends the current lv by 100GB
- Mount the partition back to it’s mountpoint (as specified in fstab) mount /home
- Use ext2online to grow the partition to it’s full size – yes, while it’s mounted! (ext2online /home &)
"df -h" will show the partition growing before your eyes!
- Enjoy a cool beverage.
The reason for using CFDisk and not FDISK is because fdisk will not recognize the disk size change because DD copies everything – all structures – cfdisk is the only utility (at least that I found) that can resize in this type of situation.
April 23, 2007 / 0 Comments
A long time ago I performed an installation of an Oracle cluster. This cluster, unlike other real clusters, is a cluster using RedHat Cluster Suite (RHCS) and involved two Dell 1950’s each with 8GB RAM and two 146GB 15K SAS drives. Each of these machines are connected to a CLARiiON SAN via QLogic FC cards through a pair of MC Data FC switches.
This cluster is more of an active/active cluster but, unlike Oracle’s RAC clustering software, there are four instances running on one machine and four running on the other; effectively evening out the load. There are quite a few downsides to this method which I will outline below. There are, however, a few pro’s as well.
- Allows for applications not written for RAC cluster to still be used in a clustered environment for High Availability.
- Expensive! RHCS was needed for this setup and GFS ($2000 per node per year) was needed. This company chose to use a supported version of Linux, Cluster Suite and GFS. Of course, you can do this freely as the OS, File System and cluster utility are all freely available.
- Not truly load balanced. This setup was meant to be load balanced but they are still two separate Oracle installations on two machines. The clustering suite just allows for proper failover.
- RHCS (Red Hat Cluster Suite) was never made to support Oracle on both systems. Oracle’s Enterprise Manager will not start for both installations on the same Ethernet adapter. This situation would be encountered if both installations would fail over to one machine. EM is inaccessible for the databases which failed over.
- Lots and lots of editing needed to be done to make Oracle work properly – editing the startup scripts, oratab, creating more custom startup scripts and more. In general this was a messy install.
In summary, I would not recommend using Oracle with RHCS. I would highly recommend that the application be re-written to be “RAC Compatible” so that you can fully utilize the power of Oracle load-balancing. This will save time and money in the short run and possibly the long run depending on what kind of support issues we might encounter. RHCS is great but I wouldn’t recommend it to anyone for Oracle.