You are not logged in.

#1 2019-06-02 03:14:05

zacharyrs
Member
Registered: 2018-11-03
Posts: 14

Filesystem Corruption (Hardware Specific)

Hiya!

I have a Dell 5482, in which I've swapped to a 16GB stick of RAM, and added a 2.5" 1TB Crucial MX500 SSD.
On this SSD I had Arch installed, completely vanilla - no encryption or fancy partitioning (EFI partition, and root partition). I have performed two full reinstalls, with the same issues as below.


For a reason I'm unable to diagnose, recently my filesystem seems to repeatedly become corrupted. There are two main symptoms to this:

  1. There are occasional errors where I get `No space for directory leaf checksum`. Running a filesystem check seems to repair some issues, up until this random error again. As far as I've read, this isn't too serious.

  2. File corruption occurs at random. For example, `sudo` would result in a message about missing files, and the zsh completion file `_alternatives` ended up missing a portion of content. This is my primary concern, as it strikes at random with no warning, and can cause complete loss of data. The above are only two cases, but `less` was affected too, as were many other files.

Initially I suspected my hardware upgrades:
I checked my RAM both with `memtestx86` and via the Windows tool, with no issues found.
I also checked the S.M.A.R.T. status of the SSD, which seems clean. There are no firmware updates available.

Shifting focus to software:
I suspected the new kernel as the root cause, as I was running 5.1.5 and read this. Downgrading to 5.0.10 had no effect.
I decided to test the drive in another computer (desktop), where it ran fine with no issues (performed some large downloads to see). Note this was on 5.1.5.

Suspecting archlinux, I put the SSD back in my laptop, and decided to try Ubuntu.
Ubuntu 19.04 failed to boot, with the verbose log full of EXT4 errors.

Once again suspecting the drive, I reformatted to NTFS and performed a 100GB random file write from Windows. This went smoothly.
I also created a few hundred text files, but their content remained constant.

Suspecting linux as a whole, I then tried to install Ubuntu 18.04. This is currently still on the drive, and runs with no issues.


I'm hence pretty sure my issue is specific to the Dell laptop, and only for newer versions of Linux.
Ubuntu 18.04 runs kernel 4.1.5, which has no issue, whereas Ubuntu 19.04 and Arch were both on version 5.X.


Not sure if I'm missing something obvious, but any help is appreciated.


Thanks in advance,
Zach

Offline

#2 2019-06-02 08:54:28

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

Re: Filesystem Corruption (Hardware Specific)

There are a few SSD/harddisk vendors that have a problem with the new SATA power saving default of med_power_with_dipm (as of kernel 4.16 this is the default on laptops), the symptoms you mention seem similar to disks that have this issue, so one thing you should try is switching that to max_performance: https://wiki.archlinux.org/index.php/Po … Management

Last edited by V1del (2019-06-02 08:55:12)

Offline

#3 2019-06-02 09:06:05

zacharyrs
Member
Registered: 2018-11-03
Posts: 14

Re: Filesystem Corruption (Hardware Specific)

Huh now that's certainly a new one!
I'll give it a go later tonight.

Out of curiosity, does the SATA power then deviate across computers?
I have the same SSD in a number of other installs, all running the latest Arch releases, without this issue.

I've only noticed the issue recently, so perhaps an update to the laptop did something, or alternately maybe it was an Arch update.
Also, from some more testing, running Arch via the installer USB seems to stop the issue - perhaps the power mode is set differently there?

Regardless, I'll test this out - hope it works!

Thanks,
Zach

Offline

#4 2019-06-02 09:13:37

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

Re: Filesystem Corruption (Hardware Specific)

zacharyrs wrote:

I suspected the new kernel as the root cause, as I was running 5.1.5 and read this. Downgrading to 5.0.10 had no effect.

5.1.x had SSD TRIM corruption and RAID6 rebuild/reshape corruption. But they should be fixed in 5.1.5 so unless you're running into corruption that has happened prior (if you ran affected 5.1.x at any point) you should be able to rule it out...

zacharyrs wrote:

Out of curiosity, does the SATA power then deviate across computers?

It defaults to max perf for me and I never saw reason to change it (well, it's not a laptop running on battery...). No idea if you have to set this up manually or if it could be set by BIOS. If it was the BIOS you'd need a kernel parameter or initrd hook to get out of that state early... setting it with udev (only after already accessing and writing to the device) might be too late

Last edited by frostschutz (2019-06-02 09:16:45)

Offline

#5 2019-06-02 09:18:26

zacharyrs
Member
Registered: 2018-11-03
Posts: 14

Re: Filesystem Corruption (Hardware Specific)

frostschutz wrote:

5.1.x had SSD TRIM corruption and RAID6 rebuild/reshape corruption. But they should be fixed in 5.1.5 so unless you're running into corruption that has happened prior (if you ran affected 5.1.x at any point) you should be able to rule it out...

Although I'm not sure about a previous 5.1.x, I can rule out prior corruption as I reinstalled twice yesterday. Also, definitely not managing RAID6 in a laptop!

frostschutz wrote:

It defaults to max perf for me and I never saw reason to change it (well, it's not a laptop running on battery...). No idea if you have to set this up manually or if it could be set by BIOS.

Interesting, I'll have to see what my other laptop has it set to, as maybe that's the discerning factor.

Either way, this'll have to wait till I've done some work!

Offline

#6 2019-06-03 10:19:49

zacharyrs
Member
Registered: 2018-11-03
Posts: 14

Re: Filesystem Corruption (Hardware Specific)

Well that seems to have solved it!
Unusually the power default seemed to be `min_power_with_partial`.
Not exactly sure what that means, but I've set it to `max_performance`.
I may try the medium settings some time...

Thanks for helping me out!

Offline

Board footer

Powered by FluxBB