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
DISKPART> clean
Um thanks. This has got to be a joke right? Foolish me typed “clean” as instructed and am now trying to fix this sabotage (thanks felipe!) as per:
http://www.sevenforums.com/backup-restore/214367-how-recover-partitions-lost-due-usage-clean-command-win7.html