Hardware management commands in AIX operating system

Device Management commands can be used to manage the different hardware devices that are available in AIX. Some of the devices that you can manage include Logical Volume Manager, file systems, tape library, tape drives, and printers.

Most Common AIX Device Management Commands

  • List all devices on a system
                lsdev
  • Install devices for attached peripherals  
               cfgmgr –v
  • List all disk devices on a system
              lsdev -Cc disk
  • List all customized (existing) device classes (-P for complete list)
              lsdev -C -r class
  • Remove hdisk5
              rmdev -dl hdisk5
  • Get device address of hdisk1
             getconf DISK DEVNAME hdisk1 ⇐or⇒ bootinfo -o hdisk1
  • Get the size (in MB) of hdisk1
              getconf DISK SIZE /dev/hdisk1 ⇐or⇒ bootinfo -s hdisk1
  • List all disks belonging to scsi0
             lsdev -Cc disk -p scsi0

Also Read: Frequently Asked Interview Questions and Answers
  • Find the slot of a PCI Ethernet adapter
               lsslot -c pci -l ent0
  • Find the (virtual) location of an Ethernet adapter
              lscfg -l ent1
  • Find the location codes of all devices in the system
                lscfg
  • List all MPIO paths for hdisk0
                lspath -l hdisk0
  • Find the WWN of the fcs0 HBA adapter
                 lscfg -vl fcs0 | grep Network
  • Temporarily change console output to /console.out
                 swcons /console.out → (Use swcons to change back.) 
  • Get statistics and extended information on fcs0
                  fcstat fcs0
  • Change port type of HBA (This may vary by HBA vendor)
               rmdev -d -l fcnet0
               rmdev -d -l fscsi0
               chdev -l fcs0 -a link type=pt2pt cfgmgr
  • Mirroring rootvg to hdisk1
                 extendvg rootvg hdisk1
                 mirrorvg rootvg
                 bosboot -ad hdisk0
                 bosboot -ad hdisk1
                 bootlist -m normal hdisk0 hdisk1

Also Read: Storage Area Network (SAN) Basic Free Tutorials
  • Mount a CD/DVD ROM to /mnt
                  mount -rv cdrfs /dev/cd0 /mnt → (for a CD) 
                  mount -v udfs -o ro /dev/cd0 /mnt → (for a DVD)
Note the two different types of read-only flags. Either is Ok.
  • Create a VG, LV, and FS, mirror, and create mirrored LV
                  mkvg -s 256 -y datavg hdisk1 (PP size is 1/4 Gig) 
                  mklv -t jfs2log -y dataloglv datavg 1
                  logform /dev/dataloglv
                  mklv -t jfs2 -y data01lv datavg 8 → (2 Gig LV) 
                  crfs -v jfs2 -d data01lv -m /data01 -A yes 
                  extendvg datavg hdisk2
                  mklvcopy dataloglv 2 → (Note use of mirrorvg in next example) 
                  mklvcopy data01lv 2
                  syncvg -v datavg
                  lsvg -l datavg will now list 2 PPs for every LP
                  mklv -c 2 -t jfs2 -y data02lv datavg 8 → (2 Gig LV) 
                  crfs -v jfs2 -d data02lv -m /data02 -A yes
                  mount -a
  • Move a VG from hdisk1 to hdisk2
                  extendvg datavg hdisk2
                  mirrorvg datavg hdisk2

                 Wait for mirrors to synchronize

                unmirrorvg datavg hdisk1 
                reducevg datavg hdisk1
  • Find the free space on PV hdisk1
                 lspv hdisk1 → (Look for “FREE PPs”)

0 Comment to "Hardware management commands in AIX operating system"

Post a Comment