- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: Extend ext3 filesystem RHEL 5
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-17-2007 07:26 AM
тАО04-17-2007 07:26 AM
Extend ext3 filesystem RHEL 5
I would like to resize a sile system in linux. My system is a HP DL380G5 with SmartArray P400 (SAS) controller.
I'm going to HP System Management Homepage and start Array Configuration Utility to extend my LUN. I resize it from 100GB to 150GB. Until then, everything is working fine.
Once the controller has finished its resising operation, I can see that the LUN is now 150GB, but Linux RHEL 5 doesn't see it. I still the old (original) size of it. Why?
To see the correct disk size, I have to reboot the system. Why? I would like to be able to resize filesystem online without having to reboot.
After rebooting, the size is now fine:
Disk /dev/cciss/c0d3: 157.2 GB
At this time, I'm unable to resize the filesystem. When I try resize2fs I have this message:
# resize2fs /dev/cciss/c0d3p1
resize2fs 1.39 (29-May-2006)
The filesystem is already 25599956 blocks long. Nothing to do!
Even I I try ext2online I have this:
# ext2online /dev/cciss/c0d3p1
ext2online v1.1.18 - 2001/03/18 for EXT2FS 0.5b
ext2online: new size is same as current (25599956)
When I use parted, I can see the free space at the end of the disk:
Model: Compaq Smart Array (cpqarray)
Disk /dev/cciss/c0d3: 157GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File
system
1 16.4kB 105GB 105GB primary ext3
105GB 157GB 52.4GB Free
Space
So my question is simple: is it possible to extend a filesystem in Redhat Enterprise 5 without having to restart the system like major OS are supporting? If yes, could you kindly let me know how?
Best regards,
Yanick Quirion
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-17-2007 07:46 AM
тАО04-17-2007 07:46 AM
Re: Extend ext3 filesystem RHEL 5
-- Rich
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-17-2007 07:56 AM
тАО04-17-2007 07:56 AM
Re: Extend ext3 filesystem RHEL 5
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-17-2007 08:02 AM
тАО04-17-2007 08:02 AM
Re: Extend ext3 filesystem RHEL 5
Is there any way to extend an ext3 partition that is not using LVM?
Thanks
Yanick
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-17-2007 08:03 AM
тАО04-17-2007 08:03 AM
Re: Extend ext3 filesystem RHEL 5
Probably not.
This is not a function of the OS as much as its a function of what the hardware supports.
HP-UX and Solaris are plagued by similar issues.
You might get the space recognized by partprobe, otherwise its boot time.
BTW, did you like the way RH moved ext2online functionality to resize2fs without so much as a note or modified man page?
Fun.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-17-2007 08:10 AM
тАО04-17-2007 08:10 AM
Re: Extend ext3 filesystem RHEL 5
Thank for your answer. I also notice the RHEL 5 is no longer provide ext2online. I was able to install from a RPM package.
I'm just wondering why we absolutely need an LVM to be able to increase a partition. Using GParted boot disk, I was able to increase it (http://gparted.sourceforge.net/screenshots.php), but I need to boot using that boot disk. I was unable to install their software under RHEL5 bacause there is to many package missing (unable to find them in .RPM). Even trying to compile from the .tar.gz, I was getting several error of compilation or missing component.
Windows is now providing a tool re resize NTFS file system. Why Linux (which should be lot better than windows) can't provide a good way to increase partion while they are mounted?
Regards :)
Yanick
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-17-2007 08:12 AM
тАО04-17-2007 08:12 AM
Re: Extend ext3 filesystem RHEL 5
You can extend the filesystem online, but you have to extend the device it sits on first. Your filesystem isn't on c0d3, it's on c0d3p1 (a partition on the LUN). After you expand the LUN you need to modify c0d3p1 to contain the new space, and then extend the filesystem. As long as you're careful and keep the start the same you should be able to grow the partition without LVM, but it is a potentially dangerous operation.
LVM exists to solve this kind of problem, though I don't know how good the Linux SmartArray driver is at scanning for newly-created LUNs.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-18-2007 12:33 AM
тАО04-18-2007 12:33 AM
Re: Extend ext3 filesystem RHEL 5
Thank you your answer.
I working with Solaris system, and the growfs command works well. However I don't know if I add space into a LUN on my RAID controller if the system will see it without rebooting. I just remember that growfs tool was working like a charm.
Back to Linux, the only way I see using LVM is to create a partition (c0d3p1), changing it to Linux LVM and create everyting from LVM program (vg01 - testing). That's fine. But, when you want to add space I'm doing it that way (if you have another one that may be better please let me know):
I'm going to my RAID controller to extend the LUN. I have to reboot for the system see the change. After that, I'm doing an fdisk on it (I may have to reboot again before being able to use the new partition), add another partition Linux LVM (c0d3p2) then extend my logical volume (vg01 - testing) created earlier, then use ext2online or extend2fs to extend the ext3 filesystem.
What will happened if I have more then 4 extention? I can't have more than 4 primary partition on a disk. I'm not sure that way (LVM) is a good way to extend a filesystem on linux... I'm wondering what's happen on a large system that is using a SAN and need to add space to a partiton; I'm not sure they will acces to reboot all the time to make this working.
Once again, if you have another idea how doing it, please let me know!
Regards :)
Yanick
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-18-2007 03:28 AM
тАО04-18-2007 03:28 AM
Re: Extend ext3 filesystem RHEL 5
The resize2fs program will resize ext2 or ext3 file systems. It can be
used to enlarge or shrink an unmounted file system located on device.
If the filesystem is mounted, it can be used to expand the size of the
mounted filesystem, assuming the kernel supports on-line resizing. (As
of this writing, the Linux 2.6 kernel supports on-line resize for
filesystems mounted using ext3 only.).
Haven't tried it... only echoing what the man page shows...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-18-2007 04:06 AM
тАО04-18-2007 04:06 AM
Re: Extend ext3 filesystem RHEL 5
You have to either use the LUN as a whole disk, which is generally considered a bad practice, or put a DOS-style partition map on it. If you lay down physical partitions you can only have 4 primary partitions, but one of those can be an "extended partition" to allow more physical partitions. It's silly, but we're stuck with the shortsighted design of DOS on this one.
For an internal array you could create the whole array as one or two big devices when you first set it up. Then you can create and modify partitions as needed without touching the underlying array configuration, it just looks like one big, fast disk to Linux (or any other OS. This is how almost every PC server I've seen over the past couple years has been configured. You can use partprobe to tell Linux about changes in the partition table. LVM isn't necessary, but it makes life easier because partitions have to be contiguous but logical volumes don't.
The other approach is to create the initial LUN(s) as whatever size you need and add a volume group. When you need additional storage you provision a new LUN and rescan the bus to pick up the new device. fdisk the new device to create a partition, pvcreate it, vgextend on to it, lvextend and ext2online/resize2fs as needed. This is how you have to do it with SAN storage, but personally I think it's unnecessary and overly complicated for the little internal arrays in PC servers.