Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
need help with EXT4-fs error loading journal
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
guyuming
Apprentice
Apprentice


Joined: 19 Nov 2020
Posts: 236

PostPosted: Mon Feb 06, 2023 11:55 pm    Post subject: need help with EXT4-fs error loading journal Reply with quote

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
View user's profile Send private message
sublogic
Apprentice
Apprentice


Joined: 21 Mar 2022
Posts: 222
Location: Pennsylvania, USA

PostPosted: Tue Feb 07, 2023 12:11 am    Post subject: Reply with quote

[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
View user's profile Send private message
guyuming
Apprentice
Apprentice


Joined: 19 Nov 2020
Posts: 236

PostPosted: Tue Feb 07, 2023 7:16 am    Post subject: Reply with quote

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
View user's profile Send private message
Goverp
Advocate
Advocate


Joined: 07 Mar 2007
Posts: 2014

PostPosted: Tue Feb 07, 2023 11:35 am    Post subject: Reply with quote

I/O errors is I/O errors. If the drive is new, perhaps the cable got unseated or damaged.
_________________
Greybeard
Back to top
View user's profile Send private message
guyuming
Apprentice
Apprentice


Joined: 19 Nov 2020
Posts: 236

PostPosted: Wed Feb 08, 2023 9:54 am    Post subject: Reply with quote

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
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3366
Location: Rasi, Finland

PostPosted: Wed Feb 08, 2023 10:28 am    Post subject: Reply with quote

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
View user's profile Send private message
guyuming
Apprentice
Apprentice


Joined: 19 Nov 2020
Posts: 236

PostPosted: Thu Feb 09, 2023 12:57 am    Post subject: Reply with quote

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
View user's profile Send private message
guyuming
Apprentice
Apprentice


Joined: 19 Nov 2020
Posts: 236

PostPosted: Thu Feb 09, 2023 2:36 am    Post subject: Reply with quote

Thanks all!

I re-plugged the disk cables and can run e2fsck,

The system can boot now, unbelievable!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum