Problem
How do I get started with SCO Unix's 'mpio', Multi Path I/O, feature?
HARDWARE: Any Storage Cabinet Solution that supports Multi Path I/O
Solution
'mpio' is available for SCO OpenServer6 and UnixWare7 only.
Let's consider the hardware. It is assumed that the Single, Shared
or SAN Storage Cabinet you are connecting to, supports multi-path
attachments.Please check with the Storage Cabinet vendor to ensure it supports Multi Path attachments.
In a typical and simple configuration, you are connecting two leads from a Dual Channel (or multi-channel) fibre controller into a storage cabinet with a single logical volume connected.
In this example, this disk is the DISK XYRATEX, is attached to a qlogic 2342 (dual channel controller):
# sdiconfig -l
0:0,2,0: HBA : (ide,1) Generic IDE/ATAPI
0,0,0: DISK : ST3250410AS 3.AA
1:0,7,0: HBA : (qlc2300,1) QLogic QLA2300
0,0,0: DISK : XYRATEX F5402E
1,7,0: HBA : (qlc2300,1) QLogic QLA2300
2,7,0: HBA : (qlc2300,1) QLogic QLA2300
3,7,0: HBA : (qlc2300,1) QLogic QLA2300
4,7,0: HBA : (qlc2300,1) QLogic QLA2300
5,7,0: HBA : (qlc2300,1) QLogic QLA2300
6,7,0: HBA : (qlc2300,1) QLogic QLA2300
7,7,0: HBA : (qlc2300,1) QLogic QLA2300
2:0,7,0: HBA : (qlc2300,2) QLogic QLA2300
1,7,0: HBA : (qlc2300,2) QLogic QLA2300
2,7,0: HBA : (qlc2300,2) QLogic QLA2300
3,7,0: HBA : (qlc2300,2) QLogic QLA2300
4,7,0: HBA : (qlc2300,2) QLogic QLA2300
5,7,0: HBA : (qlc2300,2) QLogic QLA2300
6,7,0: HBA : (qlc2300,2) QLogic QLA2300
7,7,0: HBA : (qlc2300,2) QLogic QLA2300
3:0,2,0: HBA : (ide,2) Generic IDE/ATAPI
0,0,0: CDROM : HL-DT-STDVDRAM GSA-H44N RB01ie:In the example below the Storage Cabinet is entry:
0,0,0: DISK : XYRATEX F5402Eand it is attached to a QLogic Dual Channel Controller:
It is assumed that you can mount this disk and read and write to the
files on a filesystem on this disk. This would be achieved with the
"mkdev hd" command for OpenServer6 and "diskadd" command for
Unixware7.It is assumed that you will have the latest maintenance installed for your operating system.
For OpenServer6:
---------------
To enable 'mpio', run:# mkdev mpioThis command allows you to enable or disable the MPIO functionality of this SCO Open Server 6 system.
MPIO is currently disabledWhat do you wish to do (enable|disable|quit)?It is recommend to relink the kernel and reboot after it is enabled.
For UnixWare7:
-------------
By default mpio isn't installed on UW7.You will need to install the 'mpio' package if it is not already there.
You can check with the command:# pkginfo -l mpioYou can install the 'mpio' before or after Maintenance. The 'mpio'
package contains the kernel elements while the Maintenance contains
the 'mpio' tools, ie. "sdipath".ie. The controlling program for 'mpio' is 'sdipath' and this is
installed as part of the base system and updated by Maintenance and
is not included with the 'mpio' package.To install the 'mpio' package you need to insert CD1 from the UW7 installation media and run:
# pkgadd -d cdrom1 mpioAt the end of the installation the kernel will be relinked and you have to reboot the system.
Now mpio is active.Preparation:
-----------
Once your server has rebooted, run:# sdighost -lIf the number of disks shown do not match the number of DISKS shown in the command:
# sdiconfig -lor it denotes ghost names then please run:
# sdighost -rand reboot your server to ensure there are no ghost disk stamps (vtoc) recorded in the server's Resource Manager (resmgr).
Here is an example of what the "sdighost -l" command should return, as per our example above:
# sdighost -lDevice Stamp Real Address Ghost Address
disk1 FWLUMRCTGjBN c0b0t0d0sXX
disk2 IsLogMFFTVLd c1b0t0d0sXXUX:sdighost: INFO: Currently, no names are in use as Ghost Names
Usage:
------
Assuming "mpio" is now installed and "sdighost -l" is correctly
reporting the disks you have, run:# sdipath -o listand you should see something like, as per our example above:
Device PhysDevice Path State CPU Group Reads Writes
-------- ------------ ------ -------- --------- ------- -------
disk1 c0b0t0d0 path85 Active 0 3644 3314
disk2 c1b0t0d0 path107 Active 0 7 0
disk2 c2b0t0d0 path108 Active 0 6 0Where 'disk1' is the 'root' disk and is, therefore, not going to be
used with 'mpio'. Whereas, 'disk2' is the logical volume we are
concerned about which will take advantage of 'mpio'.'mpio' determines whether a 'disk' is accessible in multiple paths
via the driver the disk is attached to. There is no real file
"c2b0t0d0" in /dev/dsk, this is a placeholder.You will not see any difference in "sdiconfig -l", the only way to determine if 'mpio' is enabled to see what disks are configured with 'mpio' is to use the 'sdipath' command.
If there were ghost disk stamps still recorded in the "sdighost -l" command then you see multiple disks defined here which would be in error.
However, in this example now, everything is ready and 'mpio' is now fully in use.
Testing:
-------
1. Unplug the SECOND lead connecting the Qlogic controller to the
storage cabinet:You should see:# sdipath -o listDevice PhysDevice Path State CPU Group Reads Writes
-------- ------------ ------ -------- --------- ------- -------
disk1 c0b0t0d0 path85 Active 0 3928 4248
disk2 c1b0t0d0 path107 Active 0 277 22
disk2 c2b0t0d0 path108 Failed 0 37 3However, if you don't see a "Failed" status immediately once you try to do some read or writes on the mounted disk then you should see it go to a "Failed" status otherwise you can mark the path as failed with the "sdipath -o fail" command manually, see 'man sdipath', see below.
Once you've put the lead back, the path will not 'repair' itself automatically.
You will need to use the 'sdipath' command to repair it with:
# sdipath -o repair -d disk2 path108Then you should see:# sdipath -o listDevice PhysDevice Path State CPU Group Reads Writes
-------- ------------ ------ -------- --------- ------- -------
disk1 c0b0t0d0 path85 Active 0 3929 4634
disk2 c1b0t0d0 path107 Active 0 277 45
disk2 c2b0t0d0 path108 Active 0 37 9Next, unplug the FIRST lead connecting the Qlogic controller to the storage cabinet:
You should see:# sdipath -o listDevice PhysDevice Path State CPU Group Reads Writes
-------- ------------ ------ -------- --------- ------- -------
disk1 c0b0t0d0 path85 Active 0 3931 4742
disk2 c1b0t0d0 path107 Failed 0 277 45
disk2 c2b0t0d0 path108 Active 0 19288 19Again, once you've plugged the lead back in then you can repair it as above.
You have now successfully installed, tested and become familiar with the 'mpio' commands necessary to administer your server.
To automate this facility, a suggestion would be to run "sdipath -o list" in a cron job and email an Administrator should a Failed condition arise.
To fail manually:
----------------
# sdipath -o fail disk2 - disk2 path109
:4:Path path109 has been failed.# sdipath -o list
Device PhysDevice Path State CPU Group Reads Writes
-------- ------------ ------ -------- --------- ------- -------
disk1 c0b0t0d0 path87 Active 0 8620 9540
disk2 c1b0t0d0 path109 Failed 0 42700 130
disk2 c2b0t0d0 path110 Active 0 58137 137 See also
http://uw714doc.xinuos.com/en/FEATS/ou800_mpio.htmlsdipath(ADM) - OpenServer6
sdipath(1M) - UnixWare7