Microsoft Windows Server 2008 – Disk is Read-Only / Write Protected
by Steve O Hernandez on May.13, 2009, under Technology
I recently installed a new hard drive into my server running Server 2008. Everything worked fine, until I rebooted. I tried to copy a file to the disk and recieved an error that the drive, in my case E:, was write protected. I don’t know how or why that happened, but the solution is fairly simple. The steps are as follows:
- Open a command prompt (ie. Start > Run > cmd) with administrative privledges
- Type in the command: diskpart
- Run the command: list disk
- Look for the disk number that’s having the problem. In my case I have a system drive, a RAID 5 configuration (1 logical drive) and then the new drive, so it was DISK 2. I will continue to use it in the example but note that yours may differ.
- Select the disk using the following command: sel disk 2
- Enter the following command: ATTRIBUTES DISK CLEAR READONLY
- Exit diskpart with the command: exit
Then test by copying a file or folder to the drive. It should be fairly instantaneous, but worst case you may have to reboot (I did not, however).
That’s about it. It would be interesting to know WHY this happened, but then again, does it really matter?
Good luck.
July 22nd, 2009 on 5:09 AM
Thanks so much for this! I recently ran into the same issue. I formatted and installed fresh, added some existing RAID1 arrays, and they were all giving the same message. This is the only thing I have found on the entire internet – and it works. Thanks!!!
October 10th, 2009 on 12:30 AM
Same problem here… except mine repeatedly becomes read-only. I have windows 2008, Windows Vista and Windows 7 drives. The system drives for each work fine, it’s my data drive that keeps becoming read only and unable to reset the attribute, actually the attribute clears, but in diskpart attrib disk command it says read-only : no but also lists the Current Read-only State : Yes
Over and over and over ….
any clues?
June 16th, 2011 on 6:48 PM
my drives are having this happen over and over. 2008 r2
any suggestions?
thanks so much.
October 29th, 2009 on 10:02 AM
Have had this happen a number of times, and have come across this solution before. I could vaguely recall the procedure, but couldn’t for the life of me remember the commands off the top of my head.
After searching Micro$oft’s technet pages, and finding nothing relevant (surprise surprise), I finally resorted to a g00gle search, and came upon this page.
Thankyou kindly for providing some very useful information!
November 11th, 2010 on 5:17 PM
Microsoft added few new plicies for SAN disk in windows 2008 server. Please go through the below MS link, might be helpfull for you.
http://support.microsoft.com/kb/971436
January 11th, 2011 on 3:34 PM
Steve, many thanks just received a Proliant server with 2tb hard drives. Windows server 2008 R2 reported the drives as read only – disk management did not seem to display an option to change the attributes. Was about to resort to install partitioning software. Thanks to your concise instructions don’t need to – saved me time & money!! Regards JK
March 31st, 2011 on 2:13 PM
We had almost the same problem. After a NetApp snapshot for a VMware disk volume, we cut not write to the disk. It was not the disk that was in read-only but the volume. After reading this page, we found a solution:
list volume
sel vol 0 (my problem was on volume 0)
detail volume (just to see the status)
ATTRIBUTES VOL CLEAR READONLY
detail volume (just to see the status, again)
Problem solved. Thank you
Regards Karsten
May 23rd, 2011 on 10:43 PM
Had fiber attached luns on a Netapp showing as read only all of a sudden. This worked perfectly, thank you!
September 6th, 2011 on 3:06 PM
Had this problem and in Disk management I right clicked the grey bit to the left of the volume (where it says “Disk 1″) and selected “Offline”. Then after it did that, I right clicked in again and selected “Online”. Problem solved (this is just a GUI way to resolve the issue in addition to the excellnt commands shown by others).
October 26th, 2011 on 1:27 PM
Thx for the take off-line / on-line.
Its the only thing that works for me (except for unplugging and reconnecting fysicaly or rebooting a few times).
For both volume and disk the read only att is not set and still it is readonly.
In my case it is a external SATA disk connected to my W2K8 server with aa eSata connector.
It is used for backup-2-disk and almost every time I reboot it gets readonly…
November 23rd, 2011 on 8:44 PM
ATTRIBUTES DISK CLEAR READONLY is not helping in my case.
Disk 1 is now the selected disk.
DISKPART> detail disk
Disk ID: {87D6C17B-0265-4352-8D97-0C5849147120}
Type : RAID
Status : Online
Path : 0
Target : 5
LUN ID : 0
Location Path : PCIROOT(0)#PCI(0600)#PCI(0000)#RAID(P00T05L00)
Current Read-only State : No
Read-only : No
Boot Disk : No
Pagefile Disk : No
Hibernation File Disk : No
Crashdump Disk : No
Clustered Disk : No
There are no volumes.
Every time I tried to create a Volume it says “Media is write protected” on Windows 2008 R2.
In my case Read-only : No however I can’t write to it. It is really strange!
January 24th, 2012 on 8:55 PM
Thanks,
solved my issue here… woot woot
February 12th, 2012 on 9:58 PM
Cheers. Had been using diskpart, but the clear readonly seemed to finish the job. Was about to replace the drive too.
March 27th, 2012 on 7:53 PM
Thanks alot for the help..worked like a charm but was wondering if you could help me further..my device says it has an i/o error..i cant copy files to my WD external hard disk..Is there any way you could help me out..? thank you in advance
May 1st, 2012 on 11:50 PM
If you’re receiving an I/O ERROR there’s something wrong with the hardware. Either the hard drive itself is going bad, the controller on the external case, or the cable. I would check all the connections and make sure everything is in there tight. You should also run a check disk (open the command prompt and run chkdsk /r DRIVE_LETTER) where DRIVE_LETTER is the letter the OS assigned to it, to see if there’s any surface damage on the disk.
If you’ve checked everything and continue to get those errors, your disk is going to die soon. Backup your files somewhere else and try to get it replaced if its under warranty. Hope that helps.