cancel
Showing results for 
Search instead for 
Did you mean: 

HARDWARE RAID and RH 7.2

SOLVED
Go to solution
Francisco Mancardi_1
Frequent Advisor

HARDWARE RAID and RH 7.2

Hi:
I've installed RH7.2 in an IBM X235 with
ServerRaid 5i.
During install /dev/sda2 was created and
mounted on /.
Now I've added 17Gbytes using RaidMan.
I'would like to extent the size of /dev/sda2
but I cant't found any related info.

I've worked using sw raid on Solaris
(using Veritas Volume Manager) and this kind
of operation was simple admin task.

May be I have to install linux in another way ?

Any Hint ?

Best Regards

Francisco
2 REPLIES
Steven E. Protter
Exalted Contributor

Re: HARDWARE RAID and RH 7.2

I don't think you need to reinstall, thoguh that would work.

If you have lvm, the process is lvextend followed by extendfs to make the filesystem fill up the volume.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Paulo A G Fessel
Trusted Contributor
Solution

Re: HARDWARE RAID and RH 7.2

You'll have to change your partition size with fdisk. This operation cannot be done online, but OTOH you don't have to reinstall the system. However, the root (/) partition must have been created in a cylinder greater than where swap and (probably) /boot are. That is: your partition layout MUST be

/dev/sda1 /boot
/dev/sda2 swap
/dev/sda3 /

or

/dev/sda1 swap
/dev/sda2 /

that is, your root partition must be THE LAST PARTITION in the disk.

Verify that you have "resize2fs" program installed: "rpm -qi e2fsprogs" should show at least the 1.19 release.

Then, reboot the server with RH7.2 installation CD. Probably it will detect your IPS Raid and you'll be able to do a fdisk /dev/sda. If not, you'll have to do the devices yourself with "mknod /tmp/sda b 8 0" and "mknod /tmp/sda2 b 8 2".

Now comes the dangerous part. You must know exactly either how much "cylinders" these additional 17 GB make. When you start fdisk it will tell you this information. Take note of it.

Next, check where your root partition has been created (the "Start" field of fdisk for the root partition). Take note of the number, you'll need it.

Now, take a deep breath and delete the original root partition with the "d" command. BUT NOT WRITE THE NEW PARTITION TABLE TO THE DISK YET! I don't need to tell you that this would erase all of your data.

Re-create the root partition with the same initial cylinder but with the new ending cylinder reported by fdisk when you started it. After you check the partition is correct, then you can write the new partition table with the "w" command.

After doing this, create an "/a" directory to mount your original partition with the command "mount /tmp/sda2 /a". Then copy resize2fs with "cp /a/sbin/resize2fs /sbin" and dismount /a.

Now, issue a "e2fsck -y -f /tmp/sda2" to verify that the file system is stable. This command will repair any errors found.

Finally, issue a "resize2fs -p /tmp/sda2". If it doesn't work, you can try "resize2fs -fp /tmp/sda2" but in this case keep a backup next to you, you may need it. =:-0

If everything goes all right and if you haven't got error messages, you're probably done. Reboot the system and verify that your partition has been resized.

As a side note, you may install LVM in the next time and prevent the major pain of this process that is repatitioning the disk.
HTH
Paulo Fessel
L'employé propose, le boss dispose.