Author Topic: extend disk ผ่าน diskpart ใน window 2008 r2 server  (Read 3839 times)

golfreeze

  • Administrator
  • Hero Member
  • *****
  • Posts: 2140
    • View Profile
    • นั่งสมาธิ สติปัฏฐานสี่ พาเที่ยววัด แนะนำวัด แจกcd ธรรมะฟรี
    • Email
extend disk ผ่าน diskpart ใน window 2008 r2 server
« on: สิงหาคม 21, 2017, 05:05:40 PM »
extend disk ผ่าน diskpart ใน window 2008 r2 server
ในกรณีเรามี แอดพื้นที่เพิ่มเติม 20GB ลงไปที่ disk ลูกเดิม (30GB-Disk 0๗ จะสามารถทำการขยาย disk ได้ครับ

DISKPART> list disk
  Disk ###  Status      Size     Free     Dyn  Gpt
  --------  ----------  -------  -------  ---  ---
  Disk 0    Online        30 GB      20 B

Extending a Partition from the Command Line

As with shrinking partitions, Windows Server 2008 R2 allows disk volumes and partitions to be extended from the command-line using the diskpart tool. Invoke this tool by typing diskpart at a command prompt or in a Run dialog box. The tool will start and display a DISKPART> prompt.
The first step is to identify the disks on the system. This information is obtained using the list disk command:
DISKPART> list disk
  Disk ###  Status      Size     Free     Dyn  Gpt
  --------  ----------  -------  -------  ---  ---
  Disk 0    Online        30 GB      0 B
  Disk 1    Online        10 GB      0 B
For the purposes of this tutorial we will once again be working on a partition on disk 1. To select the required disk use the select disk command:
DISKPART> select disk 1
Disk 1 is now the selected disk.

Having selected the disk the next step is to select the partition which is to be extended. To obtain a list of partitions on the selected disk the list partition command is used:
DISKPART> list partition
  Partition ###  Type              Size     Offset
  -------------  ----------------  -------  -------
  Partition 1    Primary           1000 MB  1024 KB
  Partition 2    Primary           1000 MB  1001 MB
  Partition 3    Primary            551 MB  2001 MB
  Partition 0    Extended          7238 MB  3001 MB
  Partition 4    Logical           1000 MB  3002 MB
  Partition 5    Logical           6236 MB  4003 MB

For this example we are going to extend partition 3 so need to select this partition using select partition:
DISKPART> select partition 3
Partition 3 is now the selected partition.

With the appropriate disk and partition selected the next task is to decide on the amount by which the partition can be extended. The extend command be used in a number of different ways. For example, a partition may be extended by a specified number of MB by using the size= option. For example, to increase the size of a partition by 3GB:
DISKPART> extend size=3000
There is not enough usable free space on specified disk(s) to extend the
volume.

Clearly, in this case, the disk does not have sufficient free space to fulfill our extension request. An alternative approach is to let diskpart allocate all the available space to the selected partition. This avoids the need to know how space is actually available:
DISKPART> extend
DiskPart successfully extended the volume.

ถ้าเราอยากจะ extend พื้นที่ทั้งหมดที่เพิ่มเข้ามาใหม่ให้กับ disk ลูกเดิมก็สั่ง extend ได้เลยครับ
มันจะเอาพื้นที่ว่างทั้งหมด มาเพิ่มให้ครับ

http://www.techotopia.com/index.php/Extending_and_Shrinking_Windows_Server_2008_R2_Partitions_and_Volumes#Extending_a_Partition_from_the_Command_Line