Unmap

From Omnia
Jump to navigation Jump to search

unmap / trim / discard / deallocate

-

"TRIM, which is not an acronym, is available for SSDs that support the Serial ATA (SATA) interface. UNMAP is the comparable Small Computer System Interface (SCSI) command for use with SAS SSDs. The DEALLOCATE operation provides a similar capability in the nonvolatile memory express (NVMe) command set for Peripheral Component Interconnect Express SSDs." [1]

"NAND flash-based SSDs read and write data in units known as pages, and in a typical SSD, 128 pages constitute a single data block. But, before any data can be written or programmed to the SSD, an entire block of data that is no longer needed must be erased. An internal SSD housekeeping operation known as garbage collection helps to streamline the process."

-

Trim (computing) - Wikipedia - https://en.wikipedia.org/wiki/Trim_(computing)

-

  DSM Deallocation is the NVMe implementation of TRIM, or SCSI UNMAP in the
  NVMe spec. With this change, the driver reports TRIM capability by returning
  required values in INQUIRY B0, READ CAPACITY 16, and MODE SENSE Control Page
  responses, accepts SCSI UNMAP commands, and translates SCSI UNMAP to DSM
  Deallocation NVM command to the device.

[2]

NVME

There is a Dataset Management Deallocate command (UNMAP) in nvme-cli:

sudo nvme dsm /dev/nvme0n1 -d -s 0x1bf0ea00 -b 0xff