Diskpart could not clear disk attributes

Contents

The error »Diskpart could not clear disk attributes» occurs when the user tries to change the read-only state of a storage device using the Diskpart application and the request is denied. Diskpart is the option of choice to resolve read-only storage devices by changing their attribute via command line.

4-19-6743484

If Diskpart cannot change the storage device attribute, will give an error message. This message is very common and if there are no physical attributes damaged, the error is resolved in no time. Please note that if you get this error in Diskpart, there is a high probability that other software will also tell you a similar condition.

What causes the error $ 0027Diskpart when clearing disk attributes $ 0027?

Diskpart's inability to change the status of your storage device attributes from read-only to write can be due to several different reasons. Some of them are listed below:

  • There is a write-protected physical switch on the USB device or SD card.

  • The disk you are trying to operate on has bad sectors or is set to hide.

  • Diskpart application is not running as administrator.

  • The new USB device is in RAW format. The RAW format is created when a file system is corrupted or there are hardware problems. Diskpart does not work for these types of formats.

Before continuing with the solutions, you need to make sure you are running Diskpart application as administrator. If you don't have elevated access, the operating system may deny you access.

Solution 1: turn off physical switch

Some USB devices and SD card readers have a physical write-protected switch that disables all write options on the storage device.. This is implemented to counteract accidental erasure or data overwriting. If the physical switch is enabled, Diskpart application will not be able to change the disk attribute to writable in any way.

5-15-3-8296418

Find the physical switch on the sides of the device. Make sure it is off and reconnect the storage device. First, try to transfer the data normally and, if not successful, you can run Diskpart application again as administrator and try to change attributes.

Solution 2: Modify the password $ 0027WriteProtected $ 0027 in registry editor

Write protection is a registry entry in the Windows registry editor and acts as a protection by limiting certain programs and applications when writing to storage devices. If the indicator “WriteProtected” Its on, you will not be able to write data to your storage device correctly. To counteract this, we will open the registry editor and change the key.

Note: the registry editor is a powerful tool. Just change the keys you know, otherwise, the system may enter an error state.

  1. Press Windows + R, scribe “regedit” in the dialog box and press Enter.

  2. Once in the registry editor, navigate to the following file path:

HKEY_LOCAL_MACHINE_SYSTEMN-CurrentControlSetN-StorageDevicePolicies
  1. Look for the entry »WriteProtect» on the left side of the window, double click on it and change its value to

1-162-3135367

  1. Press OK to save changes and exit. Restart your computer and try transferring the data to your storage device again.

Solution 3: check for drive errors

If this error message appears on your hard drive, you should check for bad sectors or logical errors. If any of these errors occur, Windows will not be able to change the storage device attribute type. This method is not limited to hard drives; You can also change removable devices as long as they are recognized by the system. 1

  1. Press Windows + S, scribe “symbol of the system” in the dialog, right-click on the app and select “Execute as an administrator”.

  2. Once on the elevated command line, run the following command:

chkdsk F: /f

2-20-2188607

In this case, the letter $ 0027F $ 0027 corresponds to disk volume. You can change it based on the letter assigned to the storage device on your system.

Solution 4: Clear attributes in RAW

If you have a RAW format USB device, you may not be able to change the disk attribute of the storage device. As it was mentioned already, Diskpart does not work well in RAW formats. To solve the problem, we will try to convert the storage type and then we will try to access.

  1. Press Windows + S, scribe “diskpart” in the dialog, right-click on the app and select “With”.

  2. Once on the elevated command line, follow the listed commands:

list volume
select volume $ 0027n $ 0027 (replace $ 0027n $ 0027 with the volume number of the unit)
fast fs = fat32 format (you also have the flexibility to change the format to $ 0027ntfs $ 0027 or $ 0027exfat $ 0027)
exit.

3-20-9048614

  1. Disconnect the removable storage device and wait a few seconds before reconnecting it. Now try any normal write operation and if it fails, you can run Diskpart again and try to change the attribute.

Solution 5: Check the hardware components

If all of the above methods have failed and have not resolved the error message being discussed, you must check your storage device. In many cases, this error means that there is a hardware problem that cannot be solved with conventional Windows methods.

If you have a guarantee, go to the nearest store and have the storage device inspected. What's more, you can try to connect the device to other ports or change the data cable if it is a hard drive.

Subscribe to our Newsletter

We will not send you SPAM mail. We hate it as much as you.