Gentoo Archives: gentoo-user

From: Alan McKinnon <alan.mckinnon@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Recover on SSD
Date: Mon, 06 May 2013 18:57:48
Message-Id: 5187FD18.7050606@gmail.com
In Reply to: Re: [gentoo-user] Recover on SSD by Hinnerk van Bruinehsen
1 On 06/05/2013 20:36, Hinnerk van Bruinehsen wrote:
2 > On Mon, May 06, 2013 at 07:34:20PM +0200, Volker Armin Hemmann wrote:
3 >> emm - no. Wear leveling does not need any spare blocks. A lot of drives
4 >> do have spare blocks, but those are never the same size of the original
5 >> size (at least not on drives you can buy for a sensible amount of
6 >> money). More like 120+8 or 160+16 or 256+16.
7 >>
8 >> The spare blocks are used like on a hdd: some block goes bad, another
9 >> one is mapped in.
10 >>
11 >> Since the sdd firmware does not know if something was deleted or not* -
12 >> it does know shit about filesystems**, you can of course dd an image, if
13 >> you want to. Just like on a hdd.
14 >>
15 >> *there are drives that do garbage collection without TRIM for fat and or
16 >> ntfs.. so they seem to know a bit about filesystems.
17 >>
18 >> ** and this is why TRIM exists in the first place. To tell the drive:
19 >> yes, this data is gone. You don't need to care about it anymore.
20 >
21 >
22 > The actual numbers were made up to make the point (maybe I should have
23 > stated that in my OP). According to [1] they are normally between 7% -
24 > 37%.
25 > Linux supports TRIM since Kernel 2.6.28. It's supported for several
26 > filesystems (Ext4, Btrfs, FAT, GFS2 and XFS) but must be enabled via the
27 > discard mount option. I don't have definitive information for Windows
28 > but it seems to be supported by at least Windows 7 (as far as I can tell
29 > without any user interaction).
30 > Since the "deletion" happened under Windows I made a guess that it is
31 > not totally unreasonable that dd may not work (if the deleted data would
32 > have been "TRIMed").
33 >
34 >
35 >
36 > [1] http://www.lsi.com/downloads/Public/Flash%20Storage%20Processors/LSI_PRS_FMS2012_TE21_Smith.pdf
37 >
38
39
40
41 A delete on an SSD is a very expensive operation, to my mind it seems
42 completely unreasonable to think that Windows would try and clear many
43 tens of GB just because it trashed a partition table. It would take
44 _hours_ to clear those blocks.
45
46 By far the easiest route would be to just do what is done for spinning
47 disks - write the partition table, leave whatever junk is in the cells
48 intact until the partition is formatted and actual data is written to
49 the fs.
50
51 As your results show, this is indeed what did happen.
52
53 --
54 Alan McKinnon
55 alan.mckinnon@×××××.com

Replies

Subject Author
Re: [gentoo-user] Recover on SSD "Randolph Maaßen" <r.maassen60@×××××.com>