Web lists-archives.com

Re: Please help me resize my ext4 file system to size > 16TB

On Mon, 12 Jun 2017, Ramasubramanian Ramesh wrote:
> >I think you ran into this problem:
> >http://blog.ronnyegner-consulting.de/2011/08/18/ext4-and-the-16-tb-limit-now-solved/
> >
> >I know of no way to get resize2fs to work with partitions larger than
> >16 TB, however in the blog post it's explained how to make mke2fs
> >work with such sizes by editing /etc/mke2fs.conf. Not sure if this is
> >an option for you though.
> I have no way of backing up 16TB to use mke2fs. There is a solution (
> https://askubuntu.com/questions/779754/how-do-i-resize-an-ext4-partition-beyond-the-16tb-limit),
> but needs updates that I am not ready to do yet. So, I am checking if
> there is something that I missed that will allow me to resize without
> having to upgrade release/kernel/e2fsprogs and all of its friends.

You implied you don't even have a backup of that data, which means you
have exactly one chance of getting it right.  This is a non-starter.

First: you are warned to NEVER proceed with a filesystem resize before
you have a valid, current, and *tested* backup.

You are also warned that the ext4 *conversion* to 64-bit block numbers
so as to be able to span more than 16TB is NOT your typical filesystem
resize operation in the first place.  It touches a *lot more* of the
filesystem and the risks are much higher than just adding an extent.
Even if it works flawlessly, it is not going to result in an optimal

The recommended procedure is to create a *new* filesystem and restore
from backup (or copy from the legacy filesystem if you find a way to
have both at the same time).  And for such large filesystems, the use of
"xfs" instead of "ext4" should be seriously considered.

Second: whatever reasons you had, or excuses you gave yourself, nothing
is going to get your data back if the filesystem ends up damaged beyond
repair and you don't have a backup.

"it would require updates that I am not ready do to yet"? Then DON'T.
Find another way to solve your immediate problem, and postpone the
larger filesystem for when you update everything.

You *have* been warned.

Now, you did not give us any idea of what is in that filesystem and what
you use it for, but as an alternative to resizing it, maybe you could
create several extra filesystems instead of enlarging the one you have
and attaching these extra ones to wherever you need more space?  Any
subdirectory can be made an entirely separate filesystem...

This wouldn't work for everything (e.g. you can't hardlink or
fast-rename across filesystems), but maybe it would work for whatever
you use that big filesystem for?

  Henrique Holschuh