1) The document provides steps to properly configure disk alignment on Linux servers using Netapp LUNs (iSCSI or FC/FCOE) to avoid potential performance issues as storage grows.
2) Key steps include installing correct host and SnapDrive utilities, configuring multipath software, creating LUNs specifying the Linux OS type, creating an initiator group for Linux, and changing the LUN partition start sector to a value evenly divisible by eight using fdisk.
3) The lun alignment show command on the Netapp storage checks the read and write alignment histogram percentages to confirm if the LUN is aligned, partial, or indeterminate.
Creating Disk Alignment on Linux Servers Using Netapp Luns
1. Creating disk alignment on Linux Servers using Netapp Luns (iscsi or FC/FCOE)
I decided to create this report, because i have found that many customers facing this
problem that the principle is not critical, but as the storage grows it can become a
major performance problem.
Follow below thetasks to beexecuted:
- Install the correct host utilities version on Linux server
- Install the correct snapdriver version on Linux server
- Configure correct parameters on the file configuration of the multipath software
(/etc/multipath.conf)
- Create lun selecting type Linux,because if you don´t select correct operation system Type the
lun will be misalignment on the Storage
- Create the initiator group selecting the correct operation system (In this case Linux) and don´t
forget to enable ALUA if you are using multiple paths.
- After alocate the lun and recognize on the server do the follow:
#fdisk /dev/mapper/"disk"
Create the primary partition and after create, enter on the expert mode typing X on the
follow fdisk options" Command (m for help):X "
You will see the follow below when entry on the expert mode:
Enter expert mode in fdisk and change the starting LBA of the partition to a value that is evenly
divisible by eight. In the following example, the default starting sector is 63 and it is changed to
64 because 64 is evenly divisible by eight. The default starting sector chosen by fdisk is based
on the size of the LUN. The LUN size is used by fdisk to calculate a pseudo geometry which can
vary between different versions of fdisk.
Command (m for help): x
Expert command (m for help): b
Partition number (1-4): 1
New beginning of data (63-62926604, default 63): 64
Expert command (m for help): p
Disk /dev/mapper/”disk”: 255 heads, 63 sectors, 3917 cylinders
Nr AF Hd Sec Cyl Hd Sec Cyl Start Size ID
1 00 1 1 0 254 63 1023 64 62926541 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
(Fdisk may print a warning similar to the following as a result of the new offset, this
warning may be ignored.)
Partition 1 has different physical/logical beginnings (non-Linux?):
phys=(0, 1, 1) logical=(0, 1, 2)
2. Write the partition table and create the new device files for the partition. The kpartx
command is used to create the device node for the new partition automatically.
Don´t forget toexecute kpartx-a tocreate the device node for the new partition automatically.
#kpartx-a /dev/"disk"
Optionally, create a file system or LVM physical volume using the partition. File systems should
be configured to use a 4kB block or a larger block size that is a multiple of 4kB.
# mkfs.ext3 -b 4096 /dev/mapper/"disk"
mke2fs 1.39 (29-May-2006)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
3933120 inodes, 7865817 blocks
393290 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=0
241 block groups
32768 blocks per group, 32768 fragments per group
16320 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
To see on the storage if the lun created are alignment do the follow:
Netatpp# priv set diag
Netapp# lun alignment show
The command above will show 5 lines of the information like follow :
/vol/vol_name/lun_name
Multiprotocol type: linux
Alignment: partial-writes
Writealignment histogrampercentage: 0, 0, 0, 0, 0, 0, 0, 14
Read alignment histogrampercentage: 0, 0, 0, 0, 0, 0, 0, 2
Partialwrites percentage: 85
Partialreads percentage: 97
On the information above you must analyse the third and the fourth line "Write aligment
histogram percentage" and "Read alignment histogram percentage" that have 8 bits of the
information.
3. The lun will be alignment if you have only percentage of the Read and Write on the first bit, like
we can see below:
/vol/vol_name/lun_name
Multiprotocol type: linux
Alignment: indeterminate
Writealignment histogrampercentage: 92, 0, 0, 0, 0, 0, 0, 0
Read alignment histogrampercentage: 13, 0, 0, 0, 0, 0, 0, 0
Partialwrites percentage: 5
Partialreads percentage: 86
After you have 99% of theread or write on the any bit, theinformation of the Alignment will
show "aligned like follow :
/vol/vol_name/lun_name
Multiprotocol type: linux
Alignment: aligned
Writealignment histogrampercentage: 99, 0, 0, 0, 0, 0, 0, 0
Read alignment histogrampercentage: 76, 0, 0, 0, 0, 0, 0, 0
Partialwrites percentage: 0
Partialreads percentage: 23
Don´t forget to reset the counters on the Netapp Storage to get the true analysis
Netapp# lun stats -z
I hope to help all people that haveproblem with misalignment Linux lun on theNetapp
Storages...
Best regardto all and enjoy the information
Ivan J.B.Silva