Friday, April 19, 2024
 Popular · Latest · Hot · Upcoming
14
rated 0 times [  14] [ 0]  / answers: 1 / hits: 25854  / 2 Years ago, wed, april 27, 2022, 5:14:18

Since SSD has write amplification, I want to reset the SSD to the initial out-of-box performance. Most tutorials are for SATA SSD (hdparm --secure-erase), I want to know how to erase a partition of NVMe SSD (maybe use nvme command?).


One more question: does dd if=/dev/zero of=/dev/nvme0n1 help? Or does fio --filename=/dev/nvme1n1 --direct=1 --buffered=0 --rw=trim --bs=4k --size=100G --numjobs=16 --iodepth=32 --group_reporting --name=trim help?


Thanks!


More From » ssd

 Answers
1

To totally erase a NVMe drive.


This will erase entire drive.


You may need to first install nvme - the NVMe storage command line interface utility (nvme-cli). Then review commands and list all nvme devices. List wil also show firmware revision & you should check that you have latest firmware.


sudo apt install nvme-cli
nvme help
nvme --help
nvme --help format
sudo nvme list
sudo nvme format -s1 <device>

fred@z170-focal-k:/mnt/data$ sudo nvme list
[sudo] password for fred:
Node SN Model Namespace Usage Format FW Rev
---------------- -------------------- ---------------------------------------- --------- -------------------------- ---------------- --------
/dev/nvme0n1 S4P2NF0M514514L Samsung SSD 970 EVO Plus 500GB 1 164.30 GB / 500.11 GB 512 B + 0 B 2B2QEXM7

[#2040] Thursday, April 28, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
inaterested

Total Points: 500
Total Questions: 104
Total Answers: 92

Location: Virgin Islands (U.S.)
Member since Fri, May 7, 2021
3 Years ago
inaterested questions
Fri, Aug 12, 22, 21:24, 2 Years ago
Tue, Oct 26, 21, 20:41, 3 Years ago
Fri, Dec 23, 22, 17:12, 1 Year ago
;