ext4 journal recovery attempted

Kernels & Hardware, configuring network, installing services

ext4 journal recovery attempted

Postby Ynot » 2019-01-11 21:23

We had a laptop SATA disk that experienced a superblock error on reboot after a power failure, so we're looking to try and recover the ext4 partition while it's connected to a USB adapter on another identical Debian 9 machine. The diagnostics and attempted filesystem repairs follow:
Code: Select all
# fdisk -l /dev/sdb
Disk /dev/sdb: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x7affcc51

Device     Boot      Start        End    Sectors  Size Id Type
/dev/sdb1  *          2048 3890413567 3890411520  1.8T 83 Linux
/dev/sdb2       3890415614 3907028991   16613378  7.9G  5 Extended
/dev/sdb5       3890415616 3907028991   16613376  7.9G 82 Linux swap / Solaris

# file -s /dev/sdb1
/dev/sdb1: Linux rev 1.0 ext4 filesystem data, UUID=37bdfc4a-b0b3-4cee-8b68-fd553b188d8f (needs journal recovery) (extents) (64bit) (large files) (huge files)

# fsck -y /dev/sdb1
fsck from util-linux 2.29.2
e2fsck 1.43.4 (31-Jan-2017)
/dev/sdb1: recovering journal
fsck.ext4: No such file or directory while trying to re-open /dev/sdb1

/dev/sdb1: ********** WARNING: Filesystem still has errors **********

# mke2fs -n /dev/sdb1
mke2fs 1.43.4 (31-Jan-2017)
/dev/sdb1 contains a ext4 file system
        created on Wed Aug 15 15:13:57 2018
Proceed anyway? (y,N) y
Creating filesystem with 486301440 4k blocks and 121577472 inodes
Filesystem UUID: 1d1f0251-f991-4178-9bf9-1bd6a0862780
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
        4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
        102400000, 214990848
##--- the filesystem was created with a fresh Debian 9 install, so it's assumed the superblock layout is identical ---##
Code: Select all
# fsck -b 4096000 /dev/sdb1
fsck from util-linux 2.29.2
e2fsck 1.43.4 (31-Jan-2017)
Superblock needs_recovery flag is clear, but journal has data.
Recovery flag not set in backup superblock, so running journal anyway.
/dev/sdb1: recovering journal
fsck.ext4: No such file or directory while trying to re-open /dev/sdb1

/dev/sdb1: ********** WARNING: Filesystem still has errors **********

# e2fsck -c -c /dev/sdb1
e2fsck 1.43.4 (31-Jan-2017)
/dev/sdb1: recovering journal
e2fsck: No such file or directory while trying to re-open /dev/sdb1

/dev/sdb1: ********** WARNING: Filesystem still has errors **********

# dmesg | tail -3
[430300.205013] blk_update_request: I/O error, dev sdb, sector 713038064
[430300.205020] Buffer I/O error on dev sdb1, logical block 89129502, lost async page write
[430300.310432] VFS: Dirty inode writeback failed for block device sdb1 (err=-5).

Not sure how to proceed beyond this point, so your advice is welcomed, and thank you.
Ynot
 
Posts: 16
Joined: 2019-01-11 18:39

Re: ext4 journal recovery attempted

Postby bw123 » 2019-01-11 22:24

Maybe you should try fsck interactively, without -y and don't use -c for now. If it's important, I guess you're doing this on a clone?

Is it mounted? any error in fstab?
User avatar
bw123
 
Posts: 3787
Joined: 2011-05-09 06:02

Re: ext4 journal recovery attempted

Postby Ynot » 2019-01-11 23:05

Yes, fsck indicated many errors, all of which were responded to with "y". The partition was not mounted during any invocations of fsck, e2fsck and mke2fs. The double argument "e2fsck -c -c" was after all else was tried, in order to identify bad blocks. /etc/fstab is not involved in the matter, as the disk /dev/sdb is temporarily external to the system where I'm working.
Ynot
 
Posts: 16
Joined: 2019-01-11 18:39

Re: ext4 journal recovery attempted

Postby bw123 » 2019-01-11 23:13

User avatar
bw123
 
Posts: 3787
Joined: 2011-05-09 06:02

Re: ext4 journal recovery attempted

Postby Ynot » 2019-01-11 23:25

Thanks, I always do my homework before requesting help from others, hence the diagnostics I posted.
Ynot
 
Posts: 16
Joined: 2019-01-11 18:39

Re: ext4 journal recovery attempted

Postby llivv » 2019-01-12 02:42

trying to recover a mounted filesystem rarely works out well, as you are seeing.
I hope you can see that. What you wouldn't see is how much it can be borked by messin with it mounted.
In memory of Ian Ashley Murdock (1973 - 2015) founder of the Debian project.
User avatar
llivv
 
Posts: 5488
Joined: 2007-02-14 18:10
Location: cold storage

Re: ext4 journal recovery attempted

Postby Ynot » 2019-01-12 03:23

Had you bothered to read the thread, you would've seen the partition was not mounted during attempted.journal recovery.
Last edited by Ynot on 2019-01-12 09:34, edited 2 times in total.
Ynot
 
Posts: 16
Joined: 2019-01-11 18:39

Re: ext4 journal recovery attempted

Postby llivv » 2019-01-12 03:41

Ynot wrote:Had you bothered to read the thread, you would've seen the partition was not mounted during attempted.journal recovery.
my bad good luck man e2fsck
In memory of Ian Ashley Murdock (1973 - 2015) founder of the Debian project.
User avatar
llivv
 
Posts: 5488
Joined: 2007-02-14 18:10
Location: cold storage


Return to System configuration

Who is online

Users browsing this forum: No registered users and 12 guests

fashionable