常见问题

更多问题

Trim 和垃圾回收是现代 SSD 采用的技术,用于改善性能和耐用性。当 SSD 刚刚从箱中取出时,所有 NAND 块都是空的,因此 SSD 可以通过一次操作将新数据写入空块。随着时间推移,所有空块会被使用并包含用户数据。为了向已用块写入新数据,SSD 将被强制执行读取-修改-写入周期。读取-修改-写入周期会降低 SSD 整体性能,因为 SSD 现在必须执行三次操作,而非一次。读取-修改-写入周期还会导致写入放大,从而降低 SSD 整体耐用性。

Trim 和垃圾回收可以联合释放已用块,从而改善 SSD 性能和耐用性。垃圾回收是 SSD 控制器内置的一项功能,用于整合已用块中的数据,以释放更多空块。此流程在后台进行,完全由 SSD 自己操作。不过,SSD 可能不知道哪些块包含用户数据,哪些块包含用户已删除的陈旧数据。这正是 Trim 发挥作用的地方。Trim 允许操作系统让 SSD 了解数据已被删除,因此 SSD 可以释放之前的已用块。要让 Trim 正常运行,操作系统和 SSD 必须都支持 Trim。目前,多数现代操作系统和 SSD 支持 Trim,不过多数 RAID 配置不支持 Trim。

金士顿 SSD 充分利用了垃圾回收和 Trim 两项技术,可在 SSD 整个生命周期内保持尽可能高的性能和耐用性。

FAQ: KSD-011411-GEN-13
Secure Erase User Guide for Linux
This guide will walk you through securely erasing your Kingston SSD using Linux tools

SATA Secure Erase Procedure

Warning
Please make sure to have a full backup of any important data before you proceed!

Prerequisites
• You must have root privileges.
• You must have your SSD connected to the system as a secondary (non-OS) drive.
• You must have lsscsi and hdparm installed. You may need to install them with your distribution’s package manager.
• Your drive must not be in a security freeze.
• Your drive must not be password protected.

Instructions
1. Find the device name (/dev/sdX) of the drive you wish to erase:
# lsscsi

2. Make sure drive security is not frozen:
# hdparm -I /dev/sdX | grep frozen

If the output shows "frozen" (instead of "not frozen") then you cannot continue to the next step. You must try to remove the security freeze by trying one of the following methods:

Method 1: Put the system to sleep (suspend to RAM) and wake it up. On most distributions the command to suspend is:
# systemctl suspend

Now issue the hdparm command again. If it worked the output will show “not frozen” (instead of “frozen”).
Method 2: Hot plug the drive. This is done by physically unplugging the SATA power cable from the drive and plugging it back in while the system is powered on. You may need to enable hot plug in BIOS. Not all systems support hot plug.

Now issue the hdparm command again. If it worked the output will show “not frozen” (instead of “frozen”).

3. Set a user password on the drive. The password can be anything. Here we are setting the password to “p”:
# hdparm --security-set-pass p /dev/sdX

4. Issue the secure erase command to the drive using the same password:
# hdparm --security-erase p /dev/sdX

This command may take a few minutes to complete. The drive password is removed upon successful completion.
If the secure erase is interrupted or otherwise fails your drive may become security locked. In this case you can remove the security lock using the command below and then try the secure erase procedure again:
# hdparm --security-disable p /dev/sdX

SATA Secure Erase Example



NVMe Secure Erase Procedure

Warning
Please make sure to have a full backup of any important data before you proceed!

Prerequisites
• You must have root privileges.
• You must have your SSD connected to the system as a secondary (non-OS) drive.
• You must have nvme-cli installed. You may need to install it with your distribution’s package manager.
• Your drive must not be password protected.

Instructions
1. Find the device name (/dev/nvmeXn1) of the drive you wish to erase:
# nvme list

2. Issue the format command to the drive. Here we set the secure erase setting to 1 which indicates a user data erase:
# nvme format /dev/nvmeXn1 --ses=1

This command may take a few minutes to complete.


NVMe Secure Erase Example

FAQ: KSM-SE-LIX

联系技术支持

Questions about a Kingston product you already own? Ask a Kingston expert.

致电技术支持

Monday-Friday 6 a.m.-6 p.m. PT

+1 (800)435-0640 (Closed)

关于 2019 冠状病毒病 (COVID-19) 在如何影响我们业务运营的信息,请点击 此处。

保持联系!立即注册我们的电子邮件,获取金士顿新闻和更多其他内容。