Creating a 2048GB partition in NSSMU reports the device exceeds 2TB and cannot be used

  • 7005186
  • 20-Jan-2010
  • 27-Apr-2012

Environment

Novell Open Enterprise Server 2 (OES 2) Linux
Novell Open Enterprise Server 2 (OES 2) Linux Support Pack 1
Novell Open Enterprise Server 2 (OES 2) Linux Support Pack 2
Novell Storage Services

Situation

Using the EMC storage tools to create a 2TB LUN on a EMC CX4-120 storage automatically creates a LUN of 4294967296 sectors.

Using NSSMU to initialize the same LUN shows a capacity of 2048 GB, yet at the same time complaints the device exceeds 2TB and cannot be used by NSSMU

Resolution

Using the EMC storage tools, re-create the LUN using the "create LUN with size definition in blocks" option, and create the LUN specifying as 4294967295 sectors/blocks (4294967296 - 1).

Additional Information

fdisk -ls /dev/disk/by-name/CX4-LUN012 reports the following:
 
Disk /dev/disk/by-name/CX4-LUN012: 2199.0 GB, 2199023255552 bytes
255 heads, 63 sectors/track, 267349 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
 

When you calculate 2199023255552 bytes/1024/1024/1024 this will match up to 2048GB.
 

The RAW disk information shows as follows:
93: SCSI 501.c: 10600 Disk
  [Created at block.194]
  UDI: /org/freedesktop/Hal/devices/storage_model_RAID_5_83
  Unique ID: GWTK.gQ2po0k9bA3
  Parent ID: Ddhb.fWaCJzkhOVE
  SysFS ID: /block/sdcj
  SysFS BusID: 5:0:1:12
  SysFS Device Link: /devices/pci0000:00/0000:00:06.0/0000:05:00.0/host5/rport-5:0-1/target5:0:1/5:0:1:12
  Hardware Class: disk
  Model: "DGC RAID 5"
  Vendor: "DGC"
  Device: "RAID 5"
  Revision: "0428"
  Serial ID: "CKM00094200068"
  Driver: "qla2xxx", "sd"
  Device File: /dev/sdcj (/dev/sg95)
  Device Files: /dev/sdcj, /dev/disk/by-id/scsi-360060160f7d0260070158f6050ffde11, /dev/disk/by-path/pci-0000:05:00.0-fc-0x50060168446020a7:0x000c000000000000
  Device Number: block 69:112-69:127 (char 21:95)
  Features: Hotpluggable
  Geometry (Logical): CHS 267349/255/63
  Size: 4294967296 sectors a 512 bytes
  Config Status: cfg=new, avail=yes, need=no, active=unknown
  Attached to: #27 (Fibre Channel)
 
Doing the same math here, we see 4294967296 sectors a 512 bytes = 2237677961216 bytes/1024/1024/1024 and this will match up to 2084 GB

This reason for this is because the NSS partitioning scheme (DOS partitioning scheme) uses a 32 bit value to store capacity, offset, etc.  As such, the largest capacity it can handle is 0xFFFFFFFF sectors. 

Unfortunately, the devices have a capacity of 0x100000000, or 1 sector more than we can handle.  The code just looks to see if the capacity is larger than 0xFFFFFFFF and shows the error. In this case the number of sectors we can handle is one to much

The fix for this problem has been released with the September 2010 Scheduled Maintenance update.