《aix系统应用基础》07dev.ppt
Course materials may not be reproduced in whole or in part without the prior written permission of IBM.5.1Unit 7Devices Copyright IBM Corporation 2008Unit objectivesAfter completing this unit,you should be able to:Describe the difference between logical and physical devicesDescribe the purpose of the ODM predefined and customized databasesDescribe the different states of a deviceDescribe the format of device location codesUse SMIT to add/show/change/delete devices Copyright IBM Corporation 2008Device terminologyPhysical DevicesPortsDevice DriversLogical Devices/dev Directory Copyright IBM Corporation 2008Listing of/dev directory#ls-l/devbrw-rw-rw1rootsystem 20,0Oct 29 02:25fd0brw-rw-rw1rootsystem 20,64 Oct 29 02:26fd1crw-rw-rw1rootsystem 20,0Oct 29 02:25rfd0crw-rw-rw1rootsystem 20,64 Oct 29 02:26rfd1:crw-r-r-1rootsystem 22,0Oct 29 02:25rmt0crw-r-r-1rootsystem 22,1Oct 29 02:25rmt0.1:brw-1rootsystem 14,1Oct 29 02:44hdisk0brw-1rootsystem 14,2Nov 1 05:31hdisk1crw-2rootsystem 14,1Oct 29 02:44rhdisk0crw-1rootsystem 14,2Nov 1 05:31rhdisk1fd0rmt0rmt1 Copyright IBM Corporation 2008Device configuration database Predefined Configuration DatabaseClassTypeSubclassDescriptionmemorytotmemsys Memorytape4mm4gbscsi 4.0 GB 4mm Tape Drivediskosdiskscsi Other SCSI Disk Driveadapter23100020pci IBM 10/100Mbps Ethernet PCI Adapter(23100020)adapter14101800pci IBM PCI Tokenring Adapter(14101800)adapterchrp_ecpisa_sio CHRP IEEE1284(ECP)Parallel Port Adapteradapterkeyboardkma_chrp Keyboard Adapter Customized Configuration Database NameStatusLocationDescription sa0Available01-S1Standard I/O Serial Port sioka0Available01-K1-00Keyboard Adapter rmt0Available10-80-00-0.0SCSI 4mm Tape Drive hdisk0Available10-80-00-4,016 Bit SCSI Disk Drive hdisk1Available 10-80-00-5,016 Bit SCSI Disk Drive mem0AvailableMemory ent0Available10-60IBM 10/100 Mbps Ethernet PC Adapter(23100020)lftlftnodeLow Function Terminal SubsystemdiskettefdsiofdDiskette Driveprinteribm4019parallelIBM 4019 LaserPrinter Copyright IBM Corporation 2008List all supported devices PdDv (Predefined Devices)#lsdev-P-HclasstypesubclassdescriptionmemorytotmemsysMemorytape4mm4gbscsi4.0 GB 4mm Tape DrivediskosdiskscsiOther SCSI Disk Driveadapter 22100020pciIBM PCI Ethernet Adapter(22100020)adapter 14101800pciIBM PCI Tokenring Adapter(14101800)adapter ppaisa_sio Standard I/O Parallel Port Adapteradapter isa_keyboardisa_sio Keyboard Adapter.#lsdev-Pc tapetape1200mb-cscsi1.2 GB 1/4-Inch Tape Drivetape150mbscsi150 MB 1/4-Inch Tape Drivetape3490escsi3490E Autoloading Tape Drivetape4mm2gbscsi2.0 GB 4mm Tape Drive.Copyright IBM Corporation 2008List all defined devices CuDv (Customized Devices)#lsdev-C-Hnamestatuslocation descriptionsys0AvailableSystemObjectpci0AvailablePCI Busisa0Available10-58ISA Bussa0Available01-S1Standard I/O Serial Port scsi0Available10-80Wide/Fast-20 SCSI I/O Controllercd0Available10-80-00-3,0SCSI Multimedia CD-ROM Drivermt0Defined 10-80-00-6,04.0 GB 4mm Tape Drivehdisk0Available 10-80-00-4,016 Bit SCSI Disk Drivehdisk1Available 10-80-00-5,016 Bit SCSI Disk Drivemem0AvailableMemoryent0Available10-60IBM 10/100 Mbps Ethernet PCI tok0Available10-90IBM PCI Tokenring Adapter#lsattr-EH-l sys0attributevalue description user_settablekeylocknormal State of system keylock at boot timeFalserealmem131072 Amount of usable physical memory KbytesFalseiostattrue Continuously maintain DISK I/O history True#lsattr-E-l sys0-a realmemrealmem131072 Amount of usable physical memory in KbytesFalse Copyright IBM Corporation 2008Device statesPredefined DatabaseUndefinedSupportedDeviceCustomized DatabaseDefinedNot UsableAvailableReady forUsermdev-lmkdev-lorcfgmgrrmdev-dlrmdev-dl Copyright IBM Corporation 2008Self-configuring devicescfgmgr1.Who are you?2.Answer:-CD-ROM-10-80-00-3,0ODM:cd0defined10-80-00-3,0Device DriverKernel/unixDevice Driver39#ls-l/dev/cd0br-r-r-rootsystem39,0/dev/cd0ODM:cd0available10-80-00-3,03.cd0 defined4a)Load device driver4b)Make /dev/cd0 entry5.Device available Copyright IBM Corporation 2008SMIT Devices menu#smit devices DevicesMove cursor to desired item and press Enter.Install/Configure Devices Added After IPLPrinter/PlotterTTYAsynchronous AdaptersPTYConsoleMPIO ManagementFixed DiskDisk ArrayCD ROM DriveRead/Write Optical DriveDiskette DriveTape DriveCommunicationsGraphic DisplaysGraphic Input DevicesLow Function Terminal(LFT)SCSI Initiator DeviceSCSI AdapterFC AdapterIDE AdapteriSCSIAsynchronous I/OMultimediaList DevicesConfigure/Unconfigure DevicesInstall Additional Device SoftwarePCI Hot Plug ManagerSSA DisksSSA RAID Arrays Copyright IBM Corporation 2008Device addressingLocation codes are used for device addressingThe 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 deviceLocation codes consist of up to four fields of information depending on the type of deviceLocation codes differ based on model type Copyright IBM Corporation 2008Location code format for PCI devices AB-CD-EF-GH Copyright IBM Corporation 2008Location code example:Non-SCSI128-Port Asynchronous ControllerSystem Unit128-Port Adapter1P-101P-10-11-011P-10-11-070 1 2 3 4 5 6 78 9 10 11 12 13 14 1510 1 2 3 4 5 6 78 9 10 11 12 13 14 151211P-10-21-101P-10-22-04RemoteAsync Node(RAN)0 1 2 3 4 5 6 78 9 10 11 12 13 14 152 Copyright IBM Corporation 2008Location code format for SCSI devices Copyright IBM Corporation 2008Location code example for SCSI device Copyright IBM Corporation 2008Physical location codesAssigned by system firmwareUsed to uniquely identify hardware for:Assigning adapters to logical partitionsIdentifying field replaceable units(FRU)Structure of a physical location code:.-Enclosure is usually:.Example,Displayed by default with lscfg command Copyright IBM Corporation 2008Listing device physical locations CuDv Customized Devices#lsdev-C-H-F name status physloc location description name status physloc location description en1 Defined 01-08 Standard Ethernet Network ent1 Defined U789D.001.DQDWAYT-P1-C4-T1 01-08 10/100/1000 Base-TX et1 Defined 01-08 IEEE 802.3 Ethernethdisk2 Defined U7311.D20.107F67B-P1-C04-A8 02-08-01-8,0 16 Bit LVD SCSI Disk hdisk3 Defined U7311.D20.107F67B-P1-C04-A9 02-08-01-9,0 16 Bit LVD SCSI Disk scsi0 Defined U7311.D20.107F67B-P1-C04 02-08-00 PCI X Dual Channelscsi1 Defined U7311.D20.107F67B-P1-C04 02-08-01 PCI X Dual Channelses0 Defined U7311.D20.107F67B-P1-C04-AF 02-08-01-15,0 SCS Enclosure Servicessisscsia0 Defined U7311.D20.107F67B-P1-C04 02-08 PCI XDDR Dual Channel Copyright IBM Corporation 2008Adding an ASCII terminal TTYMove cursor to desired item and press Enter.List All Defined TTYs Add a TTY Move a TTY to Another Port Change/Show Characteristics of a TTY Remove a TTY Configure a Defined TTY Generate an Error Report Trace a TTYF1=Help F2=Refresh F3=Cancel F8=ImageF9=Shell F10=Exit Enter=Do Copyright IBM Corporation 2008Attachment TTY Type Move cursor to desired item and press Enter.tty rs232 Asynchronous Terminal tty rs422 Asynchronous Terminal Parent Adapter Move cursor to desired item and press Enter.sa0Available01-S1 Standard I/O Serial Port 1 sa1Available01-S2 Standard I/O Serial Port 2 sa2Available1P-03-11 16-Port RAN EIA-232 for 128-Port adapter sa3Available1P-03-12 16-Port RAN EIA-232 for 128-Port adapter sa4Available1P-03-13 16-Port RAN EIA-232 for 128 Port adapter Copyright IBM Corporation 2008Device nomenclature Copyright IBM Corporation 2008Add a TTY Add a TTYType or select values in entry fields.Press Enter AFTER making all desired changes.TOP Entry Fields TTY type tty TTY interface rs232 Description Asynchronous Terminal Parent adapter sa0*PORT number +Enable LOGIN disable +BAUD rate +PARITY none +BITS per character 8 +Number of STOP BITS 1 +TIME before advancing to next port setting 0 +#TERMINAL type dumb FLOW CONTROL to be used xon +MORE.31F1=Help F2=Refresh F3=Cancel F4=ListEsc+5=Reset Esc+6=Command Esc+7=Edit Esc+8=ImageEsc+9=Shell Esc+0=Exit Enter=Do Copyright IBM Corporation 2008Documenting hardware configuration lsdev-CHProvides name,status,location,and description of devices lscfg-vProvides details of all devices including manufacturer,type and model number,and part numbers lsattr-El sys0Provides attributes for the name device(for example,sys0)Run command for all devices getconf-aProvides the values of all system configuration variables Copyright IBM Corporation 2008Checkpoint(1 of 2)1.Is it possible to use SCSI ID 7 for a new tape drive?_ 2.Use the output on the next visual(lsdev-C-H)to answer the following four questions.a)What happens if we attempt to add another device with the SCSI address set to 4?_b)Can the 8 mm tape drive be currently used?Why?_c)Where is the printer connected?_d)The Ethernet adapter is installed in what slot?1._2._ Copyright IBM Corporation 2008Checkpoint(2 of 2)#lsdev-C Hnamestatuslocationdescriptionsys0AvailableSystem Objectpci0AvailablePCI Busisa0Available10-58ISA Busppa0Available01-R1Standard I/O Parallel Port Adapterlp0Available01-R1-00-00IBM 4039 LaserPrintersa0Available01-S1Standard I/O Serial Port 1tty0Available01-S1-00-00Asynchronous Terminalmem0AvailableMemoryscsi0Available10-80Wide SCSI I/O Controllerrmt0Defined10-80-00-3,05.0 GB 8 mm Tape Drivehdisk0Available10-80-00-4,0SCSI Disk Driveent0Available 10-60IBM PCI 10/100 Ethernet Adapter Copyright IBM Corporation 2008Checkpoint solutions1.Is it possible to use SCSI ID 7 for a new tape drive?No.The SCSI adapter itself uses ID 7.So,it cannot be usedfor other devices.2.Use the output on the next visual(lsdev-C-H)to answer the following four questions.a)What happens if we attempt to add another device with the SCSI address set to 4?The operation fails as there is already a device(SCSI Disk Drive)configured at this location.b)Can the 8 mm tape drive be currently used?Why?No,because it is in the defined state.You have to first make it available by either using SMIT or the mkdev command.c)Where is the printer connected?The parallel portd)The Ethernet adapter is installed in what slot?It is an integrated adapter which does not occupy a slot on the PCI bus.Copyright IBM Corporation 2008Exercise 7:Devices List device configurationList and change system parametersConfigure a tape deviceConfigure a CD-ROM device Copyright IBM Corporation 2008Unit summaryA physical device is the actual hardware attached to the system.A logical device is the software interface used by programs and users to access a physical device.Device information is stored in the ODM in two databases:customized and predefinedDevices can exist in a number of different states:unavailable,defined,available and stoppedLocation codes are used to describe exactly where a device is connected into the system.Device attributes can be modified through SMIT.To create,modify,or remove device definitions,it is sometimes necessary to use commands such as mkdev,chdev,and rmdev.Copyright IBM Corporation 2008