Re: how to enable trim for an external encrypted SSD?

2017-12-18 Thread Christian Seiler
Hi again, A quick follow-up, because cryptsetup 2.0.0 was recently released: On 11/06/2017 02:28 PM, Christian Seiler wrote: > And while you might be able to reconfigure udisks to pass the discard > option to cryptsetup (though I'm also doubtful about that), that > configuration would have to

Re: how to enable trim for an external encrypted SSD?

2017-11-21 Thread Joerg Desch
Am Wed, 15 Nov 2017 22:00:54 -0500 schrieb Stefan Monnier: > I highly doubt that TRIM would help. IOW, it's just a gut feeling you > have, but I strongly doubt you have concrete data that can show it might > be related to the presence/absence of TRIM-support. May be you are right. I hope so...

Re: how to enable trim for an external encrypted SSD?

2017-11-15 Thread Stefan Monnier
> I had the same situation with my Sandisc Exreme thumb drive before! Here > heparin reports TRIM too, and fstrim failed too. At that time I thought > that the problem is the thumb drive controller. hdparm's report mostly comes directly from the drive within the enclosure. So all it says is that

Re: how to enable trim for an external encrypted SSD?

2017-11-11 Thread Joerg Desch
Am 11.11.17 15:27, schrieb Christian Seiler: If it's the kernel driver there's a chance that'll be fixed in a future kernel version. Hmm... Arch Linux (that I tried) comes with a recent kernel and this still not work. Unfortunately I can't say much more about that, I've never had an

Re: how to enable trim for an external encrypted SSD?

2017-11-11 Thread Christian Seiler
On 11/11/2017 02:31 PM, Joerg Desch wrote: > Am Sat, 11 Nov 2017 14:13:12 +0100 schrieb Christian Seiler: > >> Also, did you mount the device with -o discard or set that option with >> tune2fs (_before_ mounting it)? > > No, not now. I want to use fstrim in favour to the discard option. But >

Re: how to enable trim for an external encrypted SSD?

2017-11-11 Thread Joerg Desch
Am Sat, 11 Nov 2017 14:13:12 +0100 schrieb Christian Seiler: > Also, did you mount the device with -o discard or set that option with > tune2fs (_before_ mounting it)? No, not now. I want to use fstrim in favour to the discard option. But I've tested it with an Arch Linux installation with a

Re: how to enable trim for an external encrypted SSD?

2017-11-11 Thread Christian Seiler
On 11/11/2017 02:05 PM, Joerg Desch wrote: > Am Mon, 06 Nov 2017 14:28:32 +0100 schrieb Christian Seiler: > >> I don't what you want is possible. When you plug in an external drive >> (that is _not_ in /etc/fstab etc.) the process of how it gets mounted is >> different: > ... >> tune2fs -o

Re: how to enable trim for an external encrypted SSD?

2017-11-11 Thread Joerg Desch
Am Mon, 06 Nov 2017 14:28:32 +0100 schrieb Christian Seiler: > I don't what you want is possible. When you plug in an external drive > (that is _not_ in /etc/fstab etc.) the process of how it gets mounted is > different: ... > tune2fs -o +discard /dev/external_disk_device My drive has

Re: how to enable trim for an external encrypted SSD?

2017-11-06 Thread Joerg Desch
Am Tue, 07 Nov 2017 01:00:54 +0500 schrieb Alexander V. Makartsev: > I don't use TRIM feature on my systems because of that, and hope for a > firmware of modern SSD will manage everything automatically. Am I wrong? I've used a ext4 formatted, unencrypted (!) 64GB SanDisk Extreme USB 3.0

Re: how to enable trim for an external encrypted SSD?

2017-11-06 Thread Joerg Desch
Am Mon, 06 Nov 2017 14:28:32 +0100 schrieb Christian Seiler: > But all that doesn't really help you if the underlying LUKS container > isn't opened with the discard option set. And as far as I know there is > no possibility of tagging a LUKS container with that option, you must > always supply

Re: how to enable trim for an external encrypted SSD?

2017-11-06 Thread Henrique de Moraes Holschuh
On Tue, 07 Nov 2017, Alexander V. Makartsev wrote: > TRIM will erase blocks marked as deleted beforehand even if they are not Not on any SSD that is not an utter piece of trash. TRIM marks pages as unused for the garbage collector, and that's it. On SSDs that return all-zeroes for TRIMMed

Re: how to enable trim for an external encrypted SSD?

2017-11-06 Thread Alexander V. Makartsev
On 07.11.2017 03:01, Michael Stone wrote: > On Tue, Nov 07, 2017 at 02:20:56AM +0500, Alexander V. Makartsev wrote: >> As I know SSDs are different in a way HDDs write their data. HDDs write >> directly to the free block and are done. SSDs on the other hand will >> have to >> erase free block

Re: how to enable trim for an external encrypted SSD?

2017-11-06 Thread Michael Stone
On Tue, Nov 07, 2017 at 02:20:56AM +0500, Alexander V. Makartsev wrote: As I know SSDs are different in a way HDDs write their data. HDDs write directly to the free block and are done. SSDs on the other hand will have to erase free block first to get it ready for writing and then write to it.

Re: how to enable trim for an external encrypted SSD?

2017-11-06 Thread Alexander V. Makartsev
On 07.11.2017 01:43, Michael Stone wrote: > On Tue, Nov 07, 2017 at 01:00:54AM +0500, Alexander V. Makartsev wrote: >> Now I wonder, why would anyone want to use TRIM feature on a portable >> SSD, >> especially on an encrypted one? >> Isn't this feature only increases drive wear, offering next to

Re: how to enable trim for an external encrypted SSD?

2017-11-06 Thread Michael Stone
On Tue, Nov 07, 2017 at 01:00:54AM +0500, Alexander V. Makartsev wrote: Now I wonder, why would anyone want to use TRIM feature on a portable SSD, especially on an encrypted one? Isn't this feature only increases drive wear, offering next to nothing as a benefit in return? I don't use TRIM

Re: how to enable trim for an external encrypted SSD?

2017-11-06 Thread Alexander V. Makartsev
On 06.11.2017 18:28, Christian Seiler wrote: > > You could ask the LUKS developers to include an additional flag in > their headers that allows you to specify that this volume should be > opened with discards allowed by default - to maybe solve this in the > very long term. No idea how amenable

Re: how to enable trim for an external encrypted SSD?

2017-11-06 Thread Christian Seiler
Am 2017-11-06 13:09, schrieb Joerg Desch: Now I have bought a SanDisk Extreme Portable SSD. My goal is to add a LUKS encrypted partition without an explicit fstab entry. I've done this with some USB thumbdrives before, but not with TRIM support. The drvie should be plugged into any Linux

how to enable trim for an external encrypted SSD?

2017-11-06 Thread Joerg Desch
Normally I would enable TRIM support in the /etc/fstab or the /etc/ crypttab by add the discard option. Now I have bought a SanDisk Extreme Portable SSD. My goal is to add a LUKS encrypted partition without an explicit fstab entry. I've done this with some USB thumbdrives before, but not with