[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: fstrim and Luks / dm-raid



Le 05/10/2019 à 15:55, Reco a écrit :
> 	Hi.
>
> On Sat, Oct 05, 2019 at 02:52:55PM +0200, Erwan David wrote:
>> I've got a computer with 3 SSD in RAID5 (dm-raid) containing a LUKS
>> partition, then a lvm
>> Is fstrim useful in suc a case ? 
> It's disabled by default, but you can enable by setting
> "issue_discards=1" in lvm.conf, and by adding "discard" option to your
> crypttab. There's no SSD-specific mdraid configuration.
> Also, [1].
>
>
>> or on mylaptop without the raid, but with LUKS and LVM ?
> I use fstrim on my laptop since wheezy, and this particular laptop has
> LVM on top of LUKS PV.
>
>
>> Should I add the discard option in fstab ?
> It's safe only if your SSD firmware is sane and does not corrupt your
> data while processing TRIM with NCQ enabled.
> For instance, some noname Chinese SSD (ADATA, for instance) can corrupt
> your filesystem in such circumstances, Samsung 850 PRO should not.
> Manual fstrim invocation seems to be safe.
> Put an emphasis on "should" in the sentences above.
>
>
>> Or an equivalent in > mdadm.conf or cryptsetup.conf ?
> See above.
>
> Reco
>
> [1] https://wiki.debian.org/SSDOptimization
>
>
Thanks for the tips


Reply to: