Can't read a block bitmap while trying to resize after shrinking LVM partition

Hello, I have tried to shrink my partition which was 44GB free from about 100 GB to 88GB. I run the two following commands:

resize2fs /dev/mapper/FEDORA-01 88GB
lvreduce -L -12G /dev/mapper/FEDORA-01

After that everything went wrong. When I try to mount my partition I see in Nautilus a dialog saying:

Error mounting /dev/dm-1 at /media/ubuntu/FEDORA-HOME: wrong fs type, bad option, bad superblock on /dev/mapper/FEDORA-01, missing codepage or helper program, or other error

Then I have tried this:
root@ubuntu:~# e2fsck -fy /dev/FEDORA/01
e2fsck 1.44.6 (5-Mar-2019)
The filesystem size (according to the superblock) is 26214400 blocks
The physical size of the device is 23068672 blocks
Either the superblock or the partition table is likely to be corrupt!
Abort? yes

root@ubuntu:~# resize2fs /dev/FEDORA/01
resize2fs 1.44.6 (5-Mar-2019)
Resizing the filesystem on /dev/FEDORA/01 to 23068672 (4k) blocks.
resize2fs: Can't read a block bitmap while trying to resize /dev/FEDORA/01
Please run 'e2fsck -fy /dev/FEDORA/01' to fix the filesystem
after the aborted resize operation.
root@ubuntu:~# e2fsck -fy /dev/FEDORA/01
e2fsck 1.44.6 (5-Mar-2019)
The filesystem size (according to the superblock) is 26214400 blocks
The physical size of the device is 23068672 blocks
Either the superblock or the partition table is likely to be corrupt!
Abort? yes

Yes I tried this from an Ubuntu image, but what is corrupted is my Fedora partition. Any suggestion? I have very important data there. At least I have made a deep copy with dd, but unfortunately after the corruption.

Thanks in advance.

  Rounding size to boundary between physical extents: 8.00 MiB.
  WARNING: Reducing active logical volume to 92.00 MiB.
  THIS MAY DESTROY YOUR DATA (filesystem etc.)
Do you really want to reduce testvg/testlv? [y/n]: 

I’m pretty sure you saw something like this and now understand the importance of backup.
The proper method to resize a logical volume:

What you need to do next depends on the importance of the data and the availability of the backup.


If your data is important and you have no backup then you should do it first.
Using dd, backup all the PVs of your FEDORA VG which you can see here:

sudo pvs

Then try to restore the original LV size:

sudo lvresize -L +12G /dev/FEDORA/01

Or use all the free space:

sudo lvresize -l +100%FREE /dev/FEDORA/01
1 Like

It fixed the problem. Now I recovered all my HOME directory. Awesome!
But now I want to shrink my partition to make more room for my root partition.

1 Like

Follow the link to the guide above after you make a new backup and verify its integrity.

1 Like