AIX 5L SysAdmin I: (Unit 04) – Devices

Device Terminology:
Physical Devices – a device that you can touch
Ports – a way to connect a device (serial etc)
Device Drivers – software required to use a device
Logical Devices – every physical device has a logical device, there are also logical devices that don’t have a physical device such as /dev/null (the bit bucket)

Listing of /dev Directory:
# ls -l /dev
brw-rw—- – Block Device – fd0, fd1 (Floppy)
crw-rw—- – Character Device or raw devices – rfd0, rfd1 (Floppy)
crwxr-xr-x – rmt0, rmt0.1, rmt0.2 (Tape Device)
Note: Different ways to interact with the same physical device.

ODM – Object Data Manager (Device Configuration Database)
1. Predefined Configuration Database – Supported devices – drivers are already installed (Otherwise must install device driver)

2. Customized Configuration Database – Devices that are already installed on the system such as a keyboard, mouse, each hard disk, adapter etc.

List All Supported Devices:
lsdev – list devices

PdDv Database (List All Predefined Devices)
lsdev -P -H (-P Predefined Devices, -H Heading displayed)
lsdev -Pc tape (-P Predefined Devices -c class)
Note: Use these commands to verify that you have the device drivers before installing a device.

CuDv Database (List All Customized Devices)
# lsdev -C -H (-C Customized Devices, -H Heading displayed)

# lsattr -EH -I sys0 (-E Effective Attributes, -H Heading, -l defined logical device)

# lsattr -E -I sys0 -a realmem (-a attribute name)
Note: The “false” indicates that you can’t issue a command and change the value such as adding more memory which must be physically added. “True” means that you can issue a command and change the settings.

Device States:
1. Predefined Database
Undefined (Supported Device)

2. Customized Database
Defined (Not Usable)
Available (Read for Use)

mkdev or dfgmgr (Undefined –> Available or Defined –> Available)
rmdev -dl (-d delete, Defined –> Undefined or Available –> Undefined)
rmdev -l (Available –> Defined)
rmdev -l cd0 (Changed to Defined)
rmdev -dl cd0 (Remove it from the customized database)
cfgmgr (Will search for all devices and setup them up)
Note: cfgmgr will run each time that you boot the system

Note: This is what we created scripts to handle to move the tape device between the difference systems on the p650. (rmt0.add and rmt0.del).

Note: Can use smit instead of the mkdev and rmdev commands. Using the sfgmgr is faster and doesn’t require any adminstrator intervention.

Self-Configuring Devices (Detectable)
These devices have a chip on them that answers back about what the device is and where it is located.

Configuration Manager (cfgmgr)
1. cfgmgr – Asks (Who are you?)
2. device – Responds (Tape Drive, 04-CO-00-3,0)
3. Add entry to ODM database (rmt0 – Defined)
4. Load device driver into the kernel
5. Make device available (ls -l /dev/rmt0)

SMIT Devices Menu
smit devices (fastpath)

Device Addressing:
1. Location codes are used for device addressing
2. The location code for a device is a path from the adapter in the CPU drawer or system unit, through the signal cables and the asynchronous distribution box (if there is one) to the device
3. Location codes consist of up to four fields of information depending on the type of device
4. Location codes differ based on model type

Location Code Format for PCI Devices (Example: 43P – 140)

00 – Resources attached to the processor
01 – Resources attaced to the ISA bus
04 – Resources attached to the PCI bus

01-99 – For pluggable adapters/cards
A-Z,0 – As position 1 and 2 respectively for integrated adapters

EF – The connector ID
GH – Port identifier, address, memory modules, device, FRU – (Field Replacable Unit) for the device

Location Code Example: (Non-SCSI)
128 Port Asynchronous Controller

Location Code Format for SCSI Devices (Example: 43P – 140)

AB-CD – Identifies the bus and the adapter location
Same as with non-SCSI devices

EF – For a single SCSI bus – 00
For a dual SCSI bus:
Internal bus – 00
External bus – 01

G – SCSI address (SCSI ID) of the device
H = Logical unit number of the device

SCSI chain with a terminator on the end (physical jumpers etc)
Each SCSI device must have a different number and SCSI ID 7 is reserved for the adapter itself.

SCSI Conflict – lsdev -D

Adding an ASCII Terminal
smit tty
smit mktty

terminal type: ibm3151

Documenting Hardware Configuration:
lsdev -CH
Provides name, status, location and description of devices
lsdev -C -c disk (-C means Customized Database, -c means category)

lscfg -v
Provides details of all devices including manufacturer, type and model number and part numbers.

lsattr -El sys0
Provides attributes for the name device (for example, sys0)
Run command for all devices

Leave a Reply

Your email address will not be published. Required fields are marked *