You are not logged in.

#1 2021-05-04 19:53:48

lenhuppe
Member
From: New Hampshire USA
Registered: 2018-12-10
Posts: 272
Website

SOLVED Smartest way to format NVMe drives

I'm trying to determine the best way to prepare my nvme drives for a new installation. I'm aware of the nvmc-cli package and the tools that it provides. What I don't know is which ones I should use. I don't get a lot of opportunities to gain experience with nvme dives so I am asking what others have found to be good practices.

In the past I have used 'blkdiscard -f' to wipe my nvme drives but opinions on that seem to vary. I have seen recommendations to avoid the 'nvme sanitize' command altogether. I am considering simply deleting the old namespace and then formatting the drive with a new namespace. I know that 512 byte lba is supported by my drives and that makes it easy to know that I need to use 'ashift=12' when creating my zfs pool.   

# nvme delete-ns /dev/nvme?n?
# nvme format -b 512 -n 1 /dev/nvme?

UPDATE:

The 'blkdiscard -f /dev/nvme?n?' command works just fine for simply wiping an NVMe drive.

According to the docs 'nvme format -f /dev/nvme?n?' will set the drive to defaults and clear the namespace.

ty

Last edited by lenhuppe (2021-05-16 01:05:55)


Why do we drive on the parkway and then park in the driveway?

Offline

#2 2021-05-04 20:14:51

d_fajardo
Member
Registered: 2017-07-28
Posts: 1,568

Re: SOLVED Smartest way to format NVMe drives

You can use wipefs to delete all signatures and return drive to raw state.
Also: https://wiki.archlinux.org/title/Solid_state_drive/NVMe

Offline

#3 2021-05-04 23:15:22

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,544

Re: SOLVED Smartest way to format NVMe drives

Why are you screwing around with namespaces at all? For the vast majority of cases, you treat an NVME drive just like you would a SATA drive.

Offline

Board footer

Powered by FluxBB