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



The information in this article applies to:

  • Microsoft Windows Server 2003, Standard Edition
  • Microsoft Windows Server 2003, Enterprise Edition
  • 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, but it is only intended to correct the problem that is described in this article. Only apply it to systems that are experiencing this specific problem. This hotfix may receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next Microsoft Windows Server 2003 service pack that contains this hotfix.

To resolve this problem immediately, contact Microsoft Product Support Services to obtain the hotfix. For a complete list of Microsoft Product Support Services telephone numbers and information about support costs, visit the following Microsoft Web site:Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

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 "Applies to" section.

WORKAROUND

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

MORE INFORMATION

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

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:

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:

Readonly: Yes
Hidden: No
No Default Drive Letter: Yes

REFERENCES

For more information about error 258 in the cluster log file, click the following article number to view the article in the Microsoft Knowledge Base:

886702 You receive an error 258 in the cluster log file on a Windows Server 2003-based server cluster

For more information about the terms that are used in this article, click the following article number to view the article in the Microsoft Knowledge Base:

824684 Description of the standard terminology that is used to describe Microsoft software updates


Modification Type:MinorLast Reviewed:9/7/2006
Keywords:kbBug kbfix kbWinServ2003preSP1fix kbHotfixServer kbQFE KB840781