Skip to contentSkip to conversation

Q: Online resizing ext3 FS

linux-lvm Chris Osicki 4 participants 6 messages Sep 12, 2007 – Sep 18, 2007 MD RAID

lore
Share & tools
lore
#0 lore raw

Hi

I apologize in advance for asking a question not really appropriate for this mailing list, but I couldn't find a better place with lots of people managing lots of disk space.

The question:
Has anyone of you been using ext2online to resize (large) ext3 filesystems? I have to do it going from 500GB to 1TB on a productive system I was wondering if you have some horror/success stories.
I'm using RHEL4/U4 (kernel 2.6.9) on this system.

Thanks for your time.

Regards,
Chris

UNIX System Engineer
Swisscom Mobile Ltd.
Switzerland

_______________________________________________
linux-lvm mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

#1 lore raw
Quoted 11 lines · Chris Osicki

Hi

I apologize in advance for asking a question not really appropriate for this mailing list, but I couldn't find a better place with lots of people managing lots of disk space.

The question:
Has anyone of you been using ext2online to resize (large) ext3 filesystems? I have to do it going from 500GB to 1TB on a productive system I was wondering if you have some horror/success stories.
I'm using RHEL4/U4 (kernel 2.6.9) on this system.

Yes, I tried to online resize a similar filesystem (600 MB to 1.2 TB) and it didn't work.

At some point, resize2fs would just exit with errors.
I tried to do it several times before I figured out what's missing; sometimes, I interrupted the process with ctrl+c. No data loss occurred.

To do an online ext3 resize, the filesystem needs a "resize_inode" feature. You can check the features with dumpe2fs:

# dumpe2fs -h /dev/sda1
(...)
Filesystem features:      has_journal resize_inode dir_index filetype needs_recovery sparse_super large_file
(...)

This flag is added by default only in the recent versions of e2progs (1.39 and later AFAIR); before, it had to be specified manually. So with RHEL4, you may be out of luck.

In the end, I had to to an offline resize.

I had this volume mirrored on another machine, so I didn't worry that much though.

Also, to resize a filesystem of that size you would need plenty of RAM (if you have about 1 GB RAM free, it should be just enough; otherwise, your machine will be swapping, and the process will take longer). Before, I tried to resize it on a machine with 256 MB and several snapshots; resize2fs was killed because of OOM, and still, no data loss.

If you have that an old kernel, take care if you're using snapshots; I believe they are stable only as of 2.6.22 (before 2.6.22 snapshots needed a lot of RAM; before 2.6.18 there were problems with snapshots removing etc.).

Would be good to add some of that info to LVM HOWTO.

Signature · 2 lines
Tomasz Chmielewski
http://wpkg.org
#2 lore raw
Quoted 7 lines · Tomasz Chmielewski
Quoted 6 lines · Chris Osicki

Hi

I apologize in advance for asking a question not really appropriate for this mailing list, but I couldn't find a better place with lots of people managing lots of disk space.

Quoted 5 lines
Quoted 5 lines

The question:
Has anyone of you been using ext2online to resize (large) ext3 filesystems? I have to do it going from 500GB to 1TB on a productive system I was wondering if you have some horror/success stories.
I'm using RHEL4/U4 (kernel 2.6.9) on this system.

That kernel seems to be a bit old. Better upgrade first.

I did some resizes in that size range. Although just adding 50-200GB not doubling the size in one go. But I see no reason it should fail. Growing the fs was always quick (a minute or two) and painless. Maybe because I have used -Tlargefile4 for mke2fs so the amount of inodes is drastically reduced.

Quoted 10 lines

Yes, I tried to online resize a similar filesystem (600 MB to 1.2 TB) and it didn't work.

At some point, resize2fs would just exit with errors.
I tried to do it several times before I figured out what's missing; sometimes, I interrupted the process with ctrl+c. No data loss occurred.

To do an online ext3 resize, the filesystem needs a "resize_inode" feature. You can check the features with dumpe2fs:

So was that what you were missing or did some other error occur?

I tried to resize an fs without resize_inode and it just plain told me and abrted.

MfG
Goswin

#3 lore raw
Quoted 1 line · Goswin von Brederlow

Tomasz Chmielewski <[email protected]> writes:

(...)

Quoted 8 lines
Quoted 8 lines

Yes, I tried to online resize a similar filesystem (600 MB to 1.2 TB) and it didn't work.

At some point, resize2fs would just exit with errors.
I tried to do it several times before I figured out what's missing; sometimes, I interrupted the process with ctrl+c. No data loss occurred.

Quoted 7 lines
Quoted 2 lines

To do an online ext3 resize, the filesystem needs a "resize_inode" feature. You can check the features with dumpe2fs:

So was that what you were missing or did some other error occur?

I tried to resize an fs without resize_inode and it just plain told me and abrted.

It was working for some time (15 or 30 minutes?), the fs grew a couple of gigabytes, and then it exited with an error. At first I thought it's because the fs might need fsck, but after I did fsck, it didn't help - next online tries didn't increase the fs anymore.

Signature · 2 lines
Tomasz Chmielewski
http://wpkg.org
#4 lore raw
In reply to Goswin von Brederlow
Quoted 11 lines · Goswin von Brederlow
Quoted 8 lines · Tomasz Chmielewski
Quoted 6 lines · Chris Osicki

Hi

I apologize in advance for asking a question not really appropriate for this mailing list, but I couldn't find a better place with lots of people managing lots of disk space.

Quoted 9 lines
Quoted 6 lines
Quoted 6 lines

The question:
Has anyone of you been using ext2online to resize (large) ext3 filesystems? I have to do it going from 500GB to 1TB on a productive system I was wondering if you have some horror/success stories.
I'm using RHEL4/U4 (kernel 2.6.9) on this system.

That kernel seems to be a bit old. Better upgrade first.

You don't upgrade when using the stable releases... that's the whole idea, you don't have to worry about a new versions of anything, the bugs and security issues are backported, but the version stays the same. Highly desirable for "must work" systems, no so nice for doing cutting edge stuff using nice features you don't have. :-(

Signature · 3 lines
bill davidsen <[email protected]>
 CTO TMR Associates, Inc
 Doing interesting things with small computers since 1979
#5 lore raw
Quoted 4 lines · Bill Davidsen
Quoted 3 lines · Goswin von Brederlow
Quoted 2 lines
Quoted 2 lines

I'm using RHEL4/U4 (kernel 2.6.9) on this system.

Quoted 8 lines
Quoted 2 lines

That kernel seems to be a bit old. Better upgrade first.

You don't upgrade when using the stable releases... that's the whole idea, you don't have to worry about a new versions of anything, the bugs and security issues are backported, but the version stays the same. Highly desirable for "must work" systems, no so nice for doing cutting edge stuff using nice features you don't have. :-(

Debian has 2.6.18 in stable. And they Debian stable is way too old to use. :)

MfG
Goswin