View previous topic :: View next topic |
Author |
Message |
guyuming Apprentice
Joined: 19 Nov 2020 Posts: 242
|
Posted: Mon Feb 06, 2023 11:55 pm Post subject: need help with EXT4-fs error loading journal |
|
|
somehow, my pc cannot boot:
Code: | EXT4-fs (sdc1): error loading journal |
I boot with a kubuntu livecd, and try to mount the root partition in readonly
Code: | mount -r /dev/sdc1 /tmp/tmp |
but it says
Code: | mount: /tmp/tmp: can't read superblock on /dev/sdc1. |
i can find many backup superblock with
Code: | dumpe2fs /dev/sdc1|grep superblock |
And e2fsck cannot fix the file system.
Code: |
kubuntu@kubuntu:~$ sudo e2fsck -b 98304 /dev/sdc1
e2fsck 1.46.3 (27-Jul-2021)
Superblock needs_recovery flag is clear, but journal has data.
Recovery flag not set in backup superblock, so running journal anyway.
/dev/sdc1: recovering journal
Error reading block 39354381 (Input/output error). Ignore error<y>? yes
Force rewrite<y>? no
Error reading block 39354370 (Input/output error). Ignore error<y>? yes
Force rewrite<y>? no
JBD2: Invalid checksum recovering data block 0 in log
Error reading block 39354371 (Input/output error). Ignore error<y>? yes
Force rewrite<y>? no
JBD2: Invalid checksum recovering data block 62914592 in log
e2fsck: No such file or directory while trying to re-open /dev/sdc1
/dev/sdc1: ********** WARNING: Filesystem still has errors ********** |
Although there is no big business impact, just my personal testing system and i can format the disk and reinstall from the beginning, I still want to rescue. What shall i try again?
can i mount the file system with a backup superblock? i find no option for specifying an alternative superblock in "mount --help"
can i just abound the journal(with recent data in journal lost)? |
|
Back to top |
|
|
sublogic Apprentice
Joined: 21 Mar 2022 Posts: 266 Location: Pennsylvania, USA
|
Posted: Tue Feb 07, 2023 12:11 am Post subject: |
|
|
[quote="guyuming"] Code: | Error reading block 39354381 (Input/output error). Ignore error<y>? yes[/quote] | Doesn't that mean that your drive has failed ? |
|
Back to top |
|
|
guyuming Apprentice
Joined: 19 Nov 2020 Posts: 242
|
Posted: Tue Feb 07, 2023 7:16 am Post subject: |
|
|
sublogic wrote: | Doesn't that mean that your drive has failed ? |
I don't think so, it's a relatively new drive.
i think it is because of a power failure.
That system became unresponsive that day, i might have unplugged the power. |
|
Back to top |
|
|
Goverp Advocate
Joined: 07 Mar 2007 Posts: 2120
|
Posted: Tue Feb 07, 2023 11:35 am Post subject: |
|
|
I/O errors is I/O errors. If the drive is new, perhaps the cable got unseated or damaged. _________________ Greybeard |
|
Back to top |
|
|
guyuming Apprentice
Joined: 19 Nov 2020 Posts: 242
|
Posted: Wed Feb 08, 2023 9:54 am Post subject: |
|
|
Goverp wrote: | I/O errors is I/O errors. If the drive is new, perhaps the cable got unseated or damaged. |
but badblocks command returns no error:
Code: | sudo badblocks -v /dev/sde
Checking blocks 0 to 1953514583
Checking for bad blocks (read-only test):
done
Pass completed, 0 bad blocks found. (0/0/0 errors) |
if there are hardware issue, how can badblocks finish testing?
note that sometimes i use /dev/sde and sometimes /dev/sdc, it not that i have referenced the wrong drive, just the device name changes after some command.
and
Code: | sudo smartctl --all /dev/sde |
results contain something as follows:
Code: |
=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED
|
|
|
Back to top |
|
|
Zucca Moderator
Joined: 14 Jun 2007 Posts: 3625 Location: Rasi, Finland
|
Posted: Wed Feb 08, 2023 10:28 am Post subject: |
|
|
If you can open another terminal and run dmesg -W there, preferably as root. There you can see what the kernel wants to say when you're touching the filesystem. Paste the messages here so we can have more inside information.
I'd go with these steps. If one fails, advance to the next:
Code: | e2fsck: No such file or directory while trying to re-open /dev/sdc1 | First triple check the cables and connectors. Reseat them in both ends.
Try to mount the drive in read-only on another terminal.
Don't try to fix the filesystem if it contains valuable data. Instead if the mounting was successful, copy the data you want to keep.
Use dd or ddrescue or your-choice-of-data-rescue-method to recover data.
Rememer try not to fix the filesystem "live" (if the data is valuable to you). Instead try to create an image of the filesystem first. Then start poking it with tools that try to correct the data. _________________ ..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
Quote: | I am NaN! I am a man! |
|
|
Back to top |
|
|
guyuming Apprentice
Joined: 19 Nov 2020 Posts: 242
|
Posted: Thu Feb 09, 2023 12:57 am Post subject: |
|
|
Zucca wrote: | If you can open another terminal and run dmesg -W there, preferably as root. There you can see what the kernel wants to say when you're touching the filesystem. Paste the messages here so we can have more inside information.
|
i run dmesg -c to clear first, try to mount the partition and get error, then i paste the error here:
https://pastebin.com/gZi4x465
There are three partitions on the drive, the /dev/sdc3 is a FAT EFI parttion, which i can mount and read.
But i just tried to write a simple text file onto this FAT partition, it also throws I/O error: https://pastebin.com/dcA4nj3T
So the problem seems to be limited in writing, the badblocks test before only tested reading.
I will try re-plugging the disk cable. |
|
Back to top |
|
|
guyuming Apprentice
Joined: 19 Nov 2020 Posts: 242
|
Posted: Thu Feb 09, 2023 2:36 am Post subject: |
|
|
Thanks all!
I re-plugged the disk cables and can run e2fsck,
The system can boot now, unbelievable! |
|
Back to top |
|
|
|