SteveOH

Microsoft Windows Server 2008 – Disk is Read-Only / Write Protected

by on May.13, 2009, under Technology

I recently installed a new into my running .  Everything worked fine, until I rebooted.  I tried to copy a file to the disk and recieved an that the drive, in my case E:, was write protected.  I don’t know how or why that happened, but the is fairly simple.  The steps are as follows:

  1. Open a command prompt (ie. Start > Run > cmd) with administrative privledges
  2. Type in the command: diskpart
  3. Run the command: list disk
  4. Look for the disk number that’s having the .  In my case I have a 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.
  5. Select the disk using the following command: sel disk 2
  6. Enter the following command: ATTRIBUTES DISK CLEAR READONLY
  7. 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.

:, , , , , , , , , , ,

15 Comments for this entry

  • Klaus Heim

    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!!!

  • Mac

    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?

  • Zane

    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!

  • Vikas Kalra

    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

  • Joti

    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

  • Karsten

    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

  • Rawr

    Had fiber attached luns on a Netapp showing as read only all of a sudden. This worked perfectly, thank you!

  • PaulH

    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).

  • Erwin C

    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…

  • Tom

    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!

  • pieton40

    Thanks,

    solved my issue here… woot woot

  • John R

    Cheers. Had been using diskpart, but the clear readonly seemed to finish the job. Was about to replace the drive too.

  • modifaya

    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

    • Steve O Hernandez

      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.

Leave a Reply

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!