The file system have a few zones.
– file name table
– allocated sectors
– data zone
– other more advanced stuff not important for this
When you delete a file, it remove the name in the file name table, and mark the sectors as available in the allocated sector list.
The data stay there until you write more data and it happen that it need that space.
To make things even more unsafe, the data that say where the data is is also left behind intact!
This is how some undelete tools work: it scan the unused space for the data for where the actual data is.
Now, SSD drives add another layer: the drive can be told that the sectors are now unused, and the drive may preemptivelly erase the sectors. Unlike mechanical hard disk, SSD need to actually do a sector erase first, then write the data. Mechanical disks work with a magnetic media, which do not need a ‘reset’ first. SSD do the erase when it is idle, or told to explicitelly do it now. This does two things: make it faster by not having to erase first when you write to it, but also prolong the life of the SSD by allowing the drive to decide where to write the data. It would do it on the cell that have the less wear. If it do not trim then it don’t know where it can write, so it just write to the same place, and quickly wear one spot… The reality is more complex, but it give you an idea.
Latest Answers