Red HatThis forum is for the discussion of Red Hat Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm running RHEL4 Update 4 32-bit and have an Oracle database on it with the datafiles mounted to /oracle, which is a CX3-10 DAS (Dell Poweredge 2850 server).
I'm running out of space on my DAS and need to expand one of the LUNs. Is there anything I need to configure in Red Hat to accommodate the expanded size of the LUN?
If your using logical volumes I would suggest presenting a new LUN to the server and simply adding the disk to the volume group, you should be able to grow the filesystem then. Being RHEL4 you'll have to umount the filesystem to grow it safely.
If its a partition then I would suggest creating a new LUN of the right size, use logical volumes and move the data across, that way next time you'll have it alot easier.
The LUN has already been presented to Red Hat, I'm simply wanting to expand the size of the LUN on the DAS-side of things (not creating a new LUN). I was planning on shutting down the OS and then expanding the LUN. After starting up the OS again, is there anything I need to configure in the OS to recognize the change, or will Red Hat see that same LUN is still presented to it, and now it's just a bigger size?
Once you've rebooted the O/S should see the disk as a different size, then all you have to do is resize it.
We don't normally expand LUN's but there are two ways you could do it. And of course always make sure you have a backup (and your have tested a restore too! (been caught out by that as well))
1 - shutdown your server (just to be safe).
2 - Expand LUN
3 - Boot server using a live CD such as gpartd and grow the disk/file system.
or
3 - boot server back into redhat, umount the disk and use fdisk to increase the parition size, then grow the filesystem. You will need to delete the partition and re-create it at the larger size. This shouldn't destroy the data, just resize the partition, then grow the fs.
Last edited by FragInHell; 10-13-2009 at 07:04 PM.
Reason: typo again
Hi, I'm not super confident in my Linux abilities quite yet. It looks to me like I will need to use parted because when I do an fdisk -l, I see this:
WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.
Disk /dev/sdb: 1477.1GB
Device Boot = /dev/sdb1
Start = 1
End = 179585
Blocks = 1442514047+
Id = ee
System = EFI GPT
Could you explain a little more what commands I need to issue to increase the partition size? Will this destroy any existing data on the LUN if it is unmounted?
Is this an itanium box btw?
If its I've not done it for a itanium before and I normally use fdisk. I'll include the fdisk instructions as I don't use parted you may need to look up the alternatives for parted.
You don't need to do so many fsck's as I've done here but for the time it takes to fsck vs the time it takes to restore etc I think its worth it.
When you delete the partition your only remove it from the partition table, so the data still exists on the disk. The disk will need to be unmounted in order to make all of these changes. But as always...Backup First.....
umount the volume
fsck it (fsck -f /dev/sdb1)
shutdown the server.
expand the LUN.
restart the server.
unmount the volume
fsck it again !
now resize the partition (this would be for fdisk)
fdisk /dev/sdb
delete partition 1 (d)
create partition 1 (n then 1) (using the entire disk)
save (w)
now we need to grow the filesystem as well
resize2fs -p /dev/sdb1
mount the file system.
I tried your commands, and the filesystem seemed to resize and is showing the correct size when I issue a "fdisk -l". However, when I do a "df -h", I still see the original size. ??
According to Apple,[1] "Do not assume that the {LBA} size is always going to be 512 bytes." Modern storage devices such as solid-state drives may contain 1024-byte LBAs.
Since you have GPT on your HDD, cylindars/heads.... size does not have to be correct. Since this is the first time I have heard of GPT, I can not help you any further, but someone must know.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.