The TRIM command (TRIM in ATA and UNMAP in SCSI) informs a Solid-State Drive (SSD) drive which data blocks are no longer in use and can be wiped internally. It was developed in response to SSDs' unique operation characteristics, which differ from traditional hard drives. Without TRIM, SSDs faced degrading write performance over time. TRIM assists SSDs in garbage collection, optimising write operations and preventing slowdowns.
Why Was TRIM Introduced?
SSDs and traditional hard drives handle delete operations differently. SSDs need to know which blocks are genuinely unused to optimise their operations. Overwriting on an SSD is more complex than on a traditional drive, leading to a phenomenon known as "write amplification." SSDs also come with extra storage capacity, which is not user-addressable. This is to assist with wear levelling, performance, and drive longevity. Data that gets deleted and marked trimmed by the OS might move into this non-addressable space, which makes traditional recovery methods ineffective.
How Does TRIM Work?
When files are deleted, the operating system sends a TRIM command to the SSD. After TRIM is executed and combined with the drive's garbage collection, the identified blocks can be written to without needing a prior erase, enhancing performance and lifespan. Different SSDs might implement the TRIM command differently, influencing their performance.
Data Storage and Deletion in SSDs:
Unlike magnetic hard drives, which use sequential writing, SSDs store data in blocks across multiple NAND chips concurrently, making them much faster. When data is deleted, rather than leaving it until it's overwritten like on a magnetic drive, SSDs often mark it for trimming. The garbage collection process in SSDs then cleans up these trimmed blocks. This can make data recovery and forensics difficult as deleted data can be irretrievably wiped in the background.
TRIM's Implementation & Support:
TRIM's effectiveness depends on the physical drive and the Operating System (OS). Many operating systems like Windows, Linux, macOS, and others have introduced TRIM support. The TRIM command can also be used on certain RAID configurations, but support varies depending on the RAID type and the platform.
Hardware Support and Variants:
Beyond ATA's TRIM, standards like SCSI have similar commands, like UNMAP. Other technologies, like shingled magnetic recording (SMR) hard drives, SD/MMC and NVM Express, have incorporated analogous commands to TRIM, suited to their specifications.
Data Recovery and Forensic Challenges:
Extracting deleted evidence from an SSD was traditionally done through chip-off analysis, which was labour-intensive and time-consuming. However, the increase in SSD capacities, the combining of electronic components in a single chip and features like trimming, built-in hardware encryption and how data is stored added additional levels of complexity to the recovery and investigation of data from SSDs.
Advanced-Data Recovery:
There are, however, several advanced data recovery methods, like the factory mode, that can provide a potential method to access deleted or non-addressable areas of an SSD. The method involves preventing the SSD from booting in its standard mode and using specialised tools (like ACELab PC-3000) to access its data in a raw format. Factory mode can prevent SSDs from running background processes that might overwrite or erase data, thus preserving potential evidence and potentially allowing the recovery of deleted data.
What Are The Disadvantages Of Having Trim Enabled?:
When TRIM is disabled, the SSD does not immediately erase the data blocks where files were deleted. This makes it more likely that deleted files can be recovered, assuming the files have not been overwritten with new data.
How to Check If TRIM Is Enabled or Disabled on Windows:
- Press the Windows key + X and select "Windows PowerShell (Admin)" or "Command Prompt (Admin)."
- Type "fsutil behavior query disabledeletenotify" and press Enter.
- If the result is "0," TRIM is enabled. If the result is "1," TRIM is disabled.
How to Disable or Enable TRIM on Windows
- To disable TRIM, type "fsutil behavior set disabledeletenotify 1" and press Enter.|
- To enable TRIM, type "fsutil behavior set disabledeletenotify 0" and press Enter.
The TRIM function introduced a new set of challenges for data recovery and digital forensics. Unlike magnetic drives, where deleted data remains until overwritten, SSDs actively manage and clean up deleted data. Factory access mode, for instance, presents a novel approach to accessing data previously only possible with labour-intensive methods like chip-off analysis.
REQUEST A FREE ONLINE QUOTATION