среда, 25 марта 2009 г.

VxVM not initializing the LUN into VM control with the correct size

VxVM not initializing the LUN into VM control with the correct size
Details:
Issue:

OS and VxVM reported different size of the LUN:

# diskinfo /dev/rdsk/c12t10d0
SCSI describe of /dev/rdsk/c12t10d0:
vendor: EMC
product id: SYMMETRIX
type: direct access
size: 105024000 Kbytes
bytes per sector: 512

# vxdisk list c12t10d0
diskid: 1196869174.45.durpdp03
group: name=rssProvDG id=1196794975.38.durpdp03
flags: private autoimport cds
hostid: durpdp03
version: 3.1
iosize: 512
public: slice=0 offset=32896 len=42074624
private: slice=0 offset=128 len=32768
update: time: 1196869185 seqno: 0.5
headers: 0 120
configs: count=1 len=24072
logs: count=1 len=3648


The capacity of the LUN is calculated in VxVM using the formula: capacity = nhead * nsect * ncyl

Some disk vendors may report a faulty ncyl geometry value since the SCSI 2 standard has made this value optional. Because VxVM trusts this value, we may end up calculating a bad disk capacity. This was fixed in SF 4.1MP2 and in SF 5.0MP1RP2.

One caveat of the fix is that we will need to initialize the faulty LUNs as type "hpdisk", instead of the default cdsdisk.

Current theory is that we may get a bad geometry response to the SCSI query, causing VxVM miscalculate the disk capacity.

Need vxscsi output and diskinfo output to confirm.

# /etc/vx/diag.d/vxscsi -g /dev/rdsk/c12t10d0
geometry of /dev/rdsk/c12t10d0: nhead=15 nsect=128 ncyl=43864 sectsz=512 rpm=5400 cap=210048000

This command returns the SCSI 2 MODE SENSE geometry information:
nhead = 15
nsect = 128
ncyl = 43864
sectsz = 512

Counting the capacity using the geometry gives us:

15*128*43864/2 = 42109440 (42G)

However, the disk reports capacity 210048000/2 = 105024000 (105G)
This is also returned in SCSI IOCTL for the capacity, as seen in the diskinfo:
size: 105024000 Kbytes

Since VxVM uses the GEOMETRY (not the reported capacity) for initializing the disk, we initialize the disk as 42G instead of 105G. This behavior has been seen in some disks (esp. Maxtor) before, disk vendors are not supplying the correct geometry to the SCSI query since it is optional information.

The fix is in SF 4.1 MP2 and SF 5.0MP1RP2. The fix uses the capacity instead of the geometry values when initializing "hpdisk" type disks. However for "cdsdisk" (default) type disk this change cannot be made since we rely on getting correct geometry to create a cdsdisk. We must specify the format in CLI using:

# /etc/vx/bin/vxdisksetup -i format=hpdisk


Solution:

1. Install SF 4.1 MP2 or SF 5.0 MP1RP2.

To download SF 4.1 MP2:
http://seer.support.veritas.com/docs/292585.htm


The following SF 5.0MP1RP2 patches can be download from HP www.itrc.hp.com :

PHKL_37087, PHCO_37086, PHCO_37085 and PHCO_37077


2. Initialize the disk with format being hpdisk:

# /etc/vx/bin/vxdisksetup -i format=hpdisk

3. Verify the disk size with:
# vxdisk list

Комментариев нет:

Отправить комментарий