|
  
|
How to use dos command under Windows2008 Management disk
Windows Server 2008, a characteristic lies in the fact that many aspects of operating system features are accessible via command-line approach to management. If we bring in a GUI interface on the computer is necessary to define a RAID array, is usually relatively easy to achieve, in the disk management console program weight a few mouse clicks to complete the installation and operation.
If you need to machine to carry out many of the same RAID operation, using a script the way that efficiency would be higher. Similarly, if we are conducting the Server Core installation, there is no other choice but from a command prompt to manage their own disk subsystem. This article will introduce how to use command-line way of implementation of the above-mentioned functions.
1, Diskpart command
Windows Server 2008 contains a Diskpart.exe command line utility used to manage server disk subsystem. To use this command, simply open a command prompt window and enter the DiskPart.exe command, Windows will enter Diskpart Shell interface. Diskpart Shell in the interface, you can use a variety of commands to manage the disk subsystem.
2, Diskpart command of grammar
Diskpart command format, in accordance with the verbs - grammar terms. Verbs tell Windows to perform any action, the term tell Windows to perform the target action.
Here is a simple example: "List Disk" command. List which is a verb, Disk is a noun. When you enter this command, the operating system will be installed on the server list shows all the physical disk.
List Disk command displays installed on the server all of the disk. However, the existence of Diskpart like Bug: on the map values, Diskpart showed back Disk 0 on the free space is 0 bytes. But in fact, the disk has 42 GB of free space.
Note that the above values, each disk is assigned a disk number. When we needed for a particular disk to perform a specific operation, you can enter the "select" command to the specified disk. Disk 0 for instance want to operate, enter the "select Disk 0" to select the Disk 0. In many cases, the disk management will involve the creation of fault-tolerant volume, use Diskpart can easily do this. For example, there is a operating system has four hard drives installed, hard numbers are 0,1,2,3. Disk 0 is assumed that the system drive, Disk 1,2, 3 are blank hard drive, we want to convert into a RAID 5 disk volume format.
In the creation of RAID 5 disk volume, we must ensure that each disk as a dynamic disk. List Disk command prompt can disk it is dynamic, this point we can turn around and look at Figure 1. Assuming that no dynamic disk, you can enter the "Convert Dynamic" command to convert, as follows:
Select Disk 1
Convert Dynamic
Select Disk 2
Convert Dynamic
Select Disk 3
Convert Dynamic
Disk have been converted to dynamic disk, and now can use the "Create Volume" command to create a RAID 5 disk volume, as follows:
Select Disk 1
Create Volume RAID Disk 1, 2, 3
If you enter "List Volume" command, Diskpart will confirm whether or not already created a RAID volume. "List Volume" command after the implementation of the interface |
|