Brings online disks and volumes that are currently offline.
Important | |
The disk and volume parameters of the online command are not available in any edition of Windows Vista. |
Important | |
This command will fail if it is used on a read-only disk or volume. |
For examples of how this command can be used, see Examples.
Syntax
online {disk|volume} [noerr]
Parameters
Parameter | Description |
---|---|
disk |
Brings online the disk with focus. This parameter makes the online command operate on a single disk. |
volume |
Brings online the volume with focus. This parameter makes the online command operate on a single volume. |
noerr |
For scripting only. When an error is encountered, DiskPart continues to process commands as if the error did not occur. Without this parameter, an error causes DiskPart to exit with an error code. |
Remarks
- When used without parameters in Windows Vista, this
command operates on a disk pack. For basic disks, there is never
more than one disk per pack. For dynamic disks, the pack includes
all non-foreign dynamic disks.
- For basic disks, the online disk command will attempt to
bring online the selected disk and all volumes on that disk.
- For dynamic disks, the online disk command will attempt
to bring online all disks that are not marked as foreign on the
local machine. It will also attempt to bring online all volumes on
the set of dynamic disks.
- If a dynamic disk in a disk pack is brought online and it is
the only disk in the pack, then the original pack is recreated and
the disk is moved to that pack. If there are other disks in the
pack and they are online, then the disk is simply added back into
the pack.
- The online volume command operates on volumes that have
failed, are failing, or are in failed redundancy state.
- The online disk command operates on disks that are in
SAN offline mode. It changes their SAN mode to online.
- If the pack of a selected disk contains mirrored or RAID-5
volumes, the online disk command also resynchronizes these
volumes.
- A disk must be selected for the online disk command to
succeed. Use the select disk command to select a disk and
shift the focus to it.
- A volume must be selected for the online volume command
to succeed. Use the select volume command to select a volume
and shift the focus to it.
Examples
To bring the disk with focus online, type:
online disk
To bring the volume with focus online, type:
online volume