Professional Documents
Culture Documents
Technical Note
P/N 300-004-075 A01 August, 2006
This technical note describes how to align partitions on GUID Partition Table (GPT) disks for a Microsoft Windows 2003 platform. The following topics are covered: Introduction ................................................................................................ 2 Windows 2003 GPT disk layout............................................................... 3 How partitions are created on a GPT disk ............................................. 6 Creating an aligned GPT partition by using diskpart........................... 7 Creating a second aligned GPT partition by using diskpart................ 9 Aligning GPT dynamic volumes ........................................................... 11
Introduction
Introduction
Microsoft Windows 2003 introduced a new type of disk layout called GUID Partition Table (GPT) disks. This layout is designed to overcome some problems and deficiencies associated with the traditional master boot record (MBR) style disks. The advantages of GPT disks include: Partition size that can be up to 18 exabytes. A GPT disk can contain up to 128 partitions. Integrity of primary and backup partition tables that allows redundancy. Partition format that is well defined, fully self-identifying and accommodates future expansion with version number and size fields. Unique ID for each partition that prevents partition identifier collision. Initially, only the IA64 (Itanium) version of Windows 2003 supported GPT disks. An IA64 system cannot boot unless the boot disk is a GPT disk. With Service Pack 1, support was added to 32-bit versions of Windows 2003, but a GPT disk is still not supported as the boot disk.
Note: The next version of Windows (currently called Longhorn or Vista) is planned to have boot-from-GPT support for 32-bit processors.
This technical note applies only to Windows 2003 platforms. The United Extended Firmware Interface (UEFI) standard is a platform-neutral standard and any vendor can enforce restrictions that they see fit. For example, Windows GPT disks will always require a Microsoft Reserved (MSR) partition, but GPT disks created with Linux may not require it. GPT disks can have aligned partitions, but only if diskpart is used to create the partitions. Like MBR style disks, GPT disks can be either basic or dynamic. One of the important characteristics of GPT disks is that all the system areas are protected by CRC checksums, so it is virtually impossible to manipulate disks without the vendor-supplied tools. Currently for Windows, this means that only the following tools can be used: diskpart.exe diskmgmt.msc (the console GUI) diskpart.efi (the standalone version of diskpart that can be booted from an EFI partition)
Aligning GPT Basic and Dynamic Disks For Microsoft Windows 2003 Technical Note
Aligning GPT Basic and Dynamic Disks For Microsoft Windows 2003 Technical Note
The signature is (0x01FDDB4F8). The single partition is defined as type 0xEE. The offset is always 0x00000001. The length is always 0xFFFFFFFF.
00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
Note: The Microsoft 'secinspect' program has been used throughout this guide to display the contents of disk content.
Location of primary GUID partition table header (0x0000000000000001). Location of backup GUID partition table header (0x000000001FFFFFF). This is the address of the last block on the disk. First block available for allocating partitions is 34 (0x0000000000000022). The value (34) is determined by the fact that GPT disks can have 128 partitions, and each disk block can hold 4 partition definitions. The addition of the protective MBR and partition table header provides a total of 34. Maximum number of partitions for this disk is 128 (0x00000080).
00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
In this example, the only defined partition is a system partition (Microsoft reserved partition). It starts as block address 0x0000000000000022 and ends at 0x0000000000010021. In this particular case, the first user partition, by default, will start at block address 0x0000000000010022.
At this stage, the Microsoft reserved partition contains no data. If a partition is created at this stage by using diskpart (or the GUI), and by also using default options, the user partition would be created at offset 0x0000000000010022. This address is not aligned since the address is not divisible by 128. The only way to create a partition that is aligned is by using diskpart with the align option. The GUI offers no option for alignment.
All partitions are created in multiples of 1 MB (2048 Blocks). Since the first partition starts at LBA 34, all partitions start 34 blocks after a logical block address, which is a multiple of 2048. This means that all partitions created will be misaligned by 34 blocks. When partitions are aligned by using diskpart, we set the starting position of each partition to be a multiple of 128 blocks. Windows 2003 however, will always end the partition on a boundary as shown in preceding figure.
Aligning GPT Basic and Dynamic Disks For Microsoft Windows 2003 Technical Note
Four aligned partitions were created with diskpart. Windows has ended these partitions at the same addresses as shown in the preceding misaligned example. This means that there is a gap between each of the partitions.
Aligning GPT Basic and Dynamic Disks For Microsoft Windows 2003 Technical Note
The alignment is not an absolute address (as in diskpar), but is an alignment value to be applied to the next free block on the disk. The alignment is expressed in 1 KB increments instead of blocks. diskpar uses a block count and is the actual address of the partition to create. diskpart creates a partition at the next available block that is a multiple of 64 KB (128 Blocks). After formatting, the partition table entry appears as follows.
LBN 2 0x0000 0x0010 0x0020 0x0030 0x0040 0x0050 0x0060 0x0070 0x0080 0x0090 0x00a0 0x00b0 0x00c0 0x00d0 0x00e0 ****** 0x01ff 16 9c 22 00 6f 73 61 00 a2 e4 80 00 63 61 00 e3 0c 00 00 00 00 00 00 a0 fd 00 00 00 00 00 c9 37 00 00 73 65 72 00 d0 e7 01 00 20 72 00 e3 8a 00 00 00 00 00 00 eb d2 00 00 00 00 00 5c 5c 00 00 6f 72 74 00 e5 8a 00 00 64 74 00 0b ec 00 00 00 00 00 00 b9 f6 00 00 00 00 00 b8 d7 00 00 66 76 69 00 33 14 00 00 61 69 00 4d-81 4d-bc 00-21 00-4d 00-74 00-65 00-74 00-00 44-87 44-88 00-21 00-42 00-74 00-74 00-00 7d 50 00 00 00 00 00 00 c0 80 00 00 00 00 00 f9 ce 01 69 20 64 69 00 68 42 21 61 61 69 00 2d ac 00 00 00 00 00 00 b6 4e 00 00 00 00 00 f0 a0 00 63 72 20 6f 00 b7 e0 00 73 20 6f 00 02 62 00 00 00 00 00 00 26 e7 00 00 00 00 00 15 35 00 72 65 70 6e 00 99 8d 00 69 70 6e 00 ae fd 00 00 00 00 00 00 c7 86 00 00 00 00 00 \.M}--. .7\MPb5 ".......!....... ........M.i.c.r. o.s.o.f.t. .r.e. s.e.r.v.e.d. .p. a.r.t.i.t.i.o.n. ................ 3Dh& DBN .......! ...... ........B.a.s.i. c. .d.a.t.a. .p. a.r.t.i.t.i.o.n. ................ ................
00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
You can see the address of the first four GUID partition table entries. The new partition definition starts at offset 0x0080 in this block. The offset to the user partition is 0x0000000000010080 (65664.), which is a multiple of 128 and therefore aligned for performance purposes. The length of the partition is 0x0000000000210021 minus 0x0000000000010080 plus 1. This value is 0x1FFFA2. This length is not quite the requested size. It is 0x5e (94) blocks short of the full 2 GB partition. What diskpart has done is round down the request to fit the rules for ending addresses on the boundary as shown in the preceding figure. By default, the next partition will be created at 0x0000000000210022. The value 0x0000000000210022 (2,162,722) divided by 1024 leaves a remainder of 34.
Aligning GPT Basic and Dynamic Disks For Microsoft Windows 2003 Technical Note
Aligning GPT Basic and Dynamic Disks For Microsoft Windows 2003 Technical Note
00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
The second partition actually starts at 0x000000000210080 which is aligned to 128. The first partition ended at 0x0000000000210021 and there is a gap between the two partitions.
Summary
You can use diskpart to align partitions on a Windows 2003 basic GPT disk as follows: 1. 2. 3. Ensure the disk is empty. Delete all volumes and partitions. Convert the MBR disk to a GPT disk. Using diskpart, create the appropriate partition size that is aligned at one of the following: 64 (128 blocks) if an EMC Symmetrix volume 64 (128 blocks) if an EMC CLARiiON LUN with default element size (optional) Create subsequent volumes that are aligned with diskpart by using the align option.
4.
10
Aligning GPT Basic and Dynamic Disks For Microsoft Windows 2003 Technical Note
Note: You cannot use the disk management GUI or diskpar to align partitions.
Summary
You cannot use diskpart to align partitions on a Windows 2003 dynamic GPT disk because the align option is not available. Any existing partitions will retain their alignment when the disk is converted.
Aligning GPT Basic and Dynamic Disks For Microsoft Windows 2003 Technical Note
11
Copyright 2006 EMC Corporation. All Rights Reserved. EMC believes the information in this publication is accurate as of its publication date. The information is subject to change without notice. THE INFORMATION IN THIS PUBLICATION IS PROVIDED "AS IS." EMC CORPORATION MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WITH RESPECT TO THE INFORMATION IN THIS PUBLICATION, AND SPECIFICALLY DISCLAIMS IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Use, copying, and distribution of any EMC software described in this publication requires an applicable software license. For the most up-to-date listing of EMC product names, see EMC Corporation Trademarks on EMC.com. All other trademarks used herein are the property of their respective owners.
12
Aligning GPT Basic and Dynamic Disks For Microsoft Windows 2003 Technical Note