Microsoft Enterprise Platforms Support: Windows Server Core Team
EPS Team Blogs
Product Team Blogs
Recently I helped someone on an issue where the customer had a disk that was part of a Windows 2008 R2 Service Pack 1 Cluster. They could bring the disk online, but they couldn’t write to it. During the course of troubleshooting, they ran Diskpart and looked at the attributes of the disk. They found that the “Current Read-only State” attribute was set to Yes, but the “Read-only” attribute was set to No. This seemed strange at first that they would not BOTH be set to Yes or both set to No. They tried clearing the read-only attribute, but it would not set the “Current Read-only State” attribute to No even though the command did not return an error.
We found that the disk was set to read-only on the SAN and this was causing the problem. When you see the “Current Read-only State” set to Yes, this is the true read-only status of the disk. The “Read-only” setting just indicates if we as an OS have the disk set to read-only.
The following steps will show you how to use Diskpart to look at these settings and also how to clear them.
1. Open a command prompt, type in Diskpart and then press Enter.
2. Run the command “List Disk” and press Enter.
3. Decide which disk you want to look at and then run the command “Select Disk n” where n stands for the number you see from the previous command. In this case, I am going to look at disk 1.
4. To see the attributes of Disk 1 now that it is selected, run the command “attributes disk”.
As you can see, I had already set the disk to Read-only, so both the “Current Read-only State” and “Read-only” attributes are set to Yes.
5. To clear the “Read-only” attribute, run the command “attributes disk clear readonly”.
As you can see, now the “Current Read-only State” and “Read-only” attributes are set to No and the disk is now writeable. To exit Diskpart, just type the word “exit” and then press enter.
Hopefully this will help you understand these attributes and help you diagnose a read-only problem with your disk. Have a great day!
James Burrage Senior Support Escalation Engineer Microsoft Enterprise Platforms Support
I tried the above steps,. but no luck for me!! I have a USB stick ( which contains a Os) I want to format it, but I am getting a error " Disk Read Protected" So I can't change the Current Read-only as "NO".. Any suggestion?? please... :(
i no this is really late and everything but i need your help i can set the read-only state to yes and no however the current read only state is stuck on yes.. how can i change this :(
after attributes disk clear readonly, my curretc read-only state still stuck at YES!!! help pls><
the flash is unable to format, please help me out.
This post is pointless since it doesn't come with a solution to the problem.
I'm sorry I didn't realize that this reply was here. USB sticks tend to be a little different with their partition and formatting them. If I were in your shoes, I would use diskpart and follow these steps: WARNING: This will delete all data and partitions from your USB stick.
1. List Disk
2. Find the disk in the list and see which number is assigned to it. For this example, let's say it's disk 2.
3. Select Disk 2
5. Create Partition Primary
7. Format quick fs=ntfs
If you have a disk that is showing a Current Read-only State of Yes, but Read-Only is set to No, this means that at the hardware level the disk is read-only and we can't fix that through Diskpart.
my "current" status is set to yes, despite I changed the "read only" state to no... what shall I do??
I also had this problem and noted this post did not fix the issue. I was able to resolve this issue on my computer by modifying the following registry key from 1 to 0:
Switch from a 1 to 0.
To do this open regedit from the start menu.
I used this utility to do the exact thing and I can't get the "Current read Only" state to turn to No. Any switches or other advice?
What is the SAN? I am having this exact problem. The current readonly state is yes but readonly is set to no. Thanks
It still didn`t worked. the current read-only state is still yes!
I am having the same issue, but I was able to change the current read-only state to no after repeated attempts doing the attributes disk clear readonly. I am still not able to format this USB, it is a 8g Staples Relay. I am getting this: Diskpart has encountered an error: the semaphore timeout period has expired. The system Event log shows: The IO operation at logical block address 0 for Disk 2 was retried.
i cant really find the attributes disk clear randomly
My disk is working now. Thanks to James!