VMware Cloud Community
SC38103
Contributor
Contributor

Disk Alignment of OS drive

Created a W2K3 guest VM with a disk for the OS. To execute the recommended disk alignment process per document on the OS disk, added the disk to another W2K3 VM and completed diskpart and formatting with 23K allocation. Once the disk is added back to the newly created W2K3 VM, began to load OS via CD. Selected "Leave the current file system intact (no changes)". Once the CD completes file copies and system executes a reboot the following message is displayed.

A disk read error occurred Press CtrlAltDel to restart

I've seen this posted previously but no solution was provided. This appears to be a Master Boot record issue but I've been able to find a solution.

Please advise.

0 Kudos
6 Replies
mike_laspina
Champion
Champion

Hello,

I hope that is a typo on the 23K allocation.

32K may not be what your configuration requires.

You need to calculate the VMFS partitions allocation first.

You can find it by running esxcfg-info -s and look for disk lun partition start and end sector for the VMFS dev.

e.g.

\==+VMFS Filesystems :

\==+Vm FileSystem :

|----Volume UUID...........................................479423e9-aa5f0576-052d-000d60d46e2e

|----Head Extent...........................................vmhba32:1:0:1

|----Console Path........................................../vmfs/volumes/479423e9-aa5f0576-052d-000d60d46e2e

|----Block Size............................................1048576

|----Total Blocks..........................................136960

|----Blocks Used...........................................59836

|----Size..................................................143612968960

|----Usage.................................................62742593536

|----Volume Name...........................................iscsi-zstore0

|----Lock Mode.............................................public

|----Major Version.........................................3

|----Minor Version.........................................31

\==+Extents :

\==+Disk Lun Partition :

|----Name............................................vmhba32:1:0:1

|----Partition Number................................1

|----Start Sector....................................128

|----End Sector......................................281008980

|----Partition Type..................................251

|----Console Device................................../dev/sdc1

|----Size............................................143876532224

|----Type............................................0x000000fb

The sector block size of the physical disk is 512 and the starting sector is 128 which is actually 64K aligned.

This will vary from system to system but it is mostly 64K from what I have seen.

There are two methods for the guest in the guide.

Command line or GUI which one did you use?

http://blog.laspina.ca/ vExpert 2009
0 Kudos
SC38103
Contributor
Contributor

Yes, 23K is a typo, and 32K is correct.

I checked the VMFS partition, and per the previously referenced document the alignment is correct. I am using an EMC CLARiiON. The vmfs is aligned per the EMC recommended start block of 128.

Q: Command line or GUI which one did I use? A: I don't see but one method for setting the allocation size using Disk Management GUI.

0 Kudos
jhanekom
Virtuoso
Virtuoso

You need to mark the partition as "active" in order to boot off of it... it may be that you missed that step? Try adding the disk back as a secondary disk on W2K3 VM, booting up and marking the partition as active in Disk Manager.

0 Kudos
SC38103
Contributor
Contributor

Partition is marked as "active". Get same error.

A disk read error occurred Press

CtrlAltDel to restart

0 Kudos
mike_laspina
Champion
Champion

I would not follow the document presented. I have found it to have errors. Like the calculation of the alignment should be 64KB not 32KB and if you follow it when partitioning you will blow away the Boot volume of the system you are using to create an aligned partition for. The basics here are to create a partition that matches what the vmfs allocation is set to and begins at the correct starting point. Use the following steps.

1) Use the esxcfg tools as posted earlier to find the vmfs aligment size.

2) Create a vmdk in and existing VM for you target system.

3) Using the command line tool diskpart ver 5.1 or greater issue the following commands on that system

DISKPART>select disk x (where x is the disk number of the new vmdk)

DISKPART>create partition primary align=xx (where xx is the alignment set on the vmfs file system)

4) Format the partition using the disk managment GUI and select the same value for the allocation size as was in align=xx (I usually select quick fmt as well)

N.B. In some cases using a large allocation will waste a significant amount of space. You can format the partition with a smaller allocation in these cases and the alignment will still be OK but it will perform best at the same allocation.

Corrected one word in step 1.

As well I use 64K and it seems to work very well with some moderate wasted space in small file areas.

Message was edited by: mike.laspina

http://blog.laspina.ca/ vExpert 2009
SC38103
Contributor
Contributor

I spoke to VMware about this issue.

THEY SAID - The procedure within that document is only for data disks it is not for the OS disk. So if you wish to do that on your data disks it should work fine but for the OS disk it will not.

I asked for conformation concerning the 32K allocation unit but did not receive conformation. I believe Mike's is correct on his input and will pursue this approach.

Thanks Mike, and to all others who replied.

0 Kudos