You are not logged in.

#1 2023-02-24 14:23:11

Soyman
Member
Registered: 2017-06-23
Posts: 24

[SOLVED] Prevent the need for fsck after hard reboots/shutdowns

I find myself regularly having to reboot/shutdown my computer by holding the power button or pressing the reset button.
I only do this when the system is completely unresponsive.
Almost every time I do this my primary partition enters an invalid state which needs to be fixed at boot using fsck, sometimes manually (I have no idea why it does it automatically sometimes and not others).

The partition is on an samsung 980 (non-pro) nvme drive.

I believe that in many cases the computer isn't completely frozen but it is just X that is frozen so I have no way to interact with it (besides maybe via network).
In those cases I imagine that a periodic flush to drive could be done to avoid the invalid state.

Is anything like this possible?

That is, a procedure that enforces filesystem consistency in some way.

Edit: It's an Ext4 filesystem.

Last edited by Soyman (2023-02-24 15:06:00)

Offline

#2 2023-02-24 14:28:21

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,409

Re: [SOLVED] Prevent the need for fsck after hard reboots/shutdowns

You should rather find the causes that make you think you need to hard reboot.

The best way to ensure this is instead of hard rebooting to einable the REISUB sequence and using that to reboot "safely" including an FS sync if you think you need to hard reboot: https://wiki.archlinux.org/title/Keyboa … el_(SysRq) (when using that, to ensure that all data is actually flushed safely, pause a few seconds between each keypress of the REISUB sequence. You can also use that to periodically just hit the S instead of the other REISUB buttons to enforce a sync.

Last edited by V1del (2023-02-24 14:31:28)

Offline

#3 2023-02-24 14:37:42

seth
Member
Registered: 2012-09-03
Posts: 49,947

Re: [SOLVED] Prevent the need for fsck after hard reboots/shutdowns

The partition is on an samsung 980 (non-pro) nvme drive.

https://wiki.archlinux.org/title/Solid_ … leshooting
"nvme_core.default_ps_max_latency_us=0 iommu=soft"

Offline

#4 2023-02-24 15:04:59

Soyman
Member
Registered: 2017-06-23
Posts: 24

Re: [SOLVED] Prevent the need for fsck after hard reboots/shutdowns

Very useful information. Thank you both. REISUB sounds like exactly what I'm looking for.

Marked as solved as I am confident this will solve my issues.

Last edited by Soyman (2023-02-24 15:05:09)

Offline

Board footer

Powered by FluxBB