Web lists-archives.com

Re: Grow an ext4 filesystem

On 2017-06-09 10:15 -0400, David Parker wrote:

> I have a storage server running Debian 7.6 x64.  It's an HP server with 24
> HDDs and a hardware RAID controller.  It has a 2.9 TB ext4 filesystem which
> resides on a RAID 5 volume, and I recently needed to grow this filesystem
> so I added more disks to the volume and then used parted to grow the
> partition to the new size of 5 TB, so the space is now available in that
> partition:
> # parted print /dev/sdb
> Model: HP LOGICAL VOLUME (scsi)
> Disk /dev/sdb: 5001GB
> Sector size (logical/physical): 512B/512B
> Partition Table: gpt
> Number  Start   End     Size    File system  Name     Flags
>  1      1049kB  5001GB  5001GB  ext4         primary
> However, the filesystem is still stuck at the old size:
> # df -h /dev/sdb1
> Filesystem      Size  Used Avail Use% Mounted on
> /dev/sdb1       2.7T  2.5T  104G  97% /export
> I cannot figure out how to resize the actual ext4 filesystem to use the
> added space.  I have tried both resize2fs without any luck.  When I try
> resize2fs, I get this error:
> # resize2fs /dev/sdb1
> resize2fs 1.42.5 (29-Jul-2012)
> resize2fs: /dev/sdb1: The combination of flex_bg and
>     !resize_inode features is not supported by resize2fs.
> In a potentially stupid move, I did indeed remove the resize_inode feature
> from this filesystem in order to get parted to work with it, which
> ultimately proved unnecessary, but now I cannot add it back:
> # tune2fs -O resize_inode /dev/sdb1
> tune2fs 1.42.5 (29-Jul-2012)
> Setting filesystem feature 'resize_inode' not supported.
> Is there a way I can resize this filesystem to use the additional 2 TB
> available to it?

By using a newer e2fsprogs version, this particular problem has been
fixed in e2fsprogs 1.42.8[1].


1. https://bugs.debian.org/696746