Sunday, September 27, 2009

Symmetrix parition alignment (Windows and Linux)

On Linux/Winows, first 63 blocks has been reserved for MBR (master boot record), and first data partition starts with offset at 63*512bytes=31.5KB.

However, Symmetrix array define tracks to be 64KB on DMX-3 and later (32KB for DMX-2 and earlier). This misalignment can use misalignment on Symmetrix memory cache (Just imaging one 64KB track on Host mapping to 2 tracks in the memory cache and storage), this will cause performance degradation.

Below steps shows how to manually perform the alignment using fdisk:
(128 blocks x 512bytes/block = 64KB)


[root@VMXDB01 ~]# fdisk /dev/emcpowera
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklab
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): n <-- New partition
Command action
e extended
p primary partition (1-4)
p <-- Primary partition
Partition number (1-4): 1 <-- 1st partition
First cylinder (1-1011, default 1): <-- leave default to use 1st cylinder
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-1011, default 1011): <-- Default
Using default value 1011

Command (m for help): x <-- enter eXpert mode

Expert command (m for help): p <-- print partition table

Disk /dev/emcpowera: 67 heads, 62 sectors, 1011 cylinders

Nr AF Hd Sec Cyl Hd Sec Cyl Start Size ID
1 00 1 1 0 66 62 1010 62 4199632 83
2 00 0 0 0 0 0 0 0 0 00
3 00 0 0 0 0 0 0 0 0 00
4 00 0 0 0 0 0 0 0 0 00

Expert command (m for help): b <-- move to beginning of the partition
Partition number (1-4): 1 <-- choose 1st partition
New beginning of data (62-4199693, default 62): 128 <-- Enter starting block

Expert command (m for help): p <-- print partition table

Disk /dev/emcpowera: 67 heads, 62 sectors, 1011 cylinders

Nr AF Hd Sec Cyl Hd Sec Cyl Start Size ID
1 00 1 1 0 66 62 1010 128 4199566 83
Partition 1 has different physical/logical beginnings (non-Linux?):
phys=(0, 1, 1) logical=(0, 2, 5)
2 00 0 0 0 0 0 0 0 0 00
3 00 0 0 0 0 0 0 0 0 00
4 00 0 0 0 0 0 0 0 0 00

Expert command (m for help): w <-- save partition table
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
[root@VMXDB01 ~]# fdisk -l /dev/emcpowera

Disk /dev/emcpowera: 2150 MB, 2150891520 bytes
67 heads, 62 sectors/track, 1011 cylinders
Units = cylinders of 4154 * 512 = 2126848 bytes

Device Boot Start End Blocks Id System
/dev/emcpowera1 1 1011 2099783 83 Linux
Partition 1 has different physical/logical beginnings (non-Linux?):
phys=(0, 1, 1) logical=(0, 2, 5)

No comments:

Post a Comment