[Bug 656115] Re: cannot resize ext4 once GDT blocks exhausted

Launchpad Bug Tracker 656115 at bugs.launchpad.net
Mon May 21 05:41:38 UTC 2012


Status changed to 'Confirmed' because the bug affects multiple users.

** Changed in: e2fsprogs (Ubuntu)
       Status: New => Confirmed

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to e2fsprogs in Ubuntu.
https://bugs.launchpad.net/bugs/656115

Title:
  cannot resize ext4 once GDT blocks exhausted

Status in “e2fsprogs” package in Ubuntu:
  Confirmed

Bug description:
  With an ext4 filesystem, you can shrink and expand a filesystem until
  you run out of GDT blocks.  After that the filesystem cannot be
  resized, neither shrunk nor expanded, even if unmounted.

  Although this issue is most relevant in an LVM environment, here's
  some code to demonstrate the issue using a loopback device.  The code
  needs to be run as root.

  dd if=/dev/zero of=ext4.img bs=1M count=10000
  dev=$(losetup -vf ext4.img| cut -d" " -f4)
  mkfs.ext4 ${dev} 5M
  tune2fs -l ${dev} | grep -i gdt
  resize2fs ${dev} 3G
  tune2fs -l ${dev} | grep -i gdt
  resize2fs ${dev} 2G
  tune2fs -l ${dev} | grep -i gdt
  resize2fs ${dev} 3G
  tune2fs -l ${dev} | grep -i gdt
  resize2fs ${dev} 5G
  tune2fs -l ${dev} | grep -i gdt
  resize2fs ${dev} 3G

  At this point resize2fs returns an error:

  resize2fs: /dev/loop0: The combination of flex_bg and
         !resize_inode features is not supported by resize2fs.

  This means the filesystems is 5GB forever.  It cannot be resized,
  expanded or shrunk.

  In contrast, ext3 does not have this issue.

  mkfs.ext3 ${dev} 5M
  tune2fs -l ${dev} | grep -i gdt
  resize2fs ${dev} 3G
  tune2fs -l ${dev} | grep -i gdt
  resize2fs ${dev} 2G
  tune2fs -l ${dev} | grep -i gdt
  resize2fs ${dev} 3G
  tune2fs -l ${dev} | grep -i gdt
  resize2fs ${dev} 5G
  tune2fs -l ${dev} | grep -i gdt
  resize2fs ${dev} 3G

  Workaround: when creating an ext4 filesystem, use the extended option
  resize=.  For example:

  mkfs.ext4 -E resize=100000000000 ${dev} 5M
  tune2fs -l ${dev} | grep -i gdt
  resize2fs ${dev} 5G
  tune2fs -l ${dev} | grep -i gdt
  resize2fs ${dev} 3G

  This option can be added to /etc/mke2fs.conf.

  This is on Ubuntu Lucid 10.04 with the latest updates.

  # lsb_release -rd
  Description:	Ubuntu 10.04.1 LTS
  Release:	10.04

  # dpkg -l | awk '/e2fsprogs/ {print $2, $3}'
  e2fsprogs 1.41.11-1ubuntu2

  # uname -rvmpio
  2.6.32-25-generic #44-Ubuntu SMP Fri Sep 17 20:26:08 UTC 2010 i686 unknown unknown GNU/Linux

  # cat /proc/version_signature
  Ubuntu 2.6.32-25.44-generic 2.6.32.21+drm33.7

  Regards,
  - Robert

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/e2fsprogs/+bug/656115/+subscriptions




More information about the foundations-bugs mailing list