You are not logged in.

#1 2020-05-25 12:11:16

PiotrusWatson
Member
Registered: 2020-05-25
Posts: 2

Intermittent fsck failure/file corruption on boot

Computer: Acer Aspire 3 - A315-41-R18T
Operating Systems Installed: Arch Linux, Windows 10
Issue: Every so often, booting the laptop into Arch gives me an "unexpected inconsistency in /dev/sda7"  error, and a prompt to run fsck manually. When I do this, a number of files - seemingly at random - are deleted. These files are usually things I'd quite like to keep, like the contents of my downloads folder, and something internal that my adblocker needs in order to block ads properly. I'm scared that other (maybe more essential) files are also being deleted.

Context:
I've had this laptop for about a month, and arch linux dual booted with windows for most of that time. Really early on in setting up the arch install (I think I had a window manager by that point? my memory's hazy) I noticed I'd sometimes get the message "unexpected inconsistency in /dev/sda7" when I booted it up. This would be followed by a prompt to run fsck manually.

I'd do that, and it would usually tell me it was deleting some files with some weird hexadecimal names. Something to do with "inodes" (I'm not sure how to find a log of this - sorry!). I'd tell it to go right ahead and delete them.

Now, /dev/sda7 is the partition which has "/" on it. The first time it happened I was a bit worried that there was something super wrong with my setup. I did a bit of googling, and only found folk lookin to turn off fsck or whatever. I figured this was just a Normal Linux Thing, and ignored it.

The fsck thing kept happening, though. I'd notice there didn't seem to be any rules about when it'd happen - sometimes it'd show when I'd just been on my Arch partition, other times it'd happen when I was rebooting from windows. it felt like roughly 1 in 10 bootups would cause it, but it's not like I counted. 

And then one time it happened, and my wallpapers vanished. This was strange. I moved to open firefox, and it refused to load pages. My downloads folder had been completely wiped, and replaced with a file with a weird hexadecimal name. So I started looking for a fix

The first thought was that the windows partition was corrupting it somehow. I checked windows' parition program in cmd, though, and it didn't even seem to have noticed my linux partition.

Maybe it was a drive health problem? This seemed unlikely. The SMART health check I performed using smartctl seemed to say it had only failed once - and about 18 days ago if I'm reading the log (https://txt.online-reader.com/view?f=YPYmF436) correctly. This didn't seem to match up with what appeared to be repeated corruptions.

So it must be something to do with the Arch install. I hadn't checked the wiki page for my laptop when installing, so I did that and found that I needed to have ivrs_ioapic[4]=00:14.0 and ivrs_ioapic[5]=00:00.2 as boot parameters in order to stop it from repeatedly getting stuck on boot. I hadn't noticed this at all, but maybe this was causing it? Like some kind of boot loop that was somehow (?) corrupting my hard drive?

I added them to grub, hoping this would fix it. It didn't. One week later, it happened again. My webcam no longer wants to turn on.

I'm not sure what else has broken, but I don't want to do a full reinstall until I know what's causing this. Any ideas?

Offline

#2 2020-05-25 12:22:00

frostschutz
Member
Registered: 2013-11-15
Posts: 1,653

Re: Intermittent fsck failure/file corruption on boot

your drive has Auto Offline Data Collection: Disabled and never ran a single self-test. run one (smartctl -t long) also a memtest just in case.

filesystem corruption may also occur when not shutting down properly, or when using suspend/hibernate and not resuming properly.

do any of your errors make it into dmesg / journalctl?

Offline

#3 2020-05-26 07:31:34

PiotrusWatson
Member
Registered: 2020-05-25
Posts: 2

Re: Intermittent fsck failure/file corruption on boot

frostschutz wrote:

your drive has Auto Offline Data Collection: Disabled and never ran a single self-test. run one (smartctl -t long) also a memtest just in case.

do any of your errors make it into dmesg / journalctl?

I ran a self-test and got this - https://pastebin.com/Y5v2e0Zm. I'll run a memtest later. I doubt it's a Hardware Problem, but I really don't know much: are there any other diagnostics I can try?

frostschutz wrote:

filesystem corruption may also occur when not shutting down properly, or when using suspend/hibernate and not resuming properly.

This is valuable! I didn't ever manage to get hibernate set up properly. The few times my arch would run almost out of battery, it'd go to sleep and not wake up again. I'd have to hold down the power button to get it out of this state. I remember this happening relatively close to the most recent time fsck failed.

I think I've been getting these problems before I even dared to take the laptop off power, though. I'm unsure if that is the sole cause.

frostschutz wrote:

do any of your errors make it into dmesg / journalctl?

I'm not sure - here are the error logs (using journalctl -p 3) for the errors that happened in the session directly before my Downloads folder got deleted: https://pastebin.com/gLNpxmfK

And here are the error logs in the session directly after: https://pastebin.com/hWpwgTz6

(This is the only fsck I've actually bothered to note down the date of)

For reference, here's the error log for my current session: https://pastebin.com/MVuWuGrR

If you want the full logs, I can post them too - Before Downloads (https://txt.online-reader.com/view?f=jVUrB1), After Downloads (https://txt.online-reader.com/view?f=5ENN31), and the current log (https://txt.online-reader.com/view?f=uWg1c2).


Do any of these seem to point to something that might be causing data corruption?

Offline

Board footer

Powered by FluxBB