Removing read only flag from Windows Diskpart Partition tool

I was trying to investigate a failed disk from a RAID array using a USB hard drive dock and Windows 7. The problem was Windows was reporting that the disk was read-only, so it wouldn’t repartition the hard disk.

I opened up diskpart tool in windows (Run As Administrator) and tried to run the clean command, but again it complained that the hard drive was in read-only mode.

Finally, I found the way to remove the read-only flag, so I could wipe the drive, and scan it for bad sectors.


DISKPART> list disk
DISKPART> select disk 2
DISKPART> list part
DISKPART> select part 2
DISKPART> attrib part clear readonly

3 thoughts on “Removing read only flag from Windows Diskpart Partition tool”

  1. Hello Felipe, please fix sequence of commands so anyone can follow and detonate the system table. Below is the correct sequence:
    >diskpart
    >list volume
    >select volume n (where n = the problem volume)
    >attributes disk clear readonly
    >attributes volume clear readonly

    If anyone has followed the steps and lost table system can be bypassed using program MiniTool Partition Recovery

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>