GFC is a pass thru device driver for FCP devices on the AIX platform. It was developed by Matthew Jacob and enhanced by Frank Zago and completed in January 2011. Information on this project can be found here:
GFC READMEGSC is a generic SCSI passthrough driver for AIX. It can be used when
no other driver exists. For instance the scanner drivers SANE
(http://www.mostang.com/sane/) rely on it.
GFC is a similar driver for FCP devices. It’s user interface is the same, except
for the device names (ie. gfc0 instead of gsc0). A program will work with both
interface without a need for recompilation.
This version of GSC will work with AIX 4.3.3, AIX 5.x, 6.x. It should also work
with 7.x although it’s not been tested. It may not compile on previous version o
f AIX (eg: 4.1). In that case, use GSC 1.0.
This driver has been tested on the following platforms:
- AIX 4.3.3.0, GSC compiled with Visual Age C++ 4.0.2.0 and gcc 2.95.2.1
- AIX 5.1.0.10 64 bits, GSC compiled with Visual Age C++ 5.0.2.0.
- AIX 5.3 64bits with GCC 4.2.4.
- AIX 6.1 64 bits with GCC 4.2.0.
I. Compile the driver
Check that the bos.adt.syscalls package is installed. It is necessary, else the
compilation will fail with this error: “Cannot find or open library file: -l csys”.
GNU make must be used.
Type as a non-privileged user:
make
II. Install the driver
Type as root:
make preinstall
make install
Note that preinstall should be called only needed once, since it adds some neces
sary fields in the ODM.
III. Configure the devices
Type as root:
mkdev -c generic -s scsi -t gsc -pscsiN -wT,L
where scsiN is the scsi adapter, T is the SCSI id of the target
and L is its lun.
This should create a /dev/gscM for this device.
You can use “tstinq /dev/gscM” to run a test inquiry command.
eg:
$ ./tstinq /dev/gsc0
/dev/gsc0:IBM CDRM00203 |Device Type 5
Type “lsdev -Cc generic” to see what gets configured.
eg:
$ lsdev -Cc generic
gsc0 Available 10-60-00-1,0 Feral Software Generic SCSI Release 1.1
For FCP, get the existing device informations (mainly scsi and lun) with lsattr
-EL , remove it with rmdev -dl and create the gfc one with a command
similar to:
$ mkdev -c generic -s fcp -t gfc -p fscsiX -a scsi_id=0xABCDEF -a lun_id
=0xABCDEF -w XXX
This should create a /dev/gfcM for this device.
IV. Remove the driver
As root:
make uninstall
V. Completely remove the driver
make uninstall postuninstall
NOTES
=====
1. Several different versions can be compiled, depending the version of
the OS you are working on: a version for AIX 4 and
one for AIX 5.1. The version for AIX 5.1 will work with both a 32 bits
or 64 bits kernel, but 64 bits applications using this driver on a
32 bits kernel won’t be able to open a device.
For AIX 6.x ongoing, only a 64 bits version is compiled.
2. gsctest is a test program that require a SCSI CDROM. To use it,
remove the device cdX, create a gsc device at the same SCSI
address. Try both gsctest32 and gsctest64 on AIX 5.1 with a 64 bits
kernel.
3. To generate trace records append the following line to /etc/trcfmt:
32 bits kernel:
666 1.0 “GSC” G4 S4
64 bits kernel:
666 1.0 “GSC” G8 S8
Note that this number (666) may conflict with other third party packages
(notably Legato’s lusdd).
To start a trace:
trace -j”666″ -a -l
To stop the trace:
trcstop
To read the trace:
trcrpt