How to Fix Diskpart failed to clear disk attributes in Windows

Nov 15,2019 • Filed to: Answer Hard Drive Problems • Proven solutions

0

If you’re familiar with Diskpart and use it to manipulate your device’s drivers, you may encounter a problem saying that it faled to clear disk attributes. In this article, we will provide you with 5 solutions to fix this error.

Overview

Diskpart is a command disk partition tool built-in Windows. It’s commonly used to perform disk partitionings. Sometimes, when using this utility, you might come across the error: Diskpart failed to clear disk attributes. This usually happens if you attempt to modify storage media, such as changing a read-only device. This may due to your storage device being write-protected (usually in external hard drives and USB flashd drives). It may also be due to bad sectors present in your disk, or if your new storage media is in RAW format. This happens when file systems are corrupt or there are problems with the hardware. Another common cause is when you’re not running Diskpart as an administrator. This limits your access.

Solutions to Fix Diskpart failed to clear disk attributes

For whatever reason you may be encountering this error, there are sure solutions you can use. Here are 5 solutions to Fix Diskpart failed to clear disk attributes.

Solution 1 - Make sure physical switch on the storage device is ON

Although not very common, some external storage media like hard drives and USB flash drives have a physical switch.

Because this isn’t very common for most drives, most users overlook this. But it’s actually a handy feature. It serves as extra protection for accidental altering of any data contained within the device. Once the physical switch is set to on, Diskpart can’t make any changes to the disk.

If you’ve already switched on your drive or if it doesn’t have any physical swtich and you’re still unable to fix the error, proceed to the next solutions.

Solution 2 - Use Registry Editor and Change WriteProtected key

  1. Press Windows key + R on your keyboard to launch Run.
  2. Once Run is open, type in regedit in the space and press Enter to open Registry Editor.
  3. Go to the following path:
  4. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\StorageDevicePolicies

  5. This will show you a list. Find WriteProtect registry option which is found on the left-side menu and double click it.
  6. You will be ask to assign a value. Change it to 0 and select OK to apply the changes. Close Registry Editor.

Solution 3 - Use CHKDSK to scan for drive errors

  1. Press the Windows key + S to launch the Search tool. You can also look for it in the Start menu.
  2. In the Search tool, type in command prompt in the space. Look for Command Prompt and right-click on it to launch it. Choose Run as administrator.
  3. The Command Prompt window will pop up. Use the following command and press Enter (you may copy and paste this):
  4. CHKDSK [volume [[path] filename]] [/F] [/V] [/R] [/X] [/C] [: size]]

    *[/F] command fixes system errors, [/R] command fixes bad sectors

  5. You will be asked if you want to restart your device. Type in Y to reboot it.

Solution 4 - Clear attributes on RAW

  1. Press the Windows key + S to launch the Search tool. You can also look for it in the Start menu.
  2. Type in diskpart in the Search bar to launch it. A User Account prompt will pop up, select Yes to continue.
  3. The Command Prompt window will open. Type the following commands, pressing Enter after every command.
  4. list volume

    select volume ‘n’

    format fs=fat32 quick

    *NOTE: ‘n’ stands for the drive’s volume number, change it to whatever your drive’s volume number is.

  5. After typing in all the commands, unplug the removable storage device and plug it again.
  6. Check if the error still persists.

Solution 5 - Check the hardware components

  1. If your computer is off, turn it on. It’s currently running, restart your device.
  2. The Basic Input Output System (BIOS) screen should appear. If it doesn’t, restart your PC again. In ths BIOS screen, repeatedly press the F8 key. This will open the Advanced Option feature.
  3. You can use your keyboards to select an option using the arrows keys. Choose Safe Mode with Networking and press Enter on your keyboard.
  4. Safe Mode with Networking will now launch in your PC.
  5. Press Windows key + R  on your keyboard and hold. This will launch the Run tool.
  6. Go to this URL by copy-pasting it on the space and pressing Enter: https://errortools.com/download/advanced-system-repair/
  7. This will bring you to the website where you can download Advanced System Repair program. Wait until the installer finishes downloading to your PC. Install the software.
  8. After the program finished installing, launch ASR to scan your system.
  9. Once the full scan is finished, select the Fix, Clean & Optimize option.

Diskpart is a powerful built-in tool created Windows so you can manage your disks and partitions on your own. But sometimes, you might encounter some errors while running this utility. With any of these solutions, you’ll surely find a fix to your Diskpart issues.

0 Comment(s)
Home | Resources | Answer Hard Drive Problems | How to Fix Diskpart failed to clear disk attributes in Windows