Live data from Hacker News

Everything I Know About SSDs

kcall.co.uk

21–30 of 190 posts

Re: Everything I Know About SSDs

#21

There are a few technologies that I’ve tried very earnestly to understand, only to find out that it’s basically black magic and there’s no use in trying to understand it. Those things are modern car transmissions, nuclear reactors, and SSDs.

> Those things are modern car transmissions, ..

Even though it may be off-topic, but could you elaborate on this a little bit more?

Re: Everything I Know About SSDs

#22
post #13

Anyone know how TRIM works with Linux? I find myself copying entire partitions between SSDs from time to time, is there a utility to clear the destination SSD before copy? Is it possible to do the same for an SD card, so that writing a new Raspi OS to it doesn't do unnecessary garbage collection?

I believe all major OSes support trim in a reasonable way now. afaik it needs hardware support though, so idk how it would work for an SD card.

Unless you have a RAID card in the middle.

Re: Everything I Know About SSDs

#23
post #3

I was under the impression that if you do not encrypt an SSD from the first use, then any attempt at overwriting with 0s is futile, as well as any other method to securely delete the files. The files will be easily recovered. This guy seems to say the opposite, in that the files are "simply not there anymore", contrary to everything I've read: who's right here?

In practice all SSDs are always encrypted because they use the encryption to whiten the data written to them. That's why "Secure Erase" takes less than a second on SSDs, it doesn't erase anything but the key.

With the caveat that this occurs in proprietary firmware which is non-trivial to audit. There have also been vulnerabilities discovered in the encryption features of disk firmware.

Re: Everything I Know About SSDs

#24
post #13

Anyone know how TRIM works with Linux? I find myself copying entire partitions between SSDs from time to time, is there a utility to clear the destination SSD before copy? Is it possible to do the same for an SD card, so that writing a new Raspi OS to it doesn't do unnecessary garbage collection?

> I find myself copying entire/ partitions between SSDs from time to time, is there a utility to clear the destination SSD before copy?

The way TRIM works, you don't need to trim blocks right before overwriting them. TRIM is for blocks that you aren't going to care about for quite some time, it essentially returns them to the SSD management layer for use as overprovisioning.

Re: Everything I Know About SSDs

#25
post #13

Anyone know how TRIM works with Linux? I find myself copying entire partitions between SSDs from time to time, is there a utility to clear the destination SSD before copy? Is it possible to do the same for an SD card, so that writing a new Raspi OS to it doesn't do unnecessary garbage collection?

On linux, it can either get done using fstrim (often run periodically, e.g. via cron), which clears unused blocks, or can be done on file delete on supported file systems (e.g. mounting using the discard option). The periodic trim is supposed to be better, as a SSD does guarantee that a trim returns quickly.

If you want to trim an entire device, see blkdiscard (take care!).

Re: Everything I Know About SSDs

#26
post #9

Earlier quoted context omitted.

In practice all SSDs are always encrypted because they use the encryption to whiten the data written to them. That's why "Secure Erase" takes less than a second on SSDs, it doesn't erase anything but the key.

Interesting! Do you happen to know which encryption algorithm is used? I would think that, if the only goal is whitening (as opposed to robust security), a fairly weak algorithm would be used, or perhaps a strong algorithm with a reduced number of rounds.

The algorithm probably depends on the drive, but AES-256 is common due to hardware acceleration. Read a SSD spec sheet sometime, it will likely mention it, along with supporting TCG Opal (the self encrypting drive standard).

Re: Everything I Know About SSDs

#28
post #9

Earlier quoted context omitted.

In practice all SSDs are always encrypted because they use the encryption to whiten the data written to them. That's why "Secure Erase" takes less than a second on SSDs, it doesn't erase anything but the key.

Interesting! Do you happen to know which encryption algorithm is used? I would think that, if the only goal is whitening (as opposed to robust security), a fairly weak algorithm would be used, or perhaps a strong algorithm with a reduced number of rounds.

the hardware is going to use AES because their ASIC vendor will have well tested AES IP that they can just throw down on the chip. any other algorithm would require massive development effort for zero benefit.

and by using AES they can probably claim to satisfy some security standards that will make their marketing people happier.

Re: Everything I Know About SSDs

#29

There are a few technologies that I’ve tried very earnestly to understand, only to find out that it’s basically black magic and there’s no use in trying to understand it. Those things are modern car transmissions, nuclear reactors, and SSDs.

Planetary gearsets are amazing. Cool animation here https://www.youtube.com/watch?v=7iTn8OWxVFU

Re: Everything I Know About SSDs

#30
I love a minimal, text-only website as much as the next crotchety HN reader, but a little bit of CSS goes a very long way in terms of readability.

Edit: Upon further inspection I see that this page was designed to be hard to read. Very curious.

Post reply on HN