Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Is discard mount flag safe for my Samsung 850 Evo (1TB)?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
xicod
n00b
n00b


Joined: 03 Oct 2013
Posts: 18

PostPosted: Sun Jun 21, 2015 7:49 pm    Post subject: Is discard mount flag safe for my Samsung 850 Evo (1TB)? Reply with quote

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-state-drives-are-not-that-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
Back to top
View user's profile Send private message
frostschutz
Advocate
Advocate


Joined: 22 Feb 2005
Posts: 2968
Location: Germany

PostPosted: Sun Jun 21, 2015 7:58 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
xicod
n00b
n00b


Joined: 03 Oct 2013
Posts: 18

PostPosted: Mon Jun 22, 2015 4:30 pm    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
mutiny
n00b
n00b


Joined: 06 Aug 2014
Posts: 14

PostPosted: Wed Jun 24, 2015 1:10 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
frostschutz
Advocate
Advocate


Joined: 22 Feb 2005
Posts: 2968
Location: Germany

PostPosted: Wed Jun 24, 2015 6:27 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
bammbamm808
Guru
Guru


Joined: 08 Dec 2002
Posts: 485
Location: Hawaii

PostPosted: Wed Jun 24, 2015 3:40 pm    Post subject: Reply with quote

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.
_________________
Asrock X470 Taichi
Ryzen 2700x
32Gb Samsung B-die (16GB dual rank x2) DDR4
Geforce GTX 1060 6GB
Samsung Evo 840 500Gb +Seagate 1TB HDD
Etc....
Back to top
View user's profile Send private message
s4e8
Guru
Guru


Joined: 29 Jul 2006
Posts: 309

PostPosted: Thu Jun 25, 2015 5:14 am    Post subject: Reply with quote

Someone predict samsung SSD delay non-NCQ TRIM execution internally, heavy rewrite may trigger ordering bug.
Back to top
View user's profile Send private message
frostschutz
Advocate
Advocate


Joined: 22 Feb 2005
Posts: 2968
Location: Germany

PostPosted: Thu Jun 25, 2015 7:26 am    Post subject: Reply with quote

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).
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware 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