Microsoft KB Archive/840781

= New Diskpart.exe commands to reset volume attribute flags on failed snapshot volumes in Windows Server 2003 =

Article ID: 840781

Article Last Modified on 7/24/2007

-

APPLIES TO


 * Microsoft Windows Server 2003, Standard Edition (32-bit x86)
 * Microsoft Windows Server 2003, Enterprise Edition (32-bit x86)
 * Microsoft Windows Server 2003, Enterprise Edition for Itanium-based Systems

-





SYMPTOMS
When you use a hardware snapshot provider to take volume snapshots, a snapshot failure may leave volumes with the read-only and hidden attribute bits set. This configuration may leave volumes in an unusable state, even after you restart the computer. As a result, you may experience one of the following symptoms:  When you try to write to the affected volumes, you receive the following error message:

Media is write protected

 When you attempt to create a new volume mount point for the affected volume in disk management or in the Diskpart.exe utility, you receive one of the following error messages:

The path cannot be used for creating a drive path likely because the folder does not exist or is already a drive path to some other volume.

The path can not be used for creating a drive path. Probable reasons are that the directory is not present or the directory is already a drive path to some other volume.

DiskPart could not assign the drive letter or mount point. Make sure the drive letter or mount point is valid.

 A cluster disk resource will not come online and an error 258 will appear in the cluster log file.



CAUSE
A hardware problem or an OEM third-party filter driver can interfere with the volume shadow snapshot process. In this case, the read-only, hidden, and Nodefaultdriveletter volume attribute bits may remain set on the original volume that you were taking a snapshot of.



RESOLUTION
This hotfix will not prevent future snapshot failures or automatically repair volumes that have had the read-only or hidden attributes set. This hotfix contains only a new version of the Diskpart.exe utility. This utility includes a new ATTRIBUTES command that lets you set or reset volume flags that are associated with shadow copy snapshots. The new ATTRIBUTES command will let you reset the flags on the affected volumes so they can be mounted and made available again.

Important If the affected disks are part of a cluster resource, in order to gain access to the physical disks to reset the flags you must shutdown all nodes except one cluster node. On the remaining node, disable the clusdisk.sys driver and restart the node. This will give you access to all the physical disks in the operating system without starting the cluster and this will let you use diskpart.exe to reset the volume flags.

Hotfix information
A supported hotfix is now available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing this specific problem. This hotfix might receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next service pack that contains this hotfix.

To resolve this problem, submit a request to Microsoft Online Customer Services to obtain the hotfix. To submit an online request to obtain the hotfix, visit the following Microsoft Web site:

http://go.microsoft.com/?linkid=6294451

Note If additional issues occur or any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. To create a separate service request, visit the following Microsoft Web site:

http://support.microsoft.com/contactus/?ws=support

Prerequisites
No prerequisites are required.

Restart requirement
You do not have to restart your computer after you apply this hotfix.

Hotfix replacement information
This hotfix does not replace any other hotfixes.

File information
The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.   Date         Time   Version          Size  File name ---  20-Apr-2004  06:20  5.2.3790.163  167,424  Diskpart.exe 19-Apr-2004 22:15  5.2.3790.163   46,592  Ws03res.dll



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the &quot;Applies to&quot; section.



WORKAROUND
There is no workaround to reset the volume attribute bits if they are not reset after you restart the computer.



Syntax for the ATTRIBUTES command that is included in the Diskpart.exe utility
Note For master boot record (MBR) basic disks, the attribute bits are applied or changed disk-wide and affect all volumes on the disk. For GUID partition table (GPT) basic disks, the attribute bits are applied or changed per volume. For dynamic GPT or MBR disks, the attribute bits are applied or changed per volume. The Logical Disk Manager (LDM) service checks the volume that is selected in the Diskpart.exe utility to see if the volume is a boot, system, page, crash dump, or hibernate volume. The LDM service does not set the attribute bits if the selected volume is one of those types, and the Diskpart.exe utility displays an error message.

The command syntax for the ATTRIBUTES command is as follows: <pre class="fixed_text">ATTRIBUTES VOLUME [SET|CLEAR] [HIDDEN READONLY NODEFAULTDRIVELETTER] [NOERR]

Sample commands
You can use set and clear in one command. The attributes volume command can be abbreviated as the att vol command as follows:

<pre class="fixed_text">Diskpart> attributes volume set readonly clear hidden Diskpart> att vol set hidden Diskpart> att vol clear readonly Diskpart> att vol set readonly clear hidden

The possible return messages after each command finishes are:

<pre class="fixed_text">Diskpart failed to set volume attributes. Volume attributes set successfully.

Diskpart failed to clear volume attributes. Volume attributes cleared successfully.

After you select the volume and then use the Detail Volume command, you see the following volume attributes:

<pre class="fixed_text">Readonly: Yes Hidden: No No Default Drive Letter: Yes

<div class="references_section">