linux nvme命令,Linux command – nvme format

f690b1cc60d51e1e6ff501475480e805.gif

SSD

傳統的 SSD 硬碟在做硬碟資料抹除 (security erase 可以讓硬碟回覆到原本的效能水準) 是透過 #hdparm .

首先要檢查硬碟是否有支援 security set 指令.

[root@benjr ~]# hdparm -I /dev/sdb

要先設定 security password 才能執行 security erase.

[root@benjr ~]# hdparm --security-set-pass 1234 /dev/sdb

[root@benjr ~]# hdparm --security-erase 1234 /dev/sdb

NVME

但是 nvme 在做資料抹除時,需要使用 # nvme format 指令.

[root@benjr ~]# nvme format /dev/nvme0 --namespace-id=1 --ses=1

參數

-n nsid, –namespace-id=nsid

Send the format command for the specified nsid. This can be used to override the default value for either character device (0xffffffff) or the block device (result from NVME_IOCTL_ID).

-s ses, –ses=ses

Secure Erase Settings: This field specifies whether a secure erase should be performed as part of the format and the type of the secure erase operation. The erase applies to all user data, regardless of location (e.g., within an exposed LBA, within a cache, within deallocated LBAs, etc). Defaults to 0.

0

No secure erase operation requested

1

User Data Erase: All user data shall be erased,contents of the user data after the erase is indeterminate (e.g., the user data may be zero filled, one filled, etc). The controller may perform a cryptographic erase when a User Data Erase is requested if all user data is encrypted.

2

Cryptographic Erase: All user data shall be erased cryptographically. This is accomplished by deleting the encryption key.

3–7

Reserved.

沒有解決問題,試試搜尋本站其他內容

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值