Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How do I check if my filesystems aren't corrupted?
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
dragonfire2003
n00b
n00b


Joined: 14 Mar 2022
Posts: 53

PostPosted: Sun Apr 24, 2022 10:47 pm    Post subject: How do I check if my filesystems aren't corrupted? Reply with quote

Good morning (or night) people of the Gentoo forums! So recently my Gentoo system had a crash while I was playing a game.
This should be pretty straight forward, How do I check if my filesystems (or my system in general) was affected by this crash?
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9677
Location: almost Mile High in the USA

PostPosted: Mon Apr 25, 2022 12:04 am    Post subject: Reply with quote

The notion of crash related corruption is solely in the files that were open and partially written at the time of the crash -- not random files corrupted.

If you were using a journaling filesystem, this should have resulted in a filesystem state a few moments before the crash with hopefully no inconsistencies. This is dependent on what files were being or intended to be written at the time of crash.

Running fsck is still a good idea though the value is not as high if it was a journaled filesystem that successfully replayed state.
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
figueroa
Advocate
Advocate


Joined: 14 Aug 2005
Posts: 2961
Location: Edge of marsh USA

PostPosted: Mon Apr 25, 2022 4:12 am    Post subject: Reply with quote

What file system is your partition? If it is ext4 and properly set up, if the partition is marked dirty because of the crash, it should have been checked (fsck.ext4) while rebooting.

Does game still play as expected? If yes, things are probably OK. If not OK, restore from backup. The value of current backups cannot be overstated.
_________________
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54216
Location: 56N 3W

PostPosted: Mon Apr 25, 2022 8:59 am    Post subject: Reply with quote

dragonfire2003,

You cannot check user data.
Tools like fsck only check that the filesystem metadata is self consistent and if its not, 'guess' to fix it. When it guesses incorrectly, it makes a bad situation worse.
fsck is a last ditch thing after you have a filesystem image, so that you have an undo.

All the journaling filesystems will do a journal replay at mounting, so they will always appear to be clean after the first mount following a crash.

If you don't use a journal, fsck will be run on any dirty filesystem at mount time. With a large filesystem, that can take hours or even days. Hence journaling filesystems are popular.

Should you still consider that there are problems, well, that's why you keep backups ... don't you?
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
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