Canít read a block bitmap while trying to resize after shrinking LVM partition
FedoraForum.org - Fedora Support Forums and Community
Results 1 to 7 of 7
  1. #1
    Join Date
    Aug 2019
    Location
    Peru
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unhappy 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:

    HTML Code:
    resize2fs /dev/mapper/FEDORA-01 88GB
    HTML Code:
    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:
    HTML Code:
    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.

  2. #2
    Join Date
    Aug 2019
    Location
    Peru
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Canít read a block bitmap while trying to resize after shrinking LVM partition

    I did fsck.ext4 -p /dev/mapper/FEDORA-01 and answered no to abort, and then yes to everything. Now this is the result when I do
    root@ubuntu:~# fsck.ext4 -f /dev/mapper/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<y>? no
    Pass 1: Checking inodes, blocks, and sizes
    Pass 2: Checking directory structure
    Pass 3: Checking directory connectivity
    Pass 4: Checking reference counts
    Pass 5: Checking group summary information
    Error reading block 23068672 (Attempt to read block from filesystem resulted in short read) while reading inode and block bitmaps. Ignore error<y>?

  3. #3
    Join Date
    Jun 2009
    Location
    Alkmaar The Netherlands
    Posts
    282
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Canít read a block bitmap while trying to resize after shrinking LVM partition

    Dear cfoch,

    I'm not a filesystem expert,but what I should try: It looks like the very first resize2fs did not finish completely. In each case, if data are important, carefully keep the dd image or clone the complete disk to another one and work with that one. The e2fsck mentions it's superblock with 100G, so apparently the filesystem is there. Difference in block count is 12G, so that matches the operation. What happens if you just increase the volume to it's original size? Volume size and super block size then match. If fsck runs through, the filesystem should be ok again. Then carefully look whether resize2fs completes without error, may be reboot after that and check the filesystem size with df. You should always be able to try: "fsck -n", it does not modify anything.

    Good luck
    H.Janssen
    Alkmaar
    The Netherlands

  4. #4
    Join Date
    Jun 2009
    Location
    Alkmaar The Netherlands
    Posts
    282
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Canít read a block bitmap while trying to resize after shrinking LVM partition

    Dear cfoch,

    Is trying to read data after the LV boundary. If you increase the LV to it's original size, then I assume it works again.

    Regards,
    H.Janssen
    Alkmaar
    The Netherlands

  5. #5
    Join Date
    Nov 2016
    Location
    Germany
    Posts
    48
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Canít read a block bitmap while trying to resize after shrinking LVM partition

    I would try then to revert your changes, first # lvresize and then # resize2fs. Perhaps there is something missing and still untouched.

    Best regards,
    Bequim„o

  6. #6
    Join Date
    Aug 2019
    Location
    Peru
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Canít read a block bitmap while trying to resize after shrinking LVM partition

    yes... resizing it up fixed the problem... thanks

  7. #7
    Join Date
    Jun 2009
    Location
    Alkmaar The Netherlands
    Posts
    282
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Canít read a block bitmap while trying to resize after shrinking LVM partition

    Dear Cfoch,

    Congratulations, data saved. Good moment to archive the data, and to find out why resize2fs does not complete correctly.
    If resizing is necessary but resize2fs fails, and If the data are archived in such a way that they can be 100% sure recovered, workaround could be to resize the LV, make a filesystem on it and restore the data.

    Kind regards,
    H.Janssen
    Alkmaar
    The Netherlands

Similar Threads

  1. Shrinking a Partition
    By SeVaS2016 in forum Using Fedora
    Replies: 16
    Last Post: 17th May 2015, 06:53 AM
  2. Replies: 1
    Last Post: 5th August 2011, 10:51 PM
  3. LVM 2 Partition and Shrinking
    By demoka in forum Using Fedora
    Replies: 1
    Last Post: 4th December 2009, 05:47 AM
  4. Group 128's block bitmap is bad after upgrade to Fedora 7
    By vsem in forum Installation, Upgrades and Live Media
    Replies: 0
    Last Post: 25th June 2007, 08:26 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •