resize2fs does not expand filesystem; no error messages are displayed

Bug #1052529 reported by no!chance
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
e2fsprogs (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Assuming /dev/mapper/system-backup has 50GB of space ...

1. Expand an LVM volume with lvextend:
lvextend -L +50G /dev/mapper/system-backup

2. Resize the filesystem:
resize2fs /dev/mapper/system-backup

All seems OK, no warning or error message will be displayed. No errors in syslog, too.
BUT the filesystem is only 50G big, the additional 50G will not be available.

df -h will tell you, that there is 50GB of free space, but if you try to use this space, you will see the error: "filesystem full".

This bug exists at least since Ubuntu 10.10! Ubuntu 12.04.1 is also affected!

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Can you please post output from these commands:
$ sudo lvs
$ sudo vgs
$ sudo df -h -i
$ sudo df -h

Revision history for this message
no!chance (ralf-fehlau) wrote :

$ sudo lvs
  LV VG Attr LSize Origin Snap% Move Log Copy% Convert
  archive system -wi-ao 50,00g
  cvs system -wi-ao 5,00g
  home system -wi-ao 478,47g
  music system -wi-ao 210,00g
  mysql system -wi-ao 5,00g
  pics system -wi-ao 10,00g

$ sudo vgs
  VG #PV #LV #SN Attr VSize VFree
  system 1 7 0 wz--n- 903,47g 80,00g

$ sudo df -h -iDateisystem Inodes IBenutzt IFrei IUse% Eingehängt auf
/dev/md1 1,2M 406K 788K 35% /
udev 452K 661 451K 1% /dev
tmpfs 463K 51 463K 1% /tmp
tmpfs 463K 699 463K 1% /run
none 463K 5 463K 1% /run/lock
none 463K 9 463K 1% /run/shm
/dev/md0 24K 232 24K 1% /boot
/dev/mapper/system-home 30M 78K 30M 1% /home
/dev/mapper/system-archive 3,2M 12K 3,2M 1% /data/nfs/archive
/dev/mapper/system-cvs 320K 486 320K 1% /var/lib/cvsd
/dev/mapper/system-mysql 320K 1,1K 319K 1% /var/lib/mysql
/dev/mapper/system-music 14M 20K 14M 1% /data/nfs/music
/dev/mapper/system-pics 640K 13K 628K 2% /data/nfs/picture

$ sudo df -h
Dateisystem Größe Benutzt Verf. Verw% Eingehängt auf
/dev/md1 19G 11G 7,4G 59% /
udev 1,8G 4,0K 1,8G 1% /dev
tmpfs 1,9G 1,6M 1,9G 1% /tmp
tmpfs 741M 1,2M 740M 1% /run
none 5,0M 0 5,0M 0% /run/lock
none 1,9G 220K 1,9G 1% /run/shm
/dev/md0 92M 40M 52M 43% /boot
/dev/mapper/system-home 475G 460G 16G 97% /home
/dev/mapper/system-archive 50G 41G 8,2G 84% /data/nfs/archive
/dev/mapper/system-cvs 5,0G 154M 4,8G 4% /var/lib/cvsd
/dev/mapper/system-mysql 5,0G 184M 4,8G 4% /var/lib/mysql
/dev/mapper/system-music 209G 164G 45G 79% /data/nfs/music
/dev/mapper/system-pics 10G 7,2G 2,7G 73% /data/nfs/picture

After a reboot or a umount / mount, the additional 50G are available. In Ubuntu 10.04, there was no problem with online resize. The filesystem tpe is ext3. After a reboot you can see, that I could copy data on /dev/mapper/system-music.

Thank you for your help!
Regards,
Ralf

Revision history for this message
no!chance (ralf-fehlau) wrote :

Hi Dmitrijs,

I have found a hint ....

$ sudo file -s /dev/dm-5
/dev/dm-5: Linux rev 1.0 ext3 filesystem data, UUID=68302738-2f99-4db6-8fbb-4fad0759d423 (needs journal recovery) (large files)

Could I be, that resize2fs does not recognize the need of a journal recovery?
But why does the filesystem look ok, when the system is rebooted?

Kind Regards,
Ralf

Revision history for this message
no!chance (ralf-fehlau) wrote :

A new create LVM volume and a ext3 filesystem seeems to be ok. And online resizing is possible without problems.

$ sudo lvcreate -n tmp -L 1G system
$ sudo mkfs.ext3 /dev/mapper/system-tmp
$ sudo file -s /dev/mapper/system-tmp
/dev/mapper/system-tmp: symbolic link to `../dm-7'
$ sudo file -s /dev/dm-7
/dev/dm-7: Linux rev 1.0 ext3 filesystem data, UUID=f676c63e-81e6-4fc8-a78b-8247082af1f6 (large files)

No message from the file command about a need to journal recovery!

Regards,
Ralf

Revision history for this message
no!chance (ralf-fehlau) wrote :

Ok ok, I found that the "file" command displays "needs journal recovery" whenever the filesystem is mounted. Do you have an idea, what was going wrong?

Revision history for this message
no!chance (ralf-fehlau) wrote :

Problem solved!

The partition has an ext3 filesystem on it, but was mounted in /etc/fstab as an ext4 partion! Changing fstype to ext3 in /etc/fstab solves this problem. Now I can resize it online without problems.

Please close this bug report. Thank you for your hints.

Regards,
Ralf

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

If you wish to convert ext3 to ext4 you can use this guide:
https://ext4.wiki.kernel.org/index.php/Ext4_Howto#Converting_an_ext3_filesystem_to_ext4

Thanks for following up on this bug.

Changed in e2fsprogs (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers