Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Kernel & Hardware
  • Search

Is discard mount flag safe for my Samsung 850 Evo (1TB)?

Kernel not recognizing your hardware? Problems with power management or PCMCIA? What hardware is compatible with Gentoo? See here. (Only for kernels supported by Gentoo.)
Post Reply
Advanced search
8 posts • Page 1 of 1
Author
Message
xicod
n00b
n00b
Posts: 19
Joined: Thu Oct 03, 2013 8:06 am

Is discard mount flag safe for my Samsung 850 Evo (1TB)?

  • Quote

Post by xicod » Sun Jun 21, 2015 7:49 pm

Hi,

Recently I've been reading that the discard flag may cause data loss on ext4 partitions for some SSD drives.

There's a popular article specifically about the 4.0 kernel (although I think this mainly refers to RAID of different sorts, which I don't use):
https://blog.algolia.com/when-solid-sta ... hat-solid/

There are even some (close to mine) Samsung models mentioned on their blacklist of misbehaving drives.

So what should I do? I have the 'discard' mount flag enabled for a month or so on several ext4 partitions (and on the swap) with no problems.
Currently I'm using the 3.18.12-gentoo kernel.

Is there any reason for me to be worried about this?

I would really appreciate if someone could shed some light on this (especially regarding my specific model of SSD)

Thanks
Top
frostschutz
Advocate
Advocate
User avatar
Posts: 2978
Joined: Tue Feb 22, 2005 11:23 am
Location: Germany

  • Quote

Post by frostschutz » Sun Jun 21, 2015 7:58 pm

So far none save them can reproduce the issue. See the update, they even have engineers traveling to the datacenter for this.

That means no one knows exactly what the issue is in the first place. It could be a fault of the drive, of the kernel, of their configuration, or their other hardware involved (type of controller etc.).

It could be a bug that is only triggered under very obscure conditions (like partitions mis-aligned in a very specific way) or non-standard filesystem flags.

It wouldn't be the first bug in SSD firmware, so disable TRIM by all means for a few weeks until it's cleared up.

But it wouldn't be the first false duck (the vegetarian kind) either, it seems fishy because a) it affects only them and b) the damage is apparently only 512 bytes which makes not much sense for any SSD.
Top
xicod
n00b
n00b
Posts: 19
Joined: Thu Oct 03, 2013 8:06 am

  • Quote

Post by xicod » Mon Jun 22, 2015 4:30 pm

Thanks, I will disable discard for now, but how can I know that at some point it's fine?
Are there any bugzilla entries to follow?
Top
mutiny
n00b
n00b
Posts: 20
Joined: Wed Aug 06, 2014 9:46 am

  • Quote

Post by mutiny » Wed Jun 24, 2015 1:10 am

I was able to reproduce this myself. I had 2 crucial 128GB ssds in raid0 on a testing system I was playing with, with root fs on this raid0. I was on kernel 4.0.1 I think when issues occurred, with discard flag enabled on the ext4 raid0 partition. I did find there was unrecoverable data loss on some parts of the partition.
Top
frostschutz
Advocate
Advocate
User avatar
Posts: 2978
Joined: Tue Feb 22, 2005 11:23 am
Location: Germany

  • Quote

Post by frostschutz » Wed Jun 24, 2015 6:27 am

RAID0+TRIM had a bug in kernel 4.0.1 thereabouts. Not the fault of the SSD if the RAID layer or whatever translates TRIM commands wrong.

https://lkml.org/lkml/2015/5/21/167
Top
bammbamm808
Guru
Guru
User avatar
Posts: 558
Joined: Sun Dec 08, 2002 7:09 am
Location: Hawaii

  • Quote

Post by bammbamm808 » Wed Jun 24, 2015 3:40 pm

I have a single 840 Evo, linux 4.0.5, ext4 and trim via "discard" in fstab. No problems whatsoever here, 2 weeks in. There were resports of this, or another bug affecting single ssd setups on > 4.0.1, but it mostly seems to be the ext4/RAID0/ssd combination that causes the problems on the affected kernel versions.
MSI MAG B550 Tomahawk
Ryzen 3900x
32Gb Samsung B-die (16GB dual rank x2) DDR4 @ 3200MHz, cl14
Geforce RTX 4070S 8GB
Samsung m.2 NVME pcie-3.0
Etc....
Top
s4e8
Guru
Guru
Posts: 311
Joined: Sat Jul 29, 2006 11:09 am

  • Quote

Post by s4e8 » Thu Jun 25, 2015 5:14 am

Someone predict samsung SSD delay non-NCQ TRIM execution internally, heavy rewrite may trigger ordering bug.
Top
frostschutz
Advocate
Advocate
User avatar
Posts: 2978
Joined: Tue Feb 22, 2005 11:23 am
Location: Germany

  • Quote

Post by frostschutz » Thu Jun 25, 2015 7:26 am

frostschutz wrote:So far none save them can reproduce the issue. See the update, they even have engineers traveling to the datacenter for this.
And I wonder what became of it... the first week the blog post got daily updates (June 1[5-9]). Engineers were supposed to arrive on June 22 but no more updates so far.

I hope that after making all this noise they'll let us know the results of their investigation (whether it was a bug in Samsung's firmware or in the Linux kernel or in their own setup).
Top
Post Reply

8 posts • Page 1 of 1

Return to “Kernel & Hardware”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic