1

Details

  • Motherboard: MSI MAG B660
  • OS: Windows 11
  • Processor: Intel i7-12700
  • SSD: XPG S5 512 GB NVMe

What should I do next to remove Read-only protection from my SSD?

Issue Description:
I was using my system to browse the internet when I suddenly encountered a blue screen error with the stop code Registry Error. I attempted:

  • an automatic repair with, and without, a bootable Windows 11 USB drive

  • restoring the system to a previous restore point, but encountered errors with each attempt

    I tried to reinstall Windows, however during the installation process, I was unable to delete any partitions on my drive, receiving error message: We couldn't create a new partition.

  • I attempted to delete the SSD partitions using DiskPart, cleared the partition table with clean, but upon issuing create partition primary, I received error:

    Virtual Disk Service error: The object is not found.
    
  • I connected the drive to another PC, and using the Disk Management tool, tried to format the drive, but the SSD appeared as offline and I could not delete the partitions. I created a bootable Ubuntu USB drive to delete the partitions using GParted and fdisk, but both tools showed errors, with GParted indicating the presence of EFI and Microsoft Reserved partitions marked in red:
    gparted

  • Despite trying to delete the partitions using nvme-cli, I was unsuccessful

  • sudo smartctl -x /dev/nvme0:

    smartctl 7.4 2023-08-01 r5530 [x86_64-linux-6.8.0-31-generic] (local build)
    Copyright (C) 2002-23, Bruce Allen, Christian Franke, www.smartmontools.org
    
    === START OF INFORMATION SECTION ===
    Model Number:                       XPG GAMMIX S5
    Serial Number:                      2M442L1ES8HJ
    Firmware Version:                   VC0S036H
    PCI Vendor/Subsystem ID:            0x1cc1
    IEEE OUI Identifier:                0x707c18
    Controller ID:                      1
    NVMe Version:                       1.4
    Number of Namespaces:               1
    Namespace 1 Size/Capacity:          512,110,190,592 [512 GB]
    Namespace 1 Formatted LBA Size:     512
    Namespace 1 IEEE EUI-64:            707c18 1b8ecca600
    Local Time is:                      Fri May 31 07:36:50 2024 UTC
    Firmware Updates (0x02):            1 Slot
    Optional Admin Commands (0x0017):   Security Format Frmw_DL Self_Test
    Optional NVM Commands (0x0054):     DS_Mngmt Sav/Sel_Feat Timestmp
    Log Page Attributes (0x02):         Cmd_Eff_Lg
    Maximum Data Transfer Size:         32 Pages
    Warning  Comp. Temp. Threshold:     100 Celsius
    Critical Comp. Temp. Threshold:     110 Celsius
    
    Supported Power States
    St Op     Max   Active     Idle   RL RT WL WT  Ent_Lat  Ex_Lat
    0 +     8.00W       -        -    0  0  0  0        0       0
    1 +     4.00W       -        -    1  1  1  1        0       0
    2 +     3.00W       -        -    2  2  2  2        0       0
    3 -   0.0300W       -        -    3  3  3  3     5000   10000
    4 -   0.0050W       -        -    4  4  4  4    54000   45000
    
    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!
    - media has been placed in read only mode
    
    SMART/Health Information (NVMe Log 0x02)
    Critical Warning:                   0x08
    Temperature:                        45 Celsius
    Available Spare:                    6%
    Available Spare Threshold:          32%
    Percentage Used:                    1%
    Data Units Read:                    33,644,728 [17.2 TB]
    Data Units Written:                 21,386,221 [10.9 TB]
    Host Read Commands:                 493,923,922
    Host Write Commands:                230,227,110
    Controller Busy Time:               0
    Power Cycles:                       2,241
    Power On Hours:                     3,440
    Unsafe Shutdowns:                   364
    Media and Data Integrity Errors:    0
    Error Information Log Entries:      0
    Warning  Comp. Temperature Time:    0
    Critical Comp. Temperature Time:    0
    
    Error Information (NVMe Log 0x01, 8 of 8 entries)
    No Errors Logged
    
    Self-test Log (NVMe Log 0x06)
    Self-test status: No self-test in progress
    Num  Test_Description  Status                       Power_on_Hours  Failing_LBA  NSID Seg SCT Code
    0   Extended          Completed without error                3439            -     -   -   -    -
    1   Short             Completed without error                3439            -     -   -   -    -
    2   Extended          Completed without error                3439            -     -   -   -    -
    3   Short             Completed without error                3439            -     -   -   -    -
    
  • When running sudo smartctl -H /dev/nvme0, the Health test fails with:

    smartctl 7.4 2023-08-01 r5530 [x86_64-linux-6.8.0-31-generic] (local build)
    Copyright (C) 2002-23, Bruce Allen, Christian Franke, www.smartmontools.org
    
    === START OF SMART DATA SECTION ===
    SMART overall-health self-assessment test result: FAILED!
    - media has been placed in read only mode
    
4
  • Have you by chance ever grabbed S.M.A.R.T data from the drive prior to the issue? It would be telling to see what the wear leveling and reserved block values were. IIRC, a failure to even populate S.M.A.R.T data indicates a critical failure of the hardware or firmware for the drive. I've never had an NVMe drive so this may not be sound advice, but re-flashing the drive's firmware may be worth a shot
    – JW0914
    Commented May 31 at 11:20
  • No i never grabbed the S.M.A.R.T data from SSD prior to the issue. Commented May 31 at 11:29
  • How can i re-flash the firmware i already try XPG Toolbox i guess it only has Firmware Update option and when i click on it it say i already have update firmware. Commented May 31 at 11:33
  • There may be no way to then. It has a 5yr warranty (warranty check) and I would file a warranty claim to have it replaced (I would include printouts of the output from the two S.M.A.R.T commands within code boxes with the returned drive). They may also offer cross-shipping/advanced replacement, where the new drive is shipped out to you before they receive the old one back. General FYI: Disk Management [DiskMgmt.msc] is the GUI for DiskPart, with DiskPart offering more functionality
    – JW0914
    Commented May 31 at 12:02

2 Answers 2

2

Critical Warning: 0x08

Convert 0x08 to binary:

0               8
8   4   2   1   8   4   2   1
0   0   0   0   1   0   0   0

So we have:

7   6   5   4   3   2   1   0
0   0   0   0   1   0   0   0

Bit 3 is set, we can look up:

Bit 0: If set to ‘1’, then the available spare capacity has fallen below the threshold
Bit 1: If set to ‘1’, then a temperature is (> over temp threshold) or (< below temp threshold)
Bit 2: If set to ‘1’, then the NVM subsystem reliability has been degraded due to significant media related errors or any internal error that degrades NVM subsystemreliability.
Bit 3: If set to ‘1’, then the media has been placed in read only mode
Bit 4: If set to ‘1’, then the volatile memory backup device has failed. This field is only valid if the controller has a volatile memory backup solution.

So SSD is set read-only at the firmware level. No amount of DiskPart or registry editing will solve this, you'll need to replace this drive.

https://www.disktuna.com/a-write-protected-ssd-nvme-read-only/

-3

Using Diskpart in Windows:

Open Command Prompt as Administrator: Press Win + X and select "Command Prompt (Admin)" or "Windows PowerShell (Admin)". Launch Diskpart: Type diskpart and press Enter. List Disks: Type list disk and press Enter. Identify your NVMe SSD from the list. Select the Disk: Type select disk X (replace X with the disk number of your NVMe SSD) and press Enter. Clear Read-Only Attribute: Type attributes disk clear readonly and press Enter. Exit Diskpart: Type exit and press Enter to close Diskpart. Using Disk Management in Windows:

Open Disk Management: Press Win + X and select "Disk Management". Locate the NVMe SSD: Find your NVMe SSD in the list of drives. Check the Volume Status: Right-click the volume and see if you can remove the read-only attribute from the Properties menu. Sometimes, a quick format might resolve the issue, but be cautious as this will erase data.

3
  • I already try the DISKPART solution it did not work for me. When i run the attributes disk it output 2 read-only properties one current Read-only state:yes and second one Read-only:No and when i run the DISKPART attributes disk clear/set readonly it affects the second property not the first one which is set to Yes. Commented May 31 at 10:33
  • You mixed the "read-only attribute" (which is a flag written in the data section of the disk (SSD) with the "device status" being read-only. Obviously you cannot change a flag in the data section of a read-only device. Or is this another "Chat GPT answer"?
    – U. Windl
    Commented May 31 at 12:57
  • 1
    This answer was generated by ChatGPT, because it failed to read the context of the question, and had hallucinations of possible DiskPart solutions
    – Ramhound
    Commented Jun 1 at 12:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .