You are not logged in.
Pages: 1
Hello,
I was following the arch linux installation guide and I accidentally ran mkfs.ext4 on my ssd /dev/nvme0n1 instead of the partition. I don't care about any of the data as it was mostly empty, however the drive has since become unusable. When booting I get the AMI screen telling me to replace it and I can't reformat it to MBR or GPT nor can I write partitions. The SSD worked fine before this and I got no such errors. Is their any way to get it back to a working state or do I need to ditch it and buy a new one? I looked around for a while and spent a couple hours trying fixes but nothing worked. I am open to any fixes and can provide any logs / debug outputs.
Offline
Hello,
and I can't reformat it to MBR or GPT nor can I write partitions.
Why not?
Offline
By default, mkfs.ext4 discards all data first thing. So whether you care about it or not, you're not getting it back.
mke2fs 1.47.3 (8-Jul-2025)
Discarding device blocks: done « all data gone at this point
Creating filesystem...Since data is already gone you can run another discard on it with `blkdiscard /dev/nvmeXnY` and reboot. Make extra sure not to hit the wrong device this time - nvme device names/numbers can change between reboots.
Some BIOS also offer secure erase for NVME. If the SSD has a PSID printed on its label you could also try a PSID Revert. That also gets rid of any password or locks if you locked yourself out by setting any.
Otherwise posts commands and error messages and kernel messages (dmesg). Is it detected at all and shown with capacity in lsblk?
Offline
I have tried blkdiscard -f, and get the following errors:
BLKDISCARD: /dev/nvme0n1 ioctl failed: No data available Without the -f I get the following
blkdiscard: /dev/nvme0n1 contains existing file system (ext4).
blkdiscard: This is destructive operation, data will be lost! Use the -f option to override.The drive does show up in lsblk (nvme0n1 is the drive I want to repair).
nvme2n1 259:0 0 1.8T 0 disk
├─nvme2n1p1 259:1 0 100M 0 part
├─nvme2n1p2 259:2 0 16M 0 part
├─nvme2n1p3 259:3 0 1.8T 0 part
└─nvme2n1p4 259:4 0 742M 0 part
nvme0n1 259:5 0 931.5G 0 disk
nvme1n1 259:6 0 1.8T 0 disk
├─nvme1n1p1 259:7 0 16M 0 part
└─nvme1n1p2 259:8 0 1.8T 0 part If it helps the drive is a 970 Evo Plus, I have tried updating the firmware from my windows install using samsung magician which fails.
Here is the output of dmesg
[ 1635.891804] nvme0n1: Dataset Management(0x9) @ LBA 0, 8388607 blocks, Write Fault (sct 0x2 / sc 0x80)
[ 1635.891811] critical medium error, dev nvme0n1, sector 0 op 0x3:(DISCARD) flags 0x4000 phys_seg 1 prio class 0
[ 1635.891831] nvme0n1: Dataset Management(0x9) @ LBA 8388607, 8388607 blocks, Write Fault (sct 0x2 / sc 0x80)
[ 1635.891833] critical medium error, dev nvme0n1, sector 8388607 op 0x3:(DISCARD) flags 0x4000 phys_seg 1 prio class 0
[ 1635.891860] nvme0n1: Dataset Management(0x9) @ LBA 16777214, 8388607 blocks, Write Fault (sct 0x2 / sc 0x80)
[ 1635.891862] critical medium error, dev nvme0n1, sector 16777214 op 0x3:(DISCARD) flags 0x4000 phys_seg 1 prio class 0
[ 1635.891883] nvme0n1: Dataset Management(0x9) @ LBA 25165821, 8388607 blocks, Write Fault (sct 0x2 / sc 0x80)
[ 1635.891884] critical medium error, dev nvme0n1, sector 25165821 op 0x3:(DISCARD) flags 0x4000 phys_seg 1 prio class 0
[ 1635.892441] nvme0n1: Dataset Management(0x9) @ LBA 33554428, 8388607 blocks, Write Fault (sct 0x2 / sc 0x80)
[ 1635.892442] critical medium error, dev nvme0n1, sector 33554428 op 0x3:(DISCARD) flags 0x4000 phys_seg 1 prio class 0
[ 1635.892467] nvme0n1: Dataset Management(0x9) @ LBA 41943035, 8388607 blocks, Write Fault (sct 0x2 / sc 0x80)
[ 1635.892469] critical medium error, dev nvme0n1, sector 41943035 op 0x3:(DISCARD) flags 0x4000 phys_seg 1 prio class 0
[ 1635.892494] nvme0n1: Dataset Management(0x9) @ LBA 50331642, 8388607 blocks, Write Fault (sct 0x2 / sc 0x80)
[ 1635.892496] critical medium error, dev nvme0n1, sector 50331642 op 0x3:(DISCARD) flags 0x4000 phys_seg 1 prio class 0
[ 1635.892520] nvme0n1: Dataset Management(0x9) @ LBA 58720249, 8388607 blocks, Write Fault (sct 0x2 / sc 0x80)
[ 1635.892522] critical medium error, dev nvme0n1, sector 58720249 op 0x3:(DISCARD) flags 0x4000 phys_seg 1 prio class 0
[ 1635.893077] nvme0n1: Dataset Management(0x9) @ LBA 67108856, 8388607 blocks, Write Fault (sct 0x2 / sc 0x80)
[ 1635.893079] critical medium error, dev nvme0n1, sector 67108856 op 0x3:(DISCARD) flags 0x4000 phys_seg 1 prio class 0
[ 1635.893104] nvme0n1: Dataset Management(0x9) @ LBA 75497463, 8388607 blocks, Write Fault (sct 0x2 / sc 0x80)
[ 1635.893106] critical medium error, dev nvme0n1, sector 75497463 op 0x3:(DISCARD) flags 0x4000 phys_seg 1 prio class 0I tried reformatting it using gdisk:
GPT fdisk (gdisk) version 1.0.10
Partition table scan:
MBR: not present
BSD: not present
APM: not present
GPT: not present
Creating new GPT entries in memory.
Command (? for help): o
This option deletes all partitions and creates a new protective MBR.
Proceed? (Y/N): y
Command (? for help): w
Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
PARTITIONS!!
Do you want to proceed? (Y/N): y
OK; writing new GUID partition table (GPT) to /dev/nvme0n1.
The operation has completed successfully.However it doesn't seem to work, it shows nothing for pttype
nvme2n1 gpt 1.8T
├─nvme2n1p1 gpt 100M
├─nvme2n1p2 gpt 16M
├─nvme2n1p3 gpt 1.8T
└─nvme2n1p4 gpt 742M
nvme0n1 931.5G
nvme1n1 gpt 1.8T
├─nvme1n1p1 gpt 16M
└─nvme1n1p2 gpt 1.8T The bios SSD self test fails immediately. I could try reseating it however the AMI screen has only started occuring after I messed with it (and called mkfs.ext4), therefore I find it unlikely that this is the cause.
Last edited by Hypericats (2025-08-25 18:44:11)
Offline
# pacman -S smartmontools
# smartctl -a /dev/nvme0
Percentage Used
Wear level. 0% means new, 100% means end of life.
Data Units Written
Total amount of data written (usually in 512MB units).
Media and Data Integrity Errors
Should be 0. If this increases means drive failing.
Error Information Log Entries
Count of recorded errors. Should be low/zero.
Last edited by solskog (2025-08-26 07:21:54)
Offline
After running
smartctl -a /dev/nvme0n1I get
=== START OF INFORMATION SECTION ===
Model Number: Samsung SSD 970 EVO Plus 1TB
Serial Number: S6S1NC0RB07276K
Firmware Version: 3B2QEXM7
PCI Vendor/Subsystem ID: 0x144d
IEEE OUI Identifier: 0x002538
Total NVM Capacity: 1,000,204,886,016 [1.00 TB]
Unallocated NVM Capacity: 0
Controller ID: 6
NVMe Version: 1.3
Number of Namespaces: 1
Namespace 1 Size/Capacity: 1,000,204,886,016 [1.00 TB]
Namespace 1 Utilization: 1,091,289,088 [1.09 GB]
Namespace 1 Formatted LBA Size: 512
Namespace 1 IEEE EUI-64: 002538 5b115060e7
Local Time is: Tue Aug 26 07:17:37 2025 UTC
Firmware Updates (0x16): 3 Slots, no Reset required
Optional Admin Commands (0x0017): Security Format Frmw_DL Self_Test
Optional NVM Commands (0x0057): Comp Wr_Unc DS_Mngmt Sav/Sel_Feat Timestmp
Log Page Attributes (0x0f): S/H_per_NS Cmd_Eff_Lg Ext_Get_Lg Telmtry_Lg
Maximum Data Transfer Size: 128 Pages
Warning Comp. Temp. Threshold: 82 Celsius
Critical Comp. Temp. Threshold: 85 Celsius
Supported Power States
St Op Max Active Idle RL RT WL WT Ent_Lat Ex_Lat
0 + 7.54W - - 0 0 0 0 0 0
1 + 7.54W - - 1 1 1 1 0 200
2 + 7.54W - - 2 2 2 2 0 1000
3 - 0.0500W - - 3 3 3 3 2000 1200
4 - 0.0050W - - 4 4 4 4 500 9500
Supported LBA Sizes (NSID 0x1)
Id Fmt Data Metadt Rel_Perf
0 + 512 0 0
=== START OF SMART DATA SECTION ===
SMART overall-health self-assessment test result: FAILED!
- available spare has fallen below threshold
- media has been placed in read only mode
SMART/Health Information (NVMe Log 0x02, NSID 0x1)
Critical Warning: 0x09
Temperature: 49 Celsius
Available Spare: 0%
Available Spare Threshold: 10%
Percentage Used: 1%
Data Units Read: 43,365,123 [22.2 TB]
Data Units Written: 56,024,095 [28.6 TB]
Host Read Commands: 787,616,437
Host Write Commands: 932,867,283
Controller Busy Time: 1,679
Power Cycles: 2,274
Power On Hours: 3,870
Unsafe Shutdowns: 166
Media and Data Integrity Errors: 48,963
Error Information Log Entries: 48,963
Warning Comp. Temperature Time: 0
Critical Comp. Temperature Time: 0
Temperature Sensor 1: 49 Celsius
Temperature Sensor 2: 62 Celsius
Error Information (NVMe Log 0x01, 16 of 64 entries)
No Errors Logged
Self-test Log (NVMe Log 0x06, NSID 0xffffffff)
Self-test status: No self-test in progress
No Self-tests LoggedOffline
Available Spare: 0%
The drive has no reserved NAND left to replace worn-out blocks.Power On Hours: 3,870
This drive still very new.Media and Data Integrity Errors: 48,963
The drive has failed ~49,000 read/write operations due to unrecoverable NAND (flash memory) errors. Each one means data could not be stored or retrieved correctly.Error Information Log Entries: 48,963
The NVMe error log has recorded ~49,000 entries, matching the media errors.
I wonder if the failed firmware update caused this issue? Otherwise, If the drive is still under warranty, contact the reseller. mkfs.ext4 /dev/nvme0n1 will not cause the hardware issues you’re seeing.
Last edited by solskog (2025-08-26 07:45:08)
Offline
This is probably silly, but have you tried unplugging the drive so that it goes through a full cold power cycle? Whole disk filesystems are a thing so if a drive cannot handle that (unlikely) then I wouldn't buy that brand.
Last edited by topcat01 (2025-08-26 19:39:51)
Offline
a full cold power cycle.
Yes, that makes sense! Given that the drive is still new, and the previous firmware update failed because the drive entered a read-only state (triggered by running mkfs.ext4 /dev/nvme0n1), the next step would be:
1, A full cold power cycle.
2, Run BIOS diagnostic Or "smartclt -a" at OS level.
3, If the drive is unlocked then update the latest firmware, otherwise contact reseller.
Offline
Pages: 1