Use Diskpart command to manage win2008 system disk

  

windows2008 system is generally used as a server. Compared with other windows operating systems, it has a remarkable feature that you can use the command line to manage the system, if the user On a computer with a GUI interface, you need to define a RAID array. You can complete the installation operation with a few clicks of the mouse in the Disk Management Console program. However, if you perform the same RAID operation on multiple machines, it is time to manage the disk space through the Diskpart command.

Using the Diskpart command to manage the win2008 system disk:

1. Diskpart command

Windows Server 2008 includes a command line utility called Diskpart.exe for The disk subsystem of the management server. To use this command, simply open a command prompt window and enter the DISKPART.EXE command, Windows will enter the Diskpart Shell interface. In the Diskpart Shell interface, various commands can be used to manage the disk subsystem.

2, the syntax of the Diskpart command

Diskpart command format, according to the verb-noun syntax. The verb tells Windows what action to perform, and the noun tells Windows which object to perform the action on.

For a simple example: “List Disk” command. Where List is a verb and Disk is a noun. When you enter this command, the operating system displays all the physical disks listed on the server.

The List Disk command displays all the disks installed on the server. But Diskpart seems to have a bug: Diskpart returns a result showing that the free space on Disk 0 is 0 bytes. But in fact, the disk has 42 GB of free space.

Note the above values, each disk is assigned a disk number. When we need to perform a specific operation on a particular disk, we can enter the “select” command to specify the disk. For example, if you want to operate on Disk 0, enter “select Disk 0” to select Disk 0.

In many cases, disk management involves creating fault-tolerant volumes, which can be easily done using Diskpart. For example, there is an operating system with four hard drives installed, and the hard disk numbers are 0, 1, 2, and 3, respectively. Suppose Disk 0 is the system drive and Disk 1, 2, 3 are blank hard drives. We want to convert to a RAID 5 format disk volume.

Before creating a RAID 5 disk volume, we must ensure that each disk acts as a dynamic disk. The List Disk command can prompt if the disk is dynamic. Assuming there is 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

Disks have been converted to dynamic disks. Now you can create RAID 5 disks using the &Createquo;Create Volume” command. Volume is as follows:

Select Disk 1

Create Volume RAID Disk 1, 2, 3

If you enter the “List Volume” command, Diskpart will confirm whether A RAID volume has been created. “List Volume” After the command is executed, please note that each volume is assigned a volume number.

The last operation is to format the newly created volume and specify a drive letter. Assuming the empty RAID volume is Volume 2, we now need to mount the G: disk to volume 2. To do this, we can enter the following command:

Select volume 2

Format FS=NTFS Label=MyNewVolume

Assign Letter=F

After the above command is executed, you can use the List Volume command to confirm whether the operation is successful.

Enter the exit command to leave the Diskpart Shell interface and return to the command line interface.

The Diskpart command has powerful functions. The above content only introduces the Diskpart command to manage the windows of the Windows2008 system. There are also many magical effects. Users can enter Diskpart.exe at the command prompt and open the Diskpart Shell. , can enter “? ” The system will list additional help for the Diskpart command.

Copyright © Windows knowledge All Rights Reserved