Cannot Format or Santatize NVMe SSD
I purchase an Inland Professional 2TB NVMe SSD to mount as a storage drive for my new Linux server build. I am using an ASRock DeskMini with a pair of 4 TB SATA SSD Drives in RAID1 for my build. I have installed Debian Testing (Bookworm) and the system is working fine. I have installed the NVMe SSD in the M.2 slot and it shows up in my /dev directory as nvme0 as does the name space nvme0n1 and two partitions nvme0n1p1 and nvme0n1p2. I have installed the nvme-cli package to operate on the drive as the server is headless. Everything apparently copesthetic so far.
My plan is to format the drive and set up an ext4 file system. Problem is I cannot seem to format it.
To give you a little information I will provide the results of a few commands:
# nvme list gives
Node SN Model Namespace Usage Format FW Rev
---------------- -------------------- ---------------------------------------- --------- -------------------------- ---------------- --------
/dev/nvme0n1 20060520480007 PCIe SSD 1 2.05 TB / 2.05 TB 512 B + 0 B EDFM00.5
# parted /dev/nvme0n1 print, after responding ignore to errors a few time gives
Model: PCIe SSD (nvme)
Disk /dev/nvme0n1: 2048GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 17.4kB 16.8MB 16.8MB Microsoft reserved partition msftres
2 16.8MB 2048GB 2048GB ntfs Basic data partition msftdata
The format attempts result as follows:
# nvme format /dev/nvme0 --force
NVMe status: Unknown(0x2182)
# nvme format /dev/nvme0n1 --force
NVMe status: Unknown(0x2182)
I have done a lot of Googling and cannot find a solution to formatting this drive. I see mention of it possibly being locked or somehow secured, but no solution that allows me to format it.
Any help you can provide is greatly appreciated.
It is not apparent that my attempt to use TSMikeW's recommendation is showing up in the comments, so I am adding it hear.
Appreciate your helpTSMikeW!
Thank you for responding to my question.
parted seems to see the NVMe partitions (for brevity I have omitted much of the sata drive and software raid info with breaks indicated by . . . . .)
# parted -l
Model: ATA Samsung SSD 870 (scsi)
Disk /dev/sda: 4001GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 538MB 537MB fat16 boot, esp
2 538MB 10.5GB 10.0GB raid
3 10.5GB 30.5GB 20.0GB raid
4 30.5GB 31.0GB 500MB raid
5 31.0GB 131GB 100GB raid
6 131GB 195GB 64.0GB raid
7 195GB 196GB 1000MB raid
8 196GB 296GB 100GB raid
9 296GB 4001GB 3705GB raid
. . . . . . . .
Warning: Error fsyncing/closing /dev/nvme0n1p1: No data available
Retry/Ignore? i
Warning: Error fsyncing/closing /dev/nvme0n1p2: No data available
Retry/Ignore? i
Warning: Error fsyncing/closing /dev/nvme0n1: No data available
Retry/Ignore? i
Model: PCIe SSD (nvme)
Disk /dev/nvme0n1: 2048GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 17.4kB 16.8MB 16.8MB Microsoft reserved partition msftres
2 16.8MB 2048GB 2048GB ntfs Basic data partition msftdata
. . . . . . .
Model: Linux Software RAID Array (md)
Disk /dev/md1: 20.0GB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Disk Flags:
Number Start End Size File system Flags
1 0.00B 20.0GB 20.0GB ext4
I do not seem to be able to operate on the partitions, however:
# parted /dev/nvme0n1 rm 2
Warning: Error fsyncing/closing /dev/nvme0n1p1: No data available
Retry/Ignore? i
Warning: Error fsyncing/closing /dev/nvme0n1p2: No data available
Retry/Ignore? i
Warning: Error fsyncing/closing /dev/nvme0n1: No data available
Retry/Ignore? i
Warning: Error fsyncing/closing /dev/nvme0n1p1: No data available
Retry/Ignore? i
Warning: Error fsyncing/closing /dev/nvme0n1p2: No data available
Retry/Ignore? i
Error: Input/output error during write on /dev/nvme0n1
Retry/Ignore/Cancel? i
Warning: Error fsyncing/closing /dev/nvme0n1p1: No data available
Retry/Ignore? i
Warning: Error fsyncing/closing /dev/nvme0n1p2: No data available
Retry/Ignore? i
Error: Partition(s) 2 on /dev/nvme0n1 have been written, but we have been unable to inform the kernel of the change, probably because it/they are in use. As a result, the old partition(s) will remain in use. You should reboot now before
making further changes.
Ignore/Cancel? i
Information: You may need to update /etc/fstab.
Warning: Error fsyncing/closing /dev/nvme0n1: No data available
Retry/Ignore? i
I have rebooted immediately after with no result and run this iteration a few times (the definition of insanity, expecting a different result).
My /etc/fstab file only shows the RAID partitions on my SATA drives, which one would expect since the NVMe drive has not mounted.
I have read through man nvme-cli to seek direction, but it gives very non-descriptive explanations of the commands which have not helped me.
I have also tried reading through the NVME 1.4 Specification at nvmexpress.org, but it is like trying to take a sip from a fire hose. I really cannot make heads or tails of what they are trying to share.
My intuition tells me it is some type of security or lock setting, but that is just a hunch.
Again, thank you for responding to my question.
Answers
-
Are you able to see the partitions with parted and remove them with that tool? If so, I would go with that option and then reattempt the format.
-
Thank you for responding to my question.
parted seems to see the NVMe partitions (for brevity I have omitted much of the sata drive and software raid info with breaks indicated by . . . . .)
# parted -l
Model: ATA Samsung SSD 870 (scsi)
Disk /dev/sda: 4001GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 538MB 537MB fat16 boot, esp
2 538MB 10.5GB 10.0GB raid
3 10.5GB 30.5GB 20.0GB raid
4 30.5GB 31.0GB 500MB raid
5 31.0GB 131GB 100GB raid
6 131GB 195GB 64.0GB raid
7 195GB 196GB 1000MB raid
8 196GB 296GB 100GB raid
9 296GB 4001GB 3705GB raid
. . . . . . . .
Warning: Error fsyncing/closing /dev/nvme0n1p1: No data available
Retry/Ignore? i
Warning: Error fsyncing/closing /dev/nvme0n1p2: No data available
Retry/Ignore? i
Warning: Error fsyncing/closing /dev/nvme0n1: No data available
Retry/Ignore? i
Model: PCIe SSD (nvme)
Disk /dev/nvme0n1: 2048GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 17.4kB 16.8MB 16.8MB Microsoft reserved partition msftres
2 16.8MB 2048GB 2048GB ntfs Basic data partition msftdata
. . . . . . .
Model: Linux Software RAID Array (md)
Disk /dev/md1: 20.0GB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Disk Flags:
Number Start End Size File system Flags
1 0.00B 20.0GB 20.0GB ext4
I do not seem to be able to operate on the partitions with parted, however:
# parted /dev/nvme0n1 rm 2
Warning: Error fsyncing/closing /dev/nvme0n1p1: No data available
Retry/Ignore? i
Warning: Error fsyncing/closing /dev/nvme0n1p2: No data available
Retry/Ignore? i
Warning: Error fsyncing/closing /dev/nvme0n1: No data available
Retry/Ignore? i
Warning: Error fsyncing/closing /dev/nvme0n1p1: No data available
Retry/Ignore? i
Warning: Error fsyncing/closing /dev/nvme0n1p2: No data available
Retry/Ignore? i
Error: Input/output error during write on /dev/nvme0n1
Retry/Ignore/Cancel? i
Warning: Error fsyncing/closing /dev/nvme0n1p1: No data available
Retry/Ignore? i
Warning: Error fsyncing/closing /dev/nvme0n1p2: No data available
Retry/Ignore? i
Error: Partition(s) 2 on /dev/nvme0n1 have been written, but we have been unable to inform the kernel of the change, probably because it/they are in use. As a result, the old partition(s) will remain in use. You should reboot now before
making further changes.
Ignore/Cancel? i
Information: You may need to update /etc/fstab.
Warning: Error fsyncing/closing /dev/nvme0n1: No data available
Retry/Ignore? i
I have rebooted immediately after with no result and run this iteration a few times (the definition of insanity, expecting a different result).
My /etc/fstab file only shows the RAID partitions on my SATA drives, which one would expect since the NVMe drive has not mounted.
I have read through man nvme-cli to seek direction, but it gives very non-descriptive explanations of the commands which have not helped me.
I have also tried reading through the NVME 1.4 Specification at nvmexpress.org, but it is like trying to take a sip from a fire hose. I really cannot make heads or tails of what they are trying to share.
My intuition tells me it is some type of security or lock setting, but that is just a hunch.
Again, thank you for responding to my question.
-
It's not giving us an I/O error but that's the way it's behaving. Most helpful step here would be to rule out the OS being an issue for this particular drive. Can you install the drive in a windows system, or dual boot Windows 10 and try to clean it?
In regards to this being a security lock, you may be correct. I'm not familiar with the system you have, but ASRock boards under "Tools" Will have NVME Secure Erase, and NVME Sanitation. Unlikely that secure erase will support the NVME drive, but the Sanitation option should work from the BIOS to format the drive. Be careful what drive is selected if you have multiple NVME drives, or disconnect them while this is done.
Categories
- All Categories
- 1 The Blog
- 1 What's Trending
- 7.3K The Community
- 3K General Discussion
- 99 New Members
- 776 Consumer Tech
- 190 Prebuilt PCs and Laptops
- 151 Software
- 30 Audio/Visual
- 50 Networking & Security
- 4 Home Automation
- 5 Digital Photography
- 12 Content Creators
- 27 Hobby Boards & Projects
- 75 3D Printing
- 83 Retro Arcade/Gaming
- 59 All Other Tech
- 276 PowerSpec
- 2.5K Store Information and Policy
- 140 Off Topic
- 37 Community Ideas & Feedback
- 595 Your Completed Builds
- 3.6K Build-Your-Own PC
- 2.6K Help Choosing Parts
- 302 Graphics Cards
- 315 CPUs, Memory, and Motherboards
- 134 Cases and Power Supplies
- 50 Air and Liquid Cooling
- 46 Monitors and Displays
- 88 Peripherals
- 56 All Other Parts
- 60 Featured Categories
We love seeing what our customers build
Submit photos and a description of your PC to our build showcase
Submit NowLooking for a little inspiration?
See other custom PC builds and get some ideas for what can be done
View Build ShowcaseSAME DAY CUSTOM BUILD SERVICE
If You Can Dream it, We Can Build it.
Services starting at $149.99