1

I may have been somewhat foolish, but kept putting off the warning signs about the impending failure of my EXT4-on-LVM Ubuntu machine (like the partition remounting itself R/O, SMART errors, etc.) and one day, the FSCK shows "filesystem still has errors"... gulp

I've bought a replacement drive, and I have confirmed I can still see data using photorec, but I was wondering... is there anyway to mount an EXT4 volume even though the OS knows it's broken?

See, I don't need everything on the drive. I basically would like to recover whatever I can from one directory's worth of text files. Running photorec will (probably) get those files back, but it'll mean running lots of greps against the recovered files to find the one-or-two lines of files that I can then use to figure out the bits I'm missing.

Any guidance gratefully accepted!

UPDATE: From another machine, when I try to mount the drive, I get:

root@Minilith:~# mount /dev/mapper/xubuntu--vg-root /mnt/
mount: /mnt: mount(2) system call failed: Structure needs cleaning.

Running fsck against that volume, I get:

root@Minilith:~# fsck /dev/mapper/xubuntu--vg-root -y
fsck from util-linux 2.31.1
e2fsck 1.44.1 (24-Mar-2018)
ext2fs_check_desc: Corrupt group descriptor: bad block for block bitmap
fsck.ext4: Group descriptors look bad... trying backup blocks...
Block bitmap for group 0 is not in group.  (block 2553887680)
Relocate? yes

Inode table for group 0 is not in group.  (block 3715727360)
WARNING: SEVERE DATA LOSS POSSIBLE.
Relocate? yes

One or more block group descriptor checksums are invalid.  Fix? yes

Group descriptor 0 checksum is 0x11b0, should be 0xaa26.  FIXED.
Block bitmap for group 1792 is not in group.  (block 2553887680)
Relocate? yes

Inode table for group 1792 is not in group.  (block 3682172928)
WARNING: SEVERE DATA LOSS POSSIBLE.
Relocate? yes

Group descriptor 1792 checksum is 0x89a0, should be 0xbabe.  FIXED.
Inode bitmap for group 1793 is not in group.  (block 2097156110)
Relocate? yes

Group descriptor 1793 checksum is 0x5c04, should be 0xd977.  FIXED.
Inode bitmap for group 1795 is not in group.  (block 419506184)
Relocate? yes

Group descriptor 1795 checksum is 0xb484, should be 0x4875.  FIXED.
Inode bitmap for group 1796 is not in group.  (block 2197819406)
Relocate? yes

Group descriptor 1796 checksum is 0x7b44, should be 0x92f0.  FIXED.
Block bitmap for group 1920 is not in group.  (block 2553887680)
Relocate? yes

Inode table for group 1920 is not in group.  (block 3648618496)
WARNING: SEVERE DATA LOSS POSSIBLE.
Relocate? yes

Group descriptor 1920 checksum is 0x2073, should be 0xab14.  FIXED.
Block bitmap for group 4096 is not in group.  (block 2553887680)
Relocate? yes

Inode table for group 4096 is not in group.  (block 4151934976)
WARNING: SEVERE DATA LOSS POSSIBLE.
Relocate? yes

Group descriptor 4096 checksum is 0xc961, should be 0x6ce7.  FIXED.
Block bitmap for group 6016 is not in group.  (block 2553887680)
Relocate? yes

Inode table for group 6016 is not in group.  (block 4000940032)
WARNING: SEVERE DATA LOSS POSSIBLE.
Relocate? yes

Group descriptor 6016 checksum is 0x9648, should be 0x6dd5.  FIXED.
fsck.ext4: e2fsck_read_bitmaps: illegal bitmap block(s) for /dev/mapper/xubuntu--vg-root

/dev/mapper/xubuntu--vg-root: ***** FILESYSTEM WAS MODIFIED *****

/dev/mapper/xubuntu--vg-root: ********** WARNING: Filesystem still has errors **********

UPDATE 2: Following the advice to use options "noload,ro", and separately, to use "debug", I get these lines:

root@Minilith:~# mount -o noload,ro /dev/mapper/xubuntu--vg-root /mnt/
mount: /mnt: mount(2) system call failed: Structure needs cleaning.

And if I also put debug in the options, tailing /var/log/syslog I get:

Jun 22 13:46:17 Minilith kernel: [145133.789232] EXT4-fs (dm-3): ext4_check_descriptors: Block bitmap for group 0 not in group (block 2553887680)!
Jun 22 13:46:17 Minilith kernel: [145133.789242] EXT4-fs (dm-3): group descriptors corrupted!

1 Answer 1

2

You can use the "noload" mount option to mount ext3/4 filesystems that are flagged 'dirty' but it will be in read-only mode.

mount -t ext4 -o noload,ro /dev/mapper/xubuntu--vg-root /mnt/

Should let you at least mount the drive.

1
  • Nope :( Following these suggestions, I've added some other notes to the question :( Jun 22, 2018 at 12:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .