IBM LUN setup is done using IBM Storage Manager Client or command line tools. Since most of our storage is mirrored the identical LUN has to be created on the both arrays. Storage Manager Client scripting allows easy duplication of identical setup on each array.
Code snippets
Creating host on IBM DS4000 storage system
Create a host entry on with proper host type (LINUX/WINDOWS)(more or less OS type).create host userLabel="server" hostType=number;
create hostPort userLabel="server-p0" host="server" identifier="210000e0xxxxxxxx" interfaceType=interface;
Example
create host userLabel="DBZones3" hostType=8;
create hostPort userLabel="DBZones3-p0" host="DBZones3" identifier="210000e08b9a2466" interfaceType=FC;
create hostPort userLabel="DBZones3-p1" host="DBZones3" identifier="210100e08bba2466" interfaceType=FC;
Creating logical drive (LUN) on IBM DS4000 storage system
create logicaldrive array="Array Name" userlabel="LUN name" capacity=X GB owner=(a|b) usagehint=filesystem;
Example
create logicaldrive array="SATA-Array3" userlabel="DBZones3_1" capacity=150 GB owner=a usagehint=filesystem;
create logicaldrive array="SATA-Array2" userlabel="DBZones3_2" capacity=150 GB owner=b usagehint=filesystem;
create logicaldrive array="SATA-Array1" userlabel="DBZones3_3" capacity=150 GB owner=a usagehint=filesystem;
Assigning the logical drive (LUN) to host on IBM DS4000 storage system
set logicalDrive ["LUN Name"] logicalUnitNumber=number host="server";
Example
set logicalDrive ["DBZones3_1"] logicalUnitNumber=0 host="DBZones3";
set logicalDrive ["DBZones3_2"] logicalUnitNumber=1 host="DBZones3";
set logicalDrive ["DBZones3_3"] logicalUnitNumber=2 host="DBZones3";