2021-10-01 13:36:39

by Theodore Ts'o

[permalink] [raw]
Subject: Re: Issue with extension of ext4 filesystem on Rhel7

On Thu, Sep 30, 2021 at 11:52:20PM -0600, Andreas Dilger wrote:
> On Sep 30, 2021, at 23:43, Alok Jain <[email protected]> wrote:
> >
> > I have a problem while extending the ext4 filesystem on my block
> > device which was 12Tb now extended to 32tb. I uses growpart then
> > e2fsck followed by resize which failed, Any idea how to address
> > this?
> >
> > [root@prod-dev1 ~]# resize2fs /dev/sdj1
> >
> > resize2fs 1.42.9 (28-Dec-2013)
> >
> > resize2fs: New size too large to be expressed in 32 bits
> >
>
> Firstly, you should run with a newer version of e2fsprogs. That version
> is 8 years old and is missing a lot of bug fixes.
>
> Secondly, I don't think it is possibly to resize over 16TiB for a filesystem that
> started life smaller than 16TiB due to missing the "64-bit" feature, among
> others.

More modern versions of resize2fs do have the -b option, which will
reorganize the file system to support the 64-bit feature. HOWEVER,
this feature is not used very often, and may have bugs, and many
companies who support Enterprise Linux Distributions do not support
changing file system features using resize2fs or tune2fs on existing
file systems, simply because the quality control efforts they would
need to do before they would be willing to stand behind that feature
is more than they think it is worth.

In addition, you will tend to get much better performance if you
create a freshly formatted file system with the modern features that
are needed, and then copy the data over.

Finally, in addtion to e2fsprogs 1.42.9 being Very, Very Old, if you
are using such a prehistoric version of e2fsprogs, it's likely that
the Linux kernel, and other portions of your Linux userspace, are
antedeluvian as well. That means not only are you missing bug fixes,
you are likely missing many security bug fixes as well.

So I'd strongly suggest that you upgrade your entire Linux
distribution to something more modern, and not just e2fsprogs. In
particular, there have been many resize2fs bugs that were fixed since
1.42.9, and so I would not recommend any resize operation until you've
upgraded your software (especially off-line resizes such as that which
would be required to use resize2fs -b).

> Given that you have 20TB of free space, you should copy your 12TB
> of data to a newly-formatted 20TB filesystem, and then resize that once
> the original one is no longer needed. Not only does that avoid the resize
> issue, but also gives you a backup of the original data for a while.

And if you think it's too expensive to have the swing space necessary
to do the backup, I'd gently ask you to consider how much your 12TB of
data is worth to you.... and how much your time might be worth if you
have to reconstruct it if it were to get lost. Which is why regular
backups is always a good idea.

- Ted


2021-10-01 14:45:14

by Lukas Czerner

[permalink] [raw]
Subject: Re: Issue with extension of ext4 filesystem on Rhel7

On Fri, Oct 01, 2021 at 09:35:36AM -0400, Theodore Ts'o wrote:
> On Thu, Sep 30, 2021 at 11:52:20PM -0600, Andreas Dilger wrote:
> > On Sep 30, 2021, at 23:43, Alok Jain <[email protected]> wrote:
> > >
> > > I have a problem while extending the ext4 filesystem on my block
> > > device which was 12Tb now extended to 32tb. I uses growpart then
> > > e2fsck followed by resize which failed, Any idea how to address
> > > this?
> > >
> > > [root@prod-dev1 ~]# resize2fs /dev/sdj1
> > >
> > > resize2fs 1.42.9 (28-Dec-2013)
> > >
> > > resize2fs: New size too large to be expressed in 32 bits

Hi,

as others have already mentioned, unfortunatelly your file system does
not have 64-bit feature enabled and so you won't be able to simply
resize past 16TB. This feature was made default after RHEL7 GA, but sadly
it was likely too late for you, sorry about that.

You can try the advice given here, or you can contact RH support as they
might have some solution for you. However I am affraid it will always
involve backup for the reasons already mentioned.

>
> Finally, in addtion to e2fsprogs 1.42.9 being Very, Very Old, if you
> are using such a prehistoric version of e2fsprogs, it's likely that
> the Linux kernel, and other portions of your Linux userspace, are
> antedeluvian as well. That means not only are you missing bug fixes,
> you are likely missing many security bug fixes as well.

As I am sure you know RH is regularly fixing bugs and security bugs
especially and supporting RHEL releases for a very long time. As long as
10 years or even longer with ELS, that's much longer than say meager 3
years.

You can find more details here
https://access.redhat.com/support/policy/updates/errata/#Life_Cycle_Dates

-Lukas

2021-10-01 16:42:09

by Theodore Ts'o

[permalink] [raw]
Subject: Re: Issue with extension of ext4 filesystem on Rhel7

On Fri, Oct 01, 2021 at 04:42:39PM +0200, Lukas Czerner wrote:
>
> as others have already mentioned, unfortunatelly your file system does
> not have 64-bit feature enabled and so you won't be able to simply
> resize past 16TB. This feature was made default after RHEL7 GA, but sadly
> it was likely too late for you, sorry about that.
>
> You can try the advice given here, or you can contact RH support as they
> might have some solution for you. However I am affraid it will always
> involve backup for the reasons already mentioned.

It should also be noted that if you are using an enterprise linux
distro, something like a "Linux 3.10" or an "e2fsprogs 1.42.9" from an
enterprise linux has so many backports that it's going to be quite
different from an upstream version. As a result, you're probably
going to be better off seeking help from the enterprise linux's
support desk, since they will be set up to help you much better than
usptream developers.

Also, there is a big difference between what an enterprise linux might
support and a community distro. For example, even though Fedora has
defaulted to btrfs, Red Hat Enterprise Linux has not decided to
support btrfs. It was a techniolgy preview in RHEL 6 and 7, but it
was fully removed in RHEL 8.

So again, if you are using an Enterprise Linux distribution, you
should really ask their support folks so you can get their advice, and
find out what they will actually support.

Cheers,

- Ted