Your Ad Here

IBM AIX/UNIX system storage administration ksh/perl scripting

Wednesday, October 22, 2008

Mount an ISO image on a Solaris filesystem with lofiadm

Given an ISO image in /export/temp/software_cd.iso, a loopback file device (/dev/lofi/1) is created with the following command:


lofiadm -a /export/temp/software_cd.iso /dev/lofi/1


The lofi device creates a block device version of a file. This block device can be mounted to /mnt with the following command:


mount -F lofs -o ro /dev/lofi/1 /mnt


These commands can be combined into a single command:


mount -F hsfs -o ro `lofiadm -a /export/temp/software_cd.iso` /mnt

Friday, July 11, 2008

Manage your logical volumes with Veritas Volume Manager (VxVM) V5 for AIX 5.3 and 6.1


Level: Intermediate

Shashidhar Soppin , Staff Software Engineer,
IBM

24 Jun 2008

Learn to install, configure, and troubleshoot Veritas (Symantec) 5.0
Volume Manager (VxVM) on IBM® AIX® 5L and AIX 6 machines using command line options. The article includes a brief explanation of VxVM basic concepts, troubleshooting, and easy fixes for a few sundry problems.





Introduction



In the world of UNIX® storage management, there are two primary leaders: IBM and
Veritas (now Symantec). Both companies offer products that help UNIX system administrators manage storage with very flexible methods. Veritas offers the Veritas Volume Manager (VxVM), which is either packaged as a standalone add-on, or part of a larger package, such as the Veritas On-Line Storage Manager. VxVM is a storage management subsystem that lets you manage physical disks as logical devices. (Logical devices do not have the limitations of physical disks.)


Veritas Volume Manager


VxVM is a storage management subsystem that lets you manage physical disks as logical devices called volumes. A VxVM volume appears to applications and the operating system as a physical disk on which file systems, databases, and other managed data objects can be configured. VxVM provides easy-to-use online disk storage management for computing environments and Storage Area Network (SAN) environments. By supporting the Redundant Array of Independent Disks (RAID) model, VxVM can be configured to protect against disk and hardware failure, and to increase I/O throughput.


VxVM provides features that enhance fault tolerance and fast recovery from disk failure. VxVM overcomes physical restrictions imposed by hardware disk devices by providing a logical volume management layer that lets volumes span multiple disks.
VxVM also provides the tools to improve performance, and ensure data availability and integrity. You can use VxVM to dynamically configure disk storage while the system is active.


VxVM and the operating system


VxVM operates as a subsystem between operating system and data management systems, similar to file systems and database management systems. VxVM is tightly coupled with the operating system. Before a disk can be brought under VxVM control, the disk must be accessible through the operating system device interface. VxVM is layered on top of the operating system interface services, and is dependent on how the operating system accesses physical disks.


VxVM is dependent upon the operating system for:


  • Operating system (disk) devices

  • Device handles

  • VxVM dynamic multipathing (DMP) metadevice





Back to top


VxVM and data storage


VxVM uses two types of objects to handle storage management:


Physical objects

Physical disks, or other hardware, with block and raw operating system device interfaces that are used to store data.

Virtual objects

When one or more physical disks are brought under the control of VxVM, it creates virtual objects called volumes on those physical disks. Each volume records and retrieves data from one or more physical disks. Volumes are accessed by file systems, databases, or other applications the same way that physical disks are accessed.

Volumes are also composed of other virtual objects (plexes and subdisks) that are used in changing the volume configuration. Volumes and their virtual components are called virtual objects, or VxVM objects.







Back to top


Physical disks



A physical disk is the basic storage device, or media, where the data is ultimately stored. You can access the data on a physical disk by using a device name to locate the disk. The physical disk device name varies with the computer system you use. Not all parameters are used on all systems. Typical device names are of the form hdisk(number)
, where (number) specifies a unique disk number starting at 0.




Figure 1. Displaying a physical disk


Displaying a physical disk


Disk arrays


Performing I/O to disks is relatively slow because disks are physical devices that require time to move the heads to the correct position before reading or writing. If all of the read or write operations are done to individual disks, one at a time, the read-write time can become unmanageable. Performing these operations on multiple disks can help reduce the problem.



A disk array is a collection of physical disks that VxVM can represent to the operating system as one or more virtual disks or volumes. To the operating system, the volumes created by VxVM look and act like physical disks. Applications that interact with volumes should work the same way they do with physical disks.
Figure 2 shows how VxVM presents the disks as several volumes, in a disk array, to the operating system.




Figure 2. Displaying disks in a disk array


Displaying disks in a disk array


Data can be spread across several disks within an array to distribute or balance I/O operations across the disks. Using parallel I/O across multiple disks improves I/O performance by increasing data transfer speed and overall throughput for the array.


Multipathed disk arrays


Some disk arrays provide multiple ports to access their disk devices. These ports, coupled with the host bus adaptor (HBA) controller and any data bus or I/ O processor local to the array, provide multiple hardware paths to access the disk devices. Such disk arrays, called multipathed, can be connected to host systems in many different configurations, such as multiple ports connected to different controllers on a single host, chaining of the ports through a single controller on a host, or ports connected to different hosts simultaneously.


Device discovery


Device discovery is the process of discovering the disks that are attached to a host. This feature is important for dynamic multipathing (DMP) because it needs to support a growing number of disk arrays from several vendors. In conjunction with the ability to discover devices attached to a host, the device discovery service lets you add support dynamically for new disk arrays.
The operation, which uses a facility called the device discovery layer (DDL), does not require a reboot.




Back to top


Virtual objects


Virtual objects in VxVM include:


  • Disk groups

  • Volume manager (VM) disks

  • Subdisks

  • Plexes

  • Volumes



The connection between physical objects and VxVM objects is made when you place a physical disk under VxVM control.
After installing VxVM on a host system, you must bring the contents of physical disks under VxVM control by collecting the VM disks into disk groups and allocating the disk group space to create logical volumes.



To bring the physical disk under VxVM control, the disk must not be under LVM control. VxVM must take control of the physical disks; the disk cannot be under the control of another storage manager (such as LVM). Listing 1 shows an example of using the vxdisk command to list the disk status.



Listing 1. Using vxdisk to list disk status


# vxdisk -e list
DEVICE TYPE DISK GROUP STATUS OS_NATIVE_NAME
Disk_0 auto - - online hdisk51
Disk_1 auto - - online hdisk48
Disk_2 auto - - online hdisk47
Disk_3 auto - - online hdisk50
Disk_4 auto - - online hdisk49
Disk_5 auto - - online hdisk46
Disk_6 auto - - online hdisk44
Disk_7 auto - - online hdisk42
Disk_8 auto - - online hdisk45
Disk_9 auto - - offline hdisk43
Disk_10 auto - - online hdisk41
Disk_11 auto - - online hdisk40
Disk_12 auto - - online hdisk38
Disk_13 auto - - online hdisk37
Disk_14 auto - - online hdisk39
Disk_15 auto - - online hdisk36
Disk_16 auto - - online hdisk33
Disk_17 auto - - online hdisk34
Disk_18 auto - - online hdisk31
Disk_19 auto - - online hdisk35
Disk_20 auto - - online hdisk32
Disk_21 auto - - LVM hdisk27


VxVM creates virtual objects and makes logical connections between the objects. The virtual objects are then used by VxVM to do storage management tasks.


Disk groups


A disk group is a collection of disks that shares a common configuration, and is managed by VxVM. A disk group configuration is a set of records with detailed information about related VxVM objects, their attributes, and their connections. A disk group name can be up to 31 characters long.



You can create additional disk groups when you need them. Disk groups allow you to group disks into logical collections. A disk group and its components can be moved as a unit from one host machine to another.


VM disks


When you place a physical disk under VxVM control, a VM disk is assigned to the physical disk. A VM disk is under VxVM control and is usually in a disk group. Each VM disk corresponds to one physical disk. VxVM allocates storage from a contiguous area of VxVM disk space.
A VM disk typically includes a public region (allocated storage) and a small private region where VxVM internal configuration information is stored.
Each VM disk has a unique disk media name, called a virtual disk name. You can either define a disk name of up to 31 characters, or allow VxVM to assign a default name of diskgroup(number), where diskgroup is the name of the disk group to which the disk belongs. Figure 3 shows an example.




Figure 3. VM Disk


VM Disk


Subdisks


A subdisk is a set of contiguous disk blocks. A block is a unit of space on the disk. VxVM allocates disk space using subdisks. A VM disk can be divided into one or more subdisks. Each subdisk represents a specific portion of a VM disk, which is mapped to a specific region of a physical disk.
The default name for a VM disk is diskgroup(number). The default name for a subdisk is diskgroup(number-number), as shown in Figure 4, where diskgroup is the name of the disk group to which the disk belongs.




Figure 4. Subdisk


Subdisk


A VM disk can contain multiple subdisks, but subdisks cannot overlap or share the same portions of a VM disk. Figure 5 shows a VM disk with three subdisks. The VM disk is assigned to one physical disk.




Figure 5. Three subdisks assigned to one VM Disk


Three subdisks assigned to one VM Disk


Plexes


VxVM uses subdisks to build virtual objects called plexes. A plex consists of one or more subdisks located on one or more physical disks. For example, the plex vol01-01 is shown in Figure 6.




Figure 6. A plex with two subdisks


A plex with two subdisks


Volumes


A volume is a virtual disk device that appears to applications, databases, and file systems like a physical disk device, but does not have the physical limitations of a physical disk device. A volume consists of one or more plexes, each holding a copy of the selected data in the volume. Due to its virtual nature, a volume is not restricted to a particular disk or a specific area of a disk.


You can change the configuration of a volume by using VxVM user interfaces. Making configuration changes will not cause disruption to applications or file systems that are using the volume. For example, a volume can be mirrored on separate disks or moved to use different disk storage.


VxVM uses the default naming conventions of vol(number) for volumes and vol(number-number) for plexes in a volume. For ease of administration, you can choose to select more meaningful names for the volumes that you create.




Back to top


VxVM 5.0 installation


This section introduces the VxVM installation and configuration commands you can use to do tasks associated with VxVM objects on AIX versions 5.3 and 6.10.
VxVM relies on the following constantly running daemons and kernel threads for its operation:


vxconfigd

The VxVM configuration daemon maintains disk and group configurations, communicates configuration changes to the kernel, and modifies configuration information stored on disks.

vxiod

VxVM I/O kernel threads provide extended I/O operations without blocking calling processes. By default, 16 I/O threads are started at boot time, and at least one I/O thread must continue to run at all times.

vxrelocd

The hot-relocation daemon monitors VxVM for events that affect redundancy, and performs hot-relocation to restore redundancy.



Before you start installation, make sure that the PATH variable is set properly because
most of the commands used in the installation are in the /sbin or /usr/sbin directory. Add the directories to your PATH environment variable, as shown in Listing 2.



Listing 2. PATH information


For a KSH Shell (or sh), use the command:

# PATH=/sbin:/usr/sbin:/etc/vx/bin:/opt/VRTS/bin:$PATH# export PATH

For a C Shell (csh or tcsh), use the command:

% setenv PATH /sbin:/usr/sbin:/etc/vx/bin:/opt/VRTS/bin:${PATH}


Verifying the OS environment



Veritas Storage Foundation 5.0 from Symantec can only be installed on a system running AIX 5.3 or AIX 6. They must be at the proper maintenance level, with additional AIX patches installed, before installing Veritas Storage Foundation. Check the level of the OS by using the oslevel command on an AIX machine, as shown in Listing 3.



Listing 3. Check OS level


# oslevel
6.1.0.0

# oslevel -rq
Known Recommended Maintenance Levels
------------------------------------
6110-00

# oslevel
5.3.0.0
# oslevel -rq
Known Recommended Maintenance Levels
------------------------------------
5300-07
5300-06
5300-05
5300-04
5300-03
5300-02
5300-01
5380-00


Prerequisites


The following Veritas Storage Foundation packages are required or optional (as noted) for installation.


VRTSperl PERL languageRequired
VRTSspt VERITAS support toolsRequired
VRTSvlic VERITAS licensing utilitiesRequired
VRTSvmdoc VERITAS Volume Manager online guidesOptional
VRTSvmman VERITAS Volume Manager manual pagesOptional
VRTSvmpro VERITAS Volume Manager ProviderRequired for VEA and ISP
VRTSvxvm VERITAS Volume Manager Required
VRTSveki VERITAS Kernel Interface component Required
VRTSvxfs VERITAS File SystemRequired
VRTSddlpr VERITAS Device Discovery Layer ProviderRequired
VRTSfspro VERITAS File System ProviderRequired for VEA, even if you are not installing the VERITAS File System software
VRTSob VERITAS Enterprise Administrator ServiceRequired for VEA and ISP
VRTSobgui VERITAS Enterprise AdministratorRequired for VEA client
VRTSFman VERITAS File System manual pagesOptional
VRTSFsdoc VERITAS File System online guidesOptional



Install Veritas Storage Foundation



To install Storage Foundation, download file sets from the Symantec Web site. It is best practice to check for the data integrity of the file sets by running the cksum command and compare to the source location.



  1. Log in as superuser. Use the
    installp

    command to install the required packages, as shown in Listing 4.



    Listing 4. installp



    Note:- Check the size of the file by using cksum command as below,

    # cksum VRTSvxvm.bff
    1823433071 126310400 VRTSvxvm.bff

    installp command is used as below,

    installp -acXd VRTSvmdoc.bff VRTSvmdoc

    installp -acXd VRTSvmman.bff VRTSvmman

    installp -acXd VRTSveki.bff VRTSveki

    installp -acXd VRTSspt.bff VRTSspt

    installp -acXd VRTSvxvm.bff VRTSvxvm

    installp -acXd VRTSvlic.bff VRTSvlic

    installp -acXd VRTSvxfs.bff VRTSvxfs

    installp -acXd VRTSperl.bff VRTSperl

    Note:- All these commands can be put inside a ksh script and
    installed by invoking that script.


    Use the
    lslpp
    command to verify the complete installation of Veritas VxVM, as shown in Listing 5.




    Listing 5. Verify installation


    # lslpp -l grep -i vrts

    VRTSspt 5.0.1.0 COMMITTED Veritas Support Tools
    VRTSveki 5.0.1.0 COMMITTED Veritas Kernel Interface
    VRTSvlic 5.0.1.0 COMMITTED VRTSvlic Symantec License
    VRTSvxfs 5.0.1.0 COMMITTED Veritas File System
    VRTSvxvm 5.0.1.0 COMMITTED Veritas Volume Manager
    VRTSveki 5.0.1.0 COMMITTED Veritas Kernel Interface
    VRTSvmman 5.0.1.0 COMMITTED Veritas Manual Pages
    VRTSvdoc 5.0.1.0 COMMITTED Veritas Documentation



  2. To install from a CD-ROM, mount a CD-ROM and begin installation as follows.


    1. Log in as superuser.

    2. Place the Veritas software disc in a CD-ROM drive connected to your system.

    3. Mount the CD manually:
      # mkdir -p /mnt/cdrom
      # mount -V cdrfs -o ro /dev/cdN /mnt/cdrom


      where N in /dev/cdN is a number for the CD device configured on the target system.
      Usually the value for N is 0.




      Check the CD device nodes on your system in the /dev directory, or use the method below
      and follow Step 4 onward.
      To invoke the common installer, run the install command on the
      CD as shown below.


      # /mnt/cdrom/CD_NAME/installer




    4. If the VRTSvlic licensing package is not installed, a message asks if you want to install VRTSvlic.
      Follow the instructions to install the package.

    5. If the VRTSvlic licensing package is installed, the Product Status page displays:

      • Products available for installation.

      • Products currently installed.

      • Products that are licensed.

      • Options for operations you can initiate.


      Use the /opt/VRTS/bin/vxlicrep command to view a report of the license type for each product



    6. At the prompt on the Product Status page, enter L to add a license key and
      click Return to begin.

    7. At the next prompt, enter the license key and click Return.

    8. At the Product Status page, enter I for the product installer and click Return. The product installer is displayed.

    9. At the Veritas product installer, enter the number of the product you want to install
      and click Return. The product installation begins automatically.

      At the end of the process, the Veritas product installer is displayed again.



    10. You are prompted to enter the systems' names on which the software is to be installed.
      When prompted, click Enter to continue.




Veritas licensing


Install the license key using the vxlicinst command, as
shown in Listing 6. (The license key below is an example only. For actual installation, the key is obtained from Symantec.)



Listing 6. vxlicinst command output


Install License:-

# /sbin/vxlicinst

Symantec License Manager vxlicinst utility version 3.02.16.0
Copyright (C) 1996-2006 Symantec Corporation. All rights reserved.

Enter your license key : RGCU-CB9F-YCBX-BFYX-OTGH-GN4O-7KYP-PPC

Number of days left for Demo = 150

License key successfully installed for VERITAS Storage Foundation for DB2
License key successfully installed for VERITAS File System
License key successfully installed for VERITAS Volume Manager
License key successfully installed for VERITAS Mapping Services


Other licensing commands


The Veritas licensing commands are in the VRTSvlic package. You must install VRTSvlic for the licensing process to work.

There are two commands:




  • vxlicrep lets you view currently installed licenses.


  • vxlictest retrieves features encoded in a license key and describes them.


Enable the vxconfigd daemon


Execute the commands in Listing 7 to enable the vxconfigd daemon.



Listing 7. Enable the daemon


# vxconfigd -km disable
# vxdctl init
# vxdctl enable


There is more information about the vxconfigd daemon and vxdctl later in this section.


To check the Storage Foundation processes and confirm successful Veritas File System installation, use the following command:



# lsvfs vxfs
vxfs 32 /sbin/helpers/vxfs /sbin/helpers/vxfs


To confirm that the Volume Manager processes (vxconfigd, vxnotify, and vxrelocd)
are running, use:


# ps -e grep vx


Create VxVM disk groups


Listing 8 shows the output of the lspv command without VxVM configuration.



Listing 8. lspv output


# lspv
hdisk0 00b28305ad573b54 rootvg active
hdisk1 none None
hdisk2 none None
hdisk3 00b28305eea1b645 None
hdisk4 00b28305eb18f002 None
hdisk5 none None
hdisk6 none None
hdisk7 none None
hdisk8 none None
hdisk9 none None
hdisk10 none None
hdisk11 none None
hdisk12 none None
hdisk13 none None
hdisk14 00b2830584f972f3 None
hdisk15 00b2830584f9751a None



Now the disks have to be configured as a Veritas Volume disk group (vxvmdg) by initializing and adding disks.
There are two levels of initialization for disks in the Volume Manager:


  • Formatting of the disk media itself. This must be done outside of
    the Volume Manager.

  • Storing identification and configuration information on the disk for use by
    the Volume Manager.



Volume Manager interfaces are provided to step you through this level of disk initialization.


A fully initialized disk can be added to a disk group and used to replace a
previously failed disk, or to create a new disk group.



Listing 9. vxdg command


#cd /etc/vx/bin --this is done because the command vxdg is in this path.

# vxdg -g vxvmdg adddisk vxvmdg1=Disk_10
# vxdg -g vxvmdg adddisk vxvmdg2=Disk_9
# vxdg -g vxvmdg adddisk vxvmdg3=Disk_7
# vxdg -g vxvmdg adddisk vxvmdg4=Disk_6
# vxdg -g vxvmdg adddisk vxvmdg5=Disk_5
# vxdg -g vxvmdg adddisk vxvmdg6=Disk_4
# vxdg -g vxvmdg adddisk vxvmdg7=Disk_3
# vxdg -g vxvmdg adddisk vxvmdg8=Disk_2



Display configured disks


Now you use the vxdisk list command to display various configured disks, as shown in Listing 10.



Listing 10. vxdisk command output



# vxdisk list
DEVICE TYPE DISK GROUP STATUS
Disk_0 auto:none - - online invalid
Disk_1 auto:none - - online invalid
Disk_2 auto:cdsdisk vxvmdg8 vxvmdg online
Disk_3 auto:cdsdisk vxvmdg7 vxvmdg online
Disk_4 auto:cdsdisk vxvmdg6 vxvmdg online
Disk_5 auto:cdsdisk vxvmdg5 vxvmdg online
Disk_6 auto:cdsdisk vxvmdg4 vxvmdg online
Disk_7 auto:cdsdisk vxvmdg3 vxvmdg online
Disk_8 auto:aixdisk - - online
Disk_9 auto:cdsdisk vxvmdg2 vxvmdg online
Disk_10 auto:cdsdisk vxvmdg1 vxvmdg online
Disk_11 auto:none - - online invalid
Disk_12 auto:LVM - - LVM
Disk_13 auto:cdsdisk - - online aliased
Disk_14 auto:LVM - - LVM
Disk_15 auto:cdsdisk - - online aliased


The disk listing sometimes displays in the format hdisk(number).
Use the format accordingly while configuring with the vxdg command.




Back to top


Troubleshooting and administration


This section includes some troubleshooting tips and common commands used to manage VxVM.


Disks go into Error state



Sometimes, when the disks go into error state, Veritas VxVM is unable to claim those
disks as vxvmdgs. To fix this type of problem, run the following set of commands, in the following order.


To see corresponding mapping between hdisk and Disk lists, run the command in Listing 11.



Listing 11. Solution for disks going to error state



# vxdisk -e list
DEVICE TYPE DISK GROUP STATUS OS_NATIVE_NAME
Disk_0 auto - - online hdisk51
Disk_1 auto - - online hdisk48
Disk_2 auto - - online hdisk47
Disk_3 auto - - online hdisk50
Disk_4 auto - - online hdisk49
Disk_5 auto - - online hdisk46
Disk_6 auto - - online hdisk44
Disk_7 auto - - online hdisk42
Disk_8 auto - - online hdisk45
Disk_9 auto - - offline hdisk43
Disk_10 auto - - online hdisk41
Disk_11 auto - - online hdisk40
Disk_12 auto - - online hdisk38
Disk_13 auto - - online hdisk37
Disk_14 auto - - online hdisk39
Disk_15 auto - - online hdisk36
Disk_16 auto - - online hdisk33
Disk_17 auto - - online hdisk34
Disk_18 auto - - online hdisk31
Disk_19 auto - - online hdisk35
Disk_20 auto - - error hdisk32
Disk_21 auto - - LVM hdisk27
Disk_22 auto - - online hdisk30
Disk_23 auto - - offline hdisk29
Disk_24 auto - - online hdisk28
Disk_25 auto - - LVM hdisk26




In the above listing, Disk_20 is in error state and needs to be fixed
to continue VxVM operation.


To see the list of hdisks with an error state:



Listing 12. Get list


# vxdisk -o alldgs list
DEVICE TYPE DISK GROUP STATUS
Disk_0 auto:none - - online invalid
Disk_1 auto:none - - online invalid
Disk_2 auto:none - - online invalid
Disk_3 auto:none - - online invalid
Disk_4 auto:none - - online invalid
Disk_5 auto:none - - online invalid
Disk_6 auto:aixdisk - - online
Disk_7 auto:none - - online invalid
Disk_8 auto:none - - online invalid
Disk_9 auto - - offline
Disk_10 auto:none - - online invalid
Disk_11 auto:none - - online invalid
Disk_12 auto:none - - online invalid
Disk_13 auto:aixdisk - - online
Disk_14 auto:aixdisk - - online
Disk_15 auto:none - - online invalid
Disk_16 auto:none - - online invalid
Disk_17 auto:none - - online invalid
Disk_18 auto:none - - online invalid
Disk_19 auto:none - - online invalid
Disk_20 auto:cdsdisk - - error
Disk_21 auto:LVM - - LVM
Disk_22 auto:none - - online invalid
Disk_23 auto - - offline
Disk_24 auto:none - - online invalid
Disk_25 auto:LVM - - LVM
#cd /etc/vx/bin


Try to use the vxdisksetup and vxdiskunsetup commands to format the hdisk, as shown in Listing 13.



Listing 13. vxdisksetup and vxdiskunsetup


# /etc/vx/bin/vxdisksetup -if Disk_20 format=aixdisk
VxVM vxdisk ERROR V-5-1-5433 Device Disk_20: init failed:
Disk sector size is not supported


# /etc/vx/bin/vxdiskunsetup -C Disk_20 format=aixdisk
VxVM vxdiskunsetup ERROR V-5-2-2208 format=aixdisk: Device address must
be of the form enclr_x where

x = one or more decimal digit


Since both the commands are failing to clear the error state, see the
detailed list using the vxdisk command for error one and proper one, as shown in Listing 14.



Listing 14. vxdisk


a) Disk with error state

# vxdisk list Disk_20
Device: Disk_20
devicetag: Disk_20
type: auto
info: format=cdsdisk,privoffset=256
flags: online error private autoconfig
pubpaths: block=/dev/vx/dmp/Disk_20 char=/dev/vx/rdmp/Disk_20
guid: {5d5aa3b8-1dd2-11b2-aeae-2a5848ed1fb8}
udid: AIX%5FVDASD%5FDISKS%5F600507630EFFFD670000000000000115
site: -
errno: Disk is not useable, bad format
Multipathing information:
numpaths: 1
hdisk32 state=enabled

b) Proper one

# vxdisk list Disk_7
Device: Disk_7
devicetag: Disk_7
type: auto
info: format=none
flags: online ready private autoconfig invalid
pubpaths: block=/dev/vx/dmp/Disk_7 char=/dev/vx/rdmp/Disk_7
guid: -
udid: AIX%5FVDASD%5FDISKS%5F600507630EFFFD670000000000000122
site: -
Multipathing information:
numpaths: 1
hdisk42 state=enabled


Now try with the chpv command:



Listing 15. chpv


# chpv -C hdisk32

# vxdisk list
DEVICE TYPE DISK GROUP STATUS
Disk_0 auto:none - - online invalid
Disk_1 auto:none - - online invalid
Disk_2 auto:none - - online invalid
Disk_3 auto:none - - online invalid
Disk_4 auto:none - - online invalid
Disk_5 auto:none - - online invalid
Disk_6 auto:aixdisk - - online
Disk_7 auto:none - - online invalid
Disk_8 auto:none - - online invalid
Disk_9 auto - - offline
Disk_10 auto:none - - online invalid
Disk_11 auto:none - - online invalid
Disk_12 auto:none - - online invalid
Disk_13 auto:aixdisk - - online
Disk_14 auto:aixdisk - - online
Disk_15 auto:none - - online invalid
Disk_16 auto:none - - online invalid
Disk_17 auto:none - - online invalid
Disk_18 auto:none - - online invalid
Disk_19 auto:none - - online invalid
Disk_20 auto:cdsdisk - - error
Disk_21 auto:LVM - - LVM
Disk_22 auto:none - - online invalid
Disk_23 auto - - offline
Disk_24 auto:none - - online invalid
Disk_25 auto:LVM - - LVM


# lspv
hdisk26 00cc17cec566971d rootvg active
hdisk27 00cc17ceebb54c8c rootvg active
hdisk28 none None
hdisk29 none VeritasVolumes
hdisk30 none None
hdisk31 none None
hdisk32 none VeritasVolumes
hdisk33 none None
hdisk34 none None
hdisk35 00cc17ce59d7d248 None
hdisk36 none None
hdisk37 none VeritasVolumes
hdisk38 none None
hdisk39 none VeritasVolumes
hdisk40 none None
hdisk41 none None
hdisk42 none None
hdisk43 none VeritasVolumes
hdisk44 none VeritasVolumes
hdisk45 none None
hdisk46 none None
hdisk47 00cc17cee3638f87 None
hdisk48 00cc17cee2ea1ed0 None
hdisk49 00cc17cee2ea1f4d None
hdisk50 00cc17cee2ea1fe1 None
hdisk51 00cc17cec8c84486 None



Even after executing the chpv command, the Veritas volumes tag is not removed.

Try enabling and disabling with the vxconfigd daemon.



Listing 16. vxconfigd


# vxconfigd -k

# vxdisk scandisks

# lspv
hdisk26 00cc17cec566971d rootvg active
hdisk27 00cc17ceebb54c8c rootvg active
hdisk28 none None
hdisk29 none VeritasVolumes
hdisk30 none None
hdisk31 none None
hdisk32 none VeritasVolumes
hdisk33 none None
hdisk34 none None
hdisk35 00cc17ce59d7d248 None
hdisk36 none None
hdisk37 none VeritasVolumes
hdisk38 none None
hdisk39 none VeritasVolumes
hdisk40 none None
hdisk41 none None
hdisk42 none None
hdisk43 none VeritasVolumes
hdisk44 none VeritasVolumes
hdisk45 none None
hdisk46 none None
hdisk47 00cc17cee3638f87 None
hdisk48 00cc17cee2ea1ed0 None
hdisk49 00cc17cee2ea1f4d None
hdisk50 00cc17cee2ea1fe1 None
hdisk51 00cc17cec8c84486 None




The tag is still not removed, and the disk is still in the error state.




Run the set of commands below for up to seek=3 or 4, and then run the other set of commands.
The dd command clears the bad blocks, if any, and the error state is removed.



Listing 17. dd


# dd if=/dev/zero of=/dev/hdisk37 bs=512 seek=0 count=10
10+0 records in
10+0 records out

# dd if=/dev/zero of=/dev/hdisk37 bs=512 seek=1 count=10
10+0 records in
10+0 records out


# dd if=/dev/zero of=/dev/hdisk32 bs=512 seek=0 count=10
10+0 records in
10+0 records out


Now run the vxdisksetup command, and it will clear the error state of the disk.



Listing 18. vxdisksetup


# vxdisksetup -if Disk_20 format=aixdisk

Now the Disk_20 is online:.

Disk_20 auto - - online hdisk32


Adding hdisks into the Veritas Volume data group


Using a command line shell script, hdisks can be added into the
Veritas Volume datagroup(vxvmdg), as shown in Listing 19.



Listing 19. Adding hdisks into Veritas Volume data group(vxvmdg)



# for i in 7 8 9 10 11 12 13 14; do
> vxdg -g vxvmdg adddisk vxvmdg$j=hdisk$i
> (( j += 1 ))
> done

Note:- Here numbers 7,8,9,.... etc indicates hdisk numbers.

Now vxdisk command output displays the added disks as vxvmdg disks.

# vxdisk list
DEVICE TYPE DISK GROUP STATUS
hdisk0 auto:LVM - - LVM
hdisk1 auto:cdsdisk - - online
hdisk2 auto:cdsdisk - - online
hdisk3 auto:none - - online invalid
hdisk4 auto:cdsdisk - - online
hdisk5 auto:none - - online invalid
hdisk6 auto:aixdisk - - online
hdisk7 auto:cdsdisk vxvmdg1 vxvmdg online
hdisk8 auto:cdsdisk vxvmdg2 vxvmdg online
hdisk9 auto:cdsdisk vxvmdg3 vxvmdg online
hdisk10 auto:cdsdisk vxvmdg4 vxvmdg online
hdisk11 auto:cdsdisk vxvmdg5 vxvmdg online
hdisk12 auto:aixdisk vxvmdg6 vxvmdg online
hdisk13 auto:aixdisk vxvmdg7 vxvmdg online
hdisk14 auto:cdsdisk vxvmdg8 vxvmdg online



Other administrative commands


You can also use the following commands to handle Veritas VxVM:




vxdiskadm

The Volume Manager Support Operations menu interface, which provides a menu of disk operations. Each entry in the main menu leads you through a particular operation by providing information and asking questions. Default answers are provided for many questions, so common answers can be selected quickly.


vxdiskadd


Use this utility to add standard disks to the Volume Manager. vxdiskadd leads you through initializing a new disk by displaying information and asking questions.


vxdisk


A command-line utility for administering disk devices. You can use vxdisk to define special disk devices, to initialize information stored on disks that the Volume Manager uses to identify and manage disks, and to perform additional special operations.


vxdg

The command-line utility for operating on disk groups. You can use it to create new disk groups, to add and remove disks from disk groups, and to enable (import) or disable (deport) access to disk groups.


vxdisk list

Lists disk information and displays spare disks with a spare flag.


vxprint

Lists disk and other information, and displays spare disks with a SPARE flag.


Listing 20 shows an example of using the vxdiskadm command to control various Volume Manager operations.
Any of these options can be selected for the required operation to be performed.



Listing 20. vxdiskadm usage


# vxdiskadm

Volume Manager Support Operations
Menu: VolumeManager/Disk

1 Add or initialize one or more disks
2 Remove a disk
3 Remove a disk for replacement
4 Replace a failed or removed disk
5 Mirror volumes on a disk
6 Move volumes from a disk
7 Enable access to (import) a disk group
8 Remove access to (deport) a disk group
9 Enable (online) a disk device
10 Disable (offline) a disk device
11 Mark a disk as a spare for a disk group
12 Turn off the spare flag on a disk
13 Unrelocate subdisks back to a disk
14 Exclude a disk from hot-relocation use
15 Make a disk available for hot-relocation use
16 Prevent multipathing/Suppress devices from VxVM's view
17 Allow multipathing/Unsuppress devices from VxVM's view
18 List currently suppressed/non-multipathed devices
19 Change/Display the default disk layouts
20 Mark a disk as allocator-reserved for a disk group
21 Turn off the allocator-reserved flag on a disk
22 Change the disk naming scheme
list List disk information


? Display help about menu
?? Display help about the menuing system
q Exit from menus

Select an operation to perform:

Below is the example for creating volume group vxvmdg and adding a disk to it.


Select an operation to perform: 1

Add or initialize disks
Menu: VolumeManager/Disk/AddDisks

Use this operation to add one or more disks to a disk group. You can
add the selected disks to an existing disk group or to a new disk group
that will be created as a part of the operation. The selected disks may
also be added to a disk group as spares. Or they may be added as
nohotuses to be excluded from hot-relocation use. The selected
disks may also be initialized without adding them to a disk group
leaving the disks available for use as replacement disks.

More than one disk or pattern may be entered at the prompt. Here are
some disk selection examples:

all: all disks
hdisk8: a single disk (in the hdisk# naming scheme)
scsi3 : all disks on scsi controller 3
fscsi6 : all disks on fiber controller 6
xyz_0 : a single disk (in the enclosure based naming scheme)
xyz_ : all disks on the enclosure whose name is xyz

Select disk devices to add: [(pattern-list),all,list,q,?] hdisk2

Here is the disk selected. Output format: [Device_Name]

hdisk2

Continue operation? [y,n,q,?] (default: y) y

You can choose to add this disk to an existing disk group, a
new disk group, or leave the disk available for use by future
add or replacement operations. To create a new disk group,
select a disk group name that does not yet exist. To leave
the disk available for future use, specify a disk group name
of "none".

Which disk group [<group>,none,list,q,?] (default: none) vxvmdg

Create a new group named vxvmdg? [y,n,q,?] (default: y) y

Create the disk group as a CDS disk group? [y,n,q,?] (default: y) y

Use a default disk name for the disk? [y,n,q,?] (default: y) y

Add disk as a spare disk for vxvmdg? [y,n,q,?] (default: n) y

Add site tag to disk? [y,n,q,?] (default: n) y

A new disk group will be created named vxvmdg and the selected
disks will be added as spares to the disk group with default
disk names.

hdisk2


Now you can use lspv or vxdisk to see that hdisk1 has been added to the vxvmdg group.


Listing 21 shows how to use vxdg to destroy any unwanted disk group entries.



Listing 21. Using vxdg to destroy unwanted disk group entry



#cd /etc/vx/bin

# vxdisk -e list
DEVICE TYPE DISK GROUP STATUS OS_NATIVE_NAME
Disk_0 auto - - online hdisk15
Disk_1 auto - - online hdisk14
Disk_2 auto - - online hdisk13
Disk_3 auto - - online hdisk12
Disk_4 auto TCd7-90536 TCg3-90536 online hdisk10
Disk_5 auto TCd6-90536 TCg3-90536 online hdisk9
Disk_6 auto - - online hdisk11
Disk_7 auto TCd5-90536 TCg2-90536 online hdisk8
Disk_8 auto TCd4-90536 TCg2-90536 online hdisk7
Disk_9 auto TCd3-90536 TCg1-90536 online hdisk6
Disk_10 auto - - online hdisk5
Disk_11 auto - - online hdisk4
Disk_12 auto - - LVM hdisk0
Disk_13 auto - - online hdisk1
Disk_14 auto - - LVM hdisk3
Disk_15 auto - - online hdisk2

# for i in 6 7 8 9 10 11;do
> vxdg destroy hdisk$i
> done



# vxdisk -e list
DEVICE TYPE DISK GROUP STATUS OS_NATIVE_NAME
Disk_0 auto - - online hdisk15
Disk_1 auto - - online hdisk14
Disk_2 auto - - online hdisk13
Disk_3 auto - - online hdisk12
Disk_4 auto - - online hdisk10
Disk_5 auto - - online hdisk9
Disk_6 auto - - online hdisk11
Disk_7 auto - - online hdisk8
Disk_8 auto - - online hdisk7
Disk_9 auto - - online hdisk6
Disk_10 auto - - online hdisk5
Disk_11 auto - - online hdisk4
Disk_12 auto - - LVM hdisk0
Disk_13 auto - - online hdisk1
Disk_14 auto - - LVM hdisk3
Disk_15 auto - - online hdisk2



Changing the disk group format type


Listing 22 shows how to change the disk group format type, and how to fix resulting errors.



Listing 22.Changing disk group type




#cd /etc/vx/bin
# for i in 7 6 5 4 3 2;do
> vxdisksetup -if Disk_$i format=aixdisk
> done

# for i in 7 6 5 4 3 2;do
> vxdisksetup -if Disk_$i format=cdsdisk
> done

# vxdg -g vxvmdg adddisk vxvmdg2=hdisk5
VxVM vxdg ERROR V-5-1-6478 Device hdisk5 cannot be added to a CDS disk group

[root@ortega01] /ezcfg/dat
# vxdisk list
DEVICE TYPE DISK GROUP STATUS
hdisk0 auto:LVM - - LVM
hdisk1 auto:cdsdisk - - error
hdisk2 auto:cdsdisk - - error
hdisk3 auto:none - - online invalid
hdisk4 auto:cdsdisk vxvmdg1 vxvmdg online
hdisk5 auto:aixdisk - - online

If you get the above type of error, fix it using:

#/etc/vx/bin/vxdisksetup -if hdisk5 format=cdsdisk

Now run:

# vxdg -g vxvmdg adddisk vxvmdg2=hdisk5

# vxdisk list
DEVICE TYPE DISK GROUP STATUS
hdisk0 auto:LVM - - LVM
hdisk1 auto:cdsdisk - - error
hdisk2 auto:cdsdisk - - error
hdisk3 auto:none - - online invalid
hdisk4 auto:cdsdisk vxvmdg1 vxvmdg online
hdisk5 auto:cdsdisk vxvmdg2 vxvmdg online




Back to top


Summary



This article provided a brief overview of VxVM. You also learned about installation,
configuration, administration, troubleshooting, and some command-line utilities. Though you now have a better understanding of VxVM, it is recommended you go to the Veritas Symantec Web site for more information (see Resources).


Soure: http://www.ibm.com/developerworks/aix/library/au-aixveritas/?S_TACT=105AGY06&

Tuesday, July 08, 2008

Reverse the Contents of File using Perl

You have a log file or whatever file that is in chronological order (oldest record first, the newest records last). And you want to reverse the order.

There is a function in Perl aptly named "reverse" that can perform the task for you.

# cat logfile
1
2
3

# perl -e 'print reverse <>;' logfile
3
2
1

Wednesday, July 02, 2008

ssh: w.x.y.z: Hostname and service name not provided or found

Error when run "ssh -l username w.x.y.z"
ssh: w.x.y.z: Hostname and service name not provided or found

Cause:

When you connect using a TCP/IP address, ssh expects to be able to perform a DNS reverse-lookup for the address provided. If the host name cannot be resolved or resolved to wrong hostname, this error is returned. To resolve the problem, have your DNS admin to correct the reverse DNS lookup.

# nslookup w.x.y.x
make sure it returns the correct hostname


Cause2:

If user root can ssh to remote server while normal user can't, then it means file /etc/resolv.conf does not have enough permisson to normal users.
# ls -l /etc/resolv.conf
# chmod o+r /etc/resolv.conf

Monday, June 30, 2008

Video: AIX 6.1 LivePartition Mobility Demo

Here is a nice little demo of PowerVM and LivePartition mobility on AIX 6.1 on YouTube.

is very impressive to a see an application being migrated from physical machine to another without skipping a bit.

A demonstration of IBM's new PowerVM Lx86 capability - allowing you to run Linux x86 binaries unchanged on POWER-processor based systems. Additionally, the Linux on Power partition is demonstrated being moved between servers while the Linux x86 application is running using PowerVM Live Partition Mobility.

Monday, June 23, 2008

ssh-agent error bind: Invalid argument

Environment:

AIX 5.2 TL10

Fileset Level State Type Description (Uninstaller)
----------------------------------------------------------------------------
openssh.base.client 4.3.0.5201 C F Open Secure Shell Commands
openssh.base.server 4.3.0.5201 C F Open Secure Shell Server
openssh.license 4.3.0.5201 C F Open Secure Shell License
openssh.man.en_US 4.3.0.5201 C F Open Secure Shell
Documentation - U.S. English
openssh.msg.en_US 4.3.0.5201 C F Open Secure Shell Messages -
U.S. English



Problem:

$ ssh-agent
bind: Invalid argument


Solution:

It is a bug in openssh 4.3.0.5201
ssh-agent doesn't work on ssh version 4.3.0.5201

Download and install the latest openssh for AIX from website:(Version 4.7 as June 2008)

http://sourceforge.net/projects/openssh-aix


Download openssl 0.9.8.601 from the following website.
====================================================

https://www14.software.ibm.com/webapp/iwm/web/preLogin.do?source=aixbp

Sunday, June 22, 2008

IBM P series LED code

---------- Dump Progress Indicator ----------

0c0 The dump completed successfully
0c1 The dump failed due to an I/O error.
0c2 A user-requested dump has started. You requested a dump using the SYSDUMPSTART command, a dump key sequence, or the Reset button.

0c3 The dump is inhibit
0c4 The dump did not complete. A partial dump was written to the dump device. There is not enough space on the dump deviceto contain the entire dump. To prevent this problem from occuring again, you must increase the size of your dumpmedia.


0c5 The dump failed to start. An unecpected error occured while the system was attempting to write to the dump media.
0c6 A dump to the secondary dump device was requested. Make the secondary dump device ready, then press CTRL-ALT-NUMPAD2.
0c7 Reserved.
0c8 The dump function is disabled. No primary dump device is configured.
0c9 A dump is in progress.
0cc Unknown dump failure


---------- Diagnostics Load Progress Indicators -----------

c00 AIX Install/Maintenance loaded successfully.
c01 Insert the first diagnostic diskette.
c02 Diskettes inserted out of sequence.
c03 The wrong diskette is in the drive.
c04 The loading stopped with an irrecoverable error.
c05 A diskette error occurred.
c08 RAM filesystem started incorrectly.
c07 Insert the next diagnostic diskette.
c09 The diskette drive is reading or writing a diskette.
c20 An unexpected halt occured, and the system is configured to enter the kernel debug program instead of entering asystem dump.

c21 The 'ifconfig' command was unable to configure the network for the client network host.
c22 The 'tftp' command was unable to read client's ClientHostName.info file during a client network boot.
c24 Unable to read client's ClientHostName.info file during a client network boot.
c25 Client did not mount remote miniroot during network install.
c26 Client did not mount the /usr filesystem during the network boot.
c29 System was unable to configure the network device.
c31 Select the console display for the diagnostics. To select "No console display", set the key mode switch to normal thento Service. The diagnostic program will then load and run the diagnostics automatically.

c32 A direct-attached display (HFT) was selected.
c33 a TTY terminal attached to serial ports S1 or S2 was selected.
c34 A file was selected. The console messages store in a file
c40 Configuration files are been restored.
c41 Could not determine the boot type or device.
c42 Extracting data files from diskette.
c43 Diagboot cannot be accessed.
c44 Initialyzing installation database with target disk information.
c45 Cannot configure the console.
c46 Normal installation processing.
c47 Could not create a physical volume identifier (PVID) on disk.
c48 Prompting you for input.
c49 Could not create or form the JFS log.
c50 Creating rootvg volume group on target disk
c51 No paging space were found.
c52 Changing from RAM environment to disk environment.
c53 Not enough space in the /tmp directory to do a preservation installation.
c54 Installing either BOS or additionnal packages.
c55 Could not remove the specified logical volume in a preservation installation.
c56 Running user-defined customization.
c57 Failure to restore BOS.
c58 Display message to turn the key.
c59 Could not copy either device special files, device ODM, or volume group information from RAM to disk.
c61 Failed to create the boot image.
c70 Problem Mounting diagnostics CDROM disc.
c99 Diagnostics have completed. This code is only used when there is no console.


--------Debugger Progress Indicators ----------

c20 Kernel debug program activated. An unexpected system halt has occured, and you have configured the system
to enter the kernel debug program instead of performing a dump.


---------Built-In Self Test (Bist) Indicators---------

100 BIST completed successfully. Control was passed to IPL ROS.
101 BIST started following RESET
102 BIST started following Power-on Reset
103 BIST could not determine the system model number.
104 Equipment conflict. BIST could not find the CBA.
105 BIST could not read the OCS EPROM.
106 BIST detected a module error.
111 OCS stopped. BIST detected a module error.
112 A checkstop occured during BIST.
113 BIST checkstop count is greater than 1.
120 BIST starting a CRC check on the 8752 EPROM.
121 BIST detected a bad CRC in the first 32K of the OCS EPROM.
122 BIST started a CRC check on the first 32K of the OCS EPROM.
123 BIST detected a bad CRC on the OCS area of NVRAM.
124 BIST started a CRC check on the OCS area of NVRAM.
125 BIST detected a bad CRC on the time-of-day area of NVRAM.
126 BIST started a CRC check on the time-of-day area of the NVRAM.
127 BIST detected a bad CRC on the 8752 EPROM.
130 BIST presence test started.
140 BIST failed: procedure error
142 BIST failed: procedure error
143 Invalid memory configuration.
144 BIST failed; procedure error.
151 BIST started AIPGM test code.
152 BIST started DCLST test code.
153 BIST started ACLST test code.
154 BIST started AST test code.
160 Bad EPOW Signal/Power status signal
161 BIST being conducted on BUMP I/O
162 BIST being conducted on JTAG
163 BIST being conducted on Direct I/O
164 BIST being conducted on CPU
165 BIST being conducted on DCB and Memory
166 BIST being conducted on interrupts
170 BIST being conducted on 'Multi-Processor
180 BIST logout failed.
182 BIST COP bus not responding
185 A checkstop condition occured during the BIST
186 System logic-generated checkstop (Model 250 only)
187 Graphics-generated checkstop (Model 250)
195 BIST logout completed.
888 BIST did not start


------- Power-On Self Test -------

200 IPL attempted with keylock in the SECURE position.
201 IPL ROM test failed or checkstop occured (irrecoverable)
202 IPL ROM test failed or checkstop occured (irrecoverable)
203 Unexpected data storage interrupt.
204 Unexpected instruction storage interrupt.
205 Unexpected external interrupt.
206 Unexpected alignment interrupt.
207 Unexpected program interrupt.
208 Unexpected floating point unavailable interrupt.
209 Unexpected SVC interrupt.
20c L2 cache POST error. (The display shows a solid 20c for 5 seconds
210 Unexpected SVC interrupt.
211 IPL ROM CRC comparison error (irrecoverable).
212 RAM POST memory configuration error or no memory found (irrecoverable).
213 RAM POST failure (irrecoverable).
214 Power status register failed (irrecoverable).
215 A low voltage condition is present (irrecoverable).
216 IPL ROM code being uncompressed into memory.
217 End of bootlist encountered.
218 RAM POST is looking for 1M bytes of good memory.
219 RAM POST bit map is being generated.
21c L2 cache is not detected. (The display shows a solid 21c for 5 sec)
220 IPL control block is being initialized.
221 NVRAM CRC comparison error during AIX.
IPL(Key Mode Switch in Normal mode).
Reset NVRAM by reaccomplishing IPL in Service mode. For systems with an internal, direct-bus-attached(DBA)disk,IPL
ROM attempted to perform an IPL from that disk before halting with this three-digit display value.
222 Attempting a Normal mode IPL from Standard I/O planar attached devices specified in NVRAM IPL Devices List.
223 Attempting a Normal mode IPL from SCSI attached devices specified in NVRAM IPL Devices List.
Note: May be caused by incorrect jumper setting for external SCSI devices or by incorrect SCSI terminator.
REFER FFC B88
224 Attempting a Normal mode restart from 9333 subsystem device specified in NVRAM device list.
225 Attempting a Normal mode IPL from IBM 7012 DBA disk attached devices specified in NVRAM IPL Devices List.
226 Attempting a Normal mode restart from Ethernet specified in NVRAM device list.
227 Attempting a Normal mode restart from Token Ring specified in NVRAM device list.
228 Attempting a Normal mode IPL from NVRAM expansion code.
229 Attempting a Normal mode IPL from NVRAM IPL Devices List; cannot IPL from any of the listed devices, or there are
no valid entry in the Devices List.
22c Attempting a normal mode IPL from FDDI specified in NVRAM IPL device list.
230 Attempting a Normal mode restart from adapter feature ROM specified in IPL ROM devices list.
231 Attempting a Normal mode restart from Ethernet specified in IPL ROM devices list.
232 Attempting a Normal mode IPL from Standard I/O planar attached devices specified in Rom Default Device List.
233 Attempting a Normal mode IPL from SCSI attached devices specified in IPL ROM Default Device List.
234 Attempting a Normal mode restart from 9333 subsystem device specified in IPL ROM device list.
235 Attempting a Normal mode IPL from IBM 7012 DBA disk attached devices specified in IPL ROM Default Device List.
236 Attempting a Normal mode restart from Ethernet specified in IPL ROM default devices list.
237 Attempting a Normal mode restart from Token Ring specified in IPL ROM default device list.
238 Attempting a Normal mode restart from Token Ring specified by the operator.
239 System failed to restart from the device chosen by the operator.
23c Attempting a normal mode IPL from FDDI specified in IPL ROM device list.
240 Attempting a Service mode restart from adapter feature ROM.
241 Attempting a Normal mode IPL from devices specified in the NVRAM IPL Devices List.
242 Attempting a Service mode IPL from Standard I/O planar attached devices specified in NVRAM IPL Devices List.
243 Attempting a Service mode IPL from SCSI attached devices specified in NVRAM IPL Devices List.
244 Attempting a Service mode restart from 9333 subsystem device specified in NVRAM device list.
245 Attempting a Service mode IPL from IBM 7012 DBA disk attached devices specified in NVRAM IPL Devices List.
246 Attempting a Service mode restart from Ethernet specified in NVRAM device list.
247 Attempting a Service mode restart from Token Ring specified in NVRAM device list.
248 Attempting a Service mode IPL from NVRAM expansion code.
249 Attempting a Service mode IPL from NVRAM IPL Devices List; cannot IPL from any of the listed devices, or there areno valid entries in the Devices List.

24c Attempting a service mode IPL from FDDI specified in NVRAM IPL device list.
250 Attempting a Service mode restart from adapter feature ROM specified in IPL ROM device list.
251 Attempting a Service mode restart from Ethernet specified in IPL ROM device list.
252 Attempting a Service mode IPL from standard I/O planar attached devicesspecified in ROM Default Device List.
253 Attempting a Service mode IPL from SCSI attached devices specified in IPL ROM Default Device List.
254 Attempting a Service mode restart from 9333 subsystem device specified in IPL ROM device list.
255 Attempting a Service mode IPL from IBM 7012 DBA disk'attached devices specified in IPL ROM Default Devices List.
256 Attempting a Service mode restart from Ethernet specified in IPL ROM default device list.
257 Attempting a Service mode restart from Token Ring specified in IPL ROM default device list.
258 Attempting a Service mode restart from Token Ring specified by the operator.
259 Attempting a Service mode restart from FDDI specified by the operator.

25c Attempting a normal mode IPL from FDDI specified in IPL ROM device list.
260 Information is being displayed on the display console.
261 Information will be displayed on the tty terminal when the "1" key is pressed on the tty terminal keyboard.
262 A keyboard was not detected as being connected to the system's
NOTE: Check for blown planar fuses or for a corrupted boot on disk drive
263 Attempting a Normal mode restart from adapter feature ROM specified in NVRAM device list.
269 Stalled state - the system is unable to IPL
271 Mouse port POST.
272 Tablet port POST.
277 Auto Token-Ring LANstreamer MC 32 Adapter
278 Video ROM Scan POST.
279 FDDI adapter POST.
280 3COM Ethernet POST.
281 Keyboard POST executing.
282 Parallel port POST executing
283 Serial port POST executing
284 POWER Gt1 graphadapte POST executing
285 POWER Gt3 graphadapte POST executing
286 Token Ring adapter POST executing.
287 Ethernet adapter POST executing.
288 Adapter card slots being queried.
289 GTO POST.
290 IOCC POST error (irrecoverable).
291 Standard I/O POST running.
292 SCSI POST running.
293 IBM 7012 DBA disk POST running.
294 IOCC bad TCW SIMM in slot location J being tested.
295 Graphics Display adapter POST, color or grayscale.
296 ROM scan POST.
297 System model number does not compare between OCS and ROS
(irrecoverable). Attempting a software IPL.
298 Attempting a software IPL (warm boot).
299 IPL ROM passed control to the loaded program code.
301 Flash Utility ROM failed or checkstop occured (irrecoverable)
302 Flash Utility ROM failed or checkstop occured (irrecoverable)
302 Flash Utility ROM: User prompt, move the key to the service in order to perform an optional Flash Update. LED
will only appear if the key switch is in the SECURE position. This signals the user that a Flash Update may be
initiated by moving the key switch to the SERVICE position. If the key is moved to the SERVICE position,
LED 303 will be displayed. This signals the user to press the reset button and select optional Flash Update.
303 Flash Utility ROM: User prompt, press the reset button in order to perform an optional Flash Update. LED
only appear if the key switch is in the SECURE position. This signals the user that a Flash Update may be initiated
by moving the key switch to the SERVICE position. If the key is moved to the SERVICE position, LED 303 will be
displayed. This signals the user to press the reset button and select optional Flash Update.
304 Flash Utility ROM IOCC POST error (irrecoverable)
305 Flash Utility ROM standard I/O POST running.
306 Flash Utility ROM is attempting IPL from Flash Update Boot Image.
307 Flash Utility ROM system model number does not compare between OCS and ROM (irrecoverable).
308 Flash Utility ROM: IOCC TCW memory is being tested.
309 Flash Utility ROM passed control to a Flash Update Boot Image.
311 Flash Utility ROM CRC comparison error (irrecoverable).
312 Flash Utility ROM RAM POST memory configuration error or no memory found ( iirecoverable).
313 Flash Utility ROM RAM POST failure( irrecoverable).
314 Flash Utility ROM Power status register failed (irrecoverable).
315 Flash Utility ROM detected a low voltage condition.
318 Flash Utility ROM RAM POST is looking for good memory.
319 Flash Utility ROM RAM POST bit map is being generated.
322 CRC error on media Flash Image. No Flash Update performed.
323 Current Flash Image is being erased.
324 CRC error on new Flash Image after Update was performed. (Flash Image is corrupted).
325 Flash Image successful and complete.

500 Querying Native I/O slot.
501 Querying card in Slot 1
502 Querying card in Slot 2
503 Querying card in Slot 3
504 Querying card in Slot 4
505 Querying card in Slot 5
506 Querying card in Slot 6
507 Querying card in Slot 7
508 Querying card in Slot 8
510 Starting device configuration.
511 Device configuration completed.
512 Restoring device configuration files from media.
513 Restoring basic operating system installation files from media.
516 Contacting server during network boot
517 Mounting client remote file system during network IPL.
518 Remote mount of the root and /usr filesystems failed during network boot.
520 Bus configuration running.
521 /etc/init invoked cfgmgr with invalid options; /etc/init has been corrupted or incorrectly modified
(irrecoverable error).
522 The configuration manager has been invoked with conflicting options (irrecoverable error).
523 The configuration manager is unable to access the ODM database (irrecoverable error).
524 The configuration manager is unable to access the config rules object in the ODM database (irrecoverable error).
525 The configuration manager is unable to get data from a customized device object in the ODM database
(irrecoverable error).
526 The configuration manager is unable to get data from a customized device driver objet in the ODM database
(irrecoverable error).
527 The configuration manager was invoked with the phase 1 flag; running phase 1 flag; running phase 1 at this point
is not permitted (irrecoverable error).
528 The configuration manager cannot find sequence rule, or no program was specified in the ODM database
(irrecoverable error).
529 The configuration manager is unable to update ODM data
(irrecoverable error).
530 The program "savebase" returned an error.
531 The configuration manager is unable to access PdAt object class
(irrecoverable eroor)
532 There is not enough memory to continue (malloc failure);
irrecoverable error.
533 The configuration manager could not find a configure method for a device.
534 The configuration manager is unable to aquire database lock. irrecoverable error.
536 The configuration manager encountered more than one sequence rule specified in the same phase. (irrecoverable error).
537 The configuration manager encountered an error when invoking the program in the sequence rule.
538 The configuration manager is going to invoke a configuration
539 The configuration method has terminated, and control has returned to the configuration manager.
551 IPL Varyon is running

552 IPL Varyon failed.
553 IPL phase 1 is complete.
554 Unable to define NFS swap device during network boot
555 Unable to define NFS swap device during network boot
556 Logical Volume Manager encountered error during IPL varyon.
557 The root filesystem will not mount.
558 There is not enough memory to continue the IPL.
559 Less than 2MB of good memory are available to load the AIX kernel.
570 Virtual SCSI devices being configured.
571 HIPPI common function device driver being configured.
572 HIPPI IPI-3 master transport driver being configured.
573 HIPPI IPI-3 slave transport driver being configured.
574 HIPPI IPI-3 transport services user interface device driver being configured.
576 Generic async device driver being configured.
577 Generic SCSI device driver being configured.
578 Generic commo device driver being configured.
579 Device driver being configured for a generic device.
580 HIPPI TCPIP network interface driver being configured.
581 Configuring TCP/IP.
582 Configuring token ring data link control.
583 Configuring an Ethernet data link control.
584 Configuring an IEEE ethernet data link control.
585 Configuring an SDLC MPQP data link control.
586 Configuring a QLLC X.25 data link control.
587 Configuring NETBIOS.
588 Configuring a Bisync Read-Write (BSCRW).
589 SCSI target mode device being configured.
590 Diskless remote paging device being configured.
591 Configuring an LVM device driver
592 Configuring an HFT device driver
593 Configuring SNA device drivers.
594 Asynchronous I/O being defined or configured.
595 X.31 pseudo device being configured.
596 SNA DLC/LAPE pseudo device being configured.
597 OCS software being configured.
598 OCS hosts being configured during system reboot.
599 Configuring FDDI data link control.
5c0 Streams-based hardware drive being configured.
5c1 Streams-based X.25 protocol being configured.
5c2 Streams-based X.25 COMIO emulator driver being configured.
5c3 Streams-based X.25 TCP/IP interface driver being configured.
5c4 FCS adapter device driver being configured.
5c5 SCB network device driver for FCS is being configured.
5c6 AIX SNA channel being configured.
600 Starting network boot portion of /sbin/rs.boot
602 Configuring network parent devices.
603 /usr/lib/methods/defsys
/usr/lib/methods/cggsys, or
/usr/lib/methods/cggbus failed.
604 Configuring physical network boot device.
605 Configuring physical network boot device failed.
606 Running /usr/sbin/ifconfig on logical network boot device.
607 /usr/sbin/ifconfig failed.
608 Attempting to retrieve the client.info file with tftp. Note that a flashing 608 indicates multiple attempts
to retrieve the client_info file are occuring.
609 The client.info file does not exist or it is zero length.
610 Attempting remote mount of NFS file system
611 Remote mount of the NFS filesystem failed.
612 Accessing remote files; unconfiguring network boot device.
614 Configuring local paging devices.
615 Configuring of a local paging device failed.
616 Converting from diskette to dataless configuration.
617 Diskless to dataless configuration failed.
618 Configuring remote (NFS) paging devices.
619 Configuration of a remote (NFS) paging device failed.
620 Updating special device files and ODM in permanent filesystem with data from boot RAM filesystem.
622 Boot process configuring for operating system installation.

650 IBM SCSD disk drive drive being configured
700 Progress indicator. A 1.1GB 8-bit SCSI disk drive being identified or configured.
701 Progress indicator. A 1.1GB 16-bit SCSI SE disk drive being identified or configured.
702 Progress indicator. A 1.1GB 16-bit SCSI differential disk drive being identified or configured.
703 Progress indicator. A 2.2GB 8-bit SCSI disk drive being identified or configured.
704 Progress indicator. A 2.2GB 16-bit SCSI SE disk drive being identified or configured.
705 The configuration method for the 2.2GB 16-bit differential SCSI disk drive is being run. If a irrecoverableerror occurs, the system halts. identified or configured.

706 Progress indicator. A 4.5GB 16-bit SE SCSI disk drive is being identified or configured.
707 Progress indicator. A 4.5GB 16-bit differential SCSI drive is being identified or configured.
708 Progress indicator: A L2 cache is being identified or configured.
710 POWER GXT150M graphics adapterbeing ientifyied or configured.
711 Unknown adapter being identified or configured.
712 Graphics slot bus configuration is executing.
713 The IBM ARTIC960 device is being configured.
714 A video capture adapter is being configured.
715 The Ultimedia Services audio adapter is being configured. This LED displays briefly on the panel.
720 Unknown read/write optical drive type being configured.
721 Unknown disk or SCSI device being identified or configured.
722 Unknown disk being identified or configured.
723 Unknown CDROM being identified or configured.
724 Unknown tape drive being identified or configured.
725 Unknown display being identified or configured.
726 Unknown input device being idenor configured
727 Unknown adync device being idenor configured

IBM Official AIX6 & POWER6 Hands-On Technical Demo Movies

http://www-941.ibm.com/collaboration/wiki/display/WikiPtype/Movies

How to delete file with special characters

Sometimes some people create a file with special character like "-s" in the filename.

If you use

 rm -s 

or
 rm "-s" 


You will get an error that '-s' is not a valid parameter.

You can add a "--" before the filename.


Example:
Display its content:
cat -- -s

List the file:
ls -l -- -s

Delete the file:
rm -- -s

Wednesday, June 18, 2008

Getting Rid of the Amber Attention Light

Getting Rid of the Amber Attention Light



  Question Getting Rid of the Amber Attention Light   Answer
 

Question


How can I turn off the amber attention light in the operator's panel?

Answer


- diag --> Task Selection --> Log Repair Action ==> Select sysplanar0


OR


- diag --> Task Selection --> Identify and Attention Indicators --> Set System
Attention Indicator to NORMAL


OR


- /usr/lpp/diagnostics/bin/usysfault -s normal

Friday, June 13, 2008

How to test ftp throughput in UNIX

When you have performance issue with the network or ftp transfer, you can use test the throughput by using pipe and dd command.

The following example transfer a 10000 X 32k blocksize of data to /dev/null in remote server. So no file will be overwritten.

$ ftp remote_server

ftp> bin

200 Type set to I.

ftp> put "|dd if=/dev/zero bs=32k count=10000" /dev/null

200 PORT command successful.

150 Opening data connection for /dev/null.

10000+0 records in.

10000+0 records out.

226 Transfer complete.

327680000 bytes sent in 28.91 seconds (1.107e+04 Kbytes/s)

local: dd if=/dev/zero bs=32k count=10000 remote: /dev/null

ftp> bye

in the test above we get 1.107e+04 Kbytes/s, which is 11070Kb/s. And it is a 100Mb/s NIC card. So the network throughput is normal.

Wednesday, June 11, 2008

AIX Updates With Multibos

Starting with AIX* 5.3 Technology Level (TL) 3, the new multibos utility has been provided that allows an AIX administrator to create and maintain two separate, bootable instances of the AIX OS within the same root volume group (rootvg). This second instance of rootvg is known as a standby Base Operating System (BOS) and is an extremely handy tool for performing AIX TL and Service Pack (SP) updates.


Multibos lets you install, update and customize a standby instance of the AIX OS without impacting the running and active production instance of the AIX OS. This is valuable in environments with tight maintenance windows. Instead of requiring an outage window of several hours to apply a new TL or SP, you’ll only need a small outage at a convenient time to reboot the system. This may help reduce the size of the after-hours effort often required when performing AIX updates, as all the maintenance activities can be performed during business hours. After hours you could log in from home and reboot the system.


Backing out from an AIX TL update is also made easier with multibos. To go back to a previous TL, you reboot the system on the original AIX instance boot logical volume (BLV). It’s also possible to update several AIX systems at once using multibos, which again reduces the amount of after-hours effort required when performing AIX maintenance activities.


Multibos is similar to an alternate disk installation. However, there are several differences between the two methods, one of which is that there’s no need for an additional disk to clone the rootvg. Both utilities can be used to achieve the same goal. Choose the one that’s the best fit for your AIX environment.


Getting Started


Before attempting to use multibos, check that the prerequisites have been met. First, the system must be running AIX 5.3 with TL3 or higher. Next, ensure that there’s enough free space in rootvg for a copy of each BOS logical volume (LV). By default, the BOS file systems in rootvg(/, /usr, /var, and /opt) and the BLV are copied. All other file systems and LVs are shared between BOS instances. Check the number of free physical partitions in rootvg (i.e., # lsvg rootvg | grep FREE). If all of the requirements can’t be met, then a traditional update should be performed.


Ensure that you document the system and perform a mksysb before performing any maintenance activity.


Creating a Standby BOS Instance


In the following example we’ll upgrade an AIX 5.3 system from TL4 to TL6. Before starting, remove any previous standby BOS instance and associated log file using “multibos –R.” This creates a clean environment and makes reviewing the log file easier. Then preview the operation first (using “multibos –sXp”) and review the multibos log for any errors (i.e., “alog –of/etc/multibos/ logs/op.alog”).


After a successful preview, create the standby BOS instance. This may take several minutes and should create a new LV and file system for each BOS copy. Each new LV and file system is prefixed by bos_. You should review the log file for errors. See Code Sample 1.


We can now start a multibos shell and verify the standby BOS and its current TL. See Code Sample 2.


Updating and Booting the Standby BOS


Now we can apply TL6 to the standby BOS. The TL6 lppsource is mounted from our Network Installation Manager (NIM) master. Perform a preview operation and then execute the actual update to the standby instance. Again, checking the log file for any issues:


# mount nimmast:/export/lpp_source/lpp_sourceaix530603 /mnt

# multibos -Xacp -l /mnt

# multibos -Xac -l /mnt


We’ve now successfully applied TL6 to the standby BOS. Start a multibos shell again and verify that the standby BOS TL has been updated:


# multibos –S

...

# oslevel -s

5300-06-03-0732

# exit


We’re now ready to boot the standby BOS, which can be performed some time after the standby instance has been updated. The BOS may be upgraded during the day, but the system may be restarted after hours depending on the available outage windows for this system. Thus far, all maintenance activities have been performed on a live production system without the need for an outage. Before rebooting, verify the bootlist and ensure that the BLV is set to the standby BOS (bos_hd5).


When booting a standby BOS instance you can check that the correct BLV is being used by comparing the output from the bootlist command with the output from the “Welcome to AIX” banner. You should record the output from the bootlist command, as it may come in handy if issues arise later. In Code Sample 3, the BLV hd5 relates to device 2. Code Sample 4 displays what should appear during system startup.


Reboot the system now with the “shutdown –Fr” command. After the reboot, confirm the TL level via the “oslevel –r” command. You can also verify which BLV the system booted from with the “bootinfo –v” command.


The multibos LVs and file systems are now open and mounted. The original file systems are renamed with a bos_ prefix but their original LV names are preserved.


If you need to back out of the update and return to the previous TL, all that’s required is to boot the previous (“original”) BOS instance. Set the bootlist and verify that the BLV is set to the previous BOS instance (hd5):


# bootlist -m normal hdisk0 blv=hd5 hdisk0 blv=bos_hd5

# bootlist -m normal -o

hdisk0 blv=hd5

hdisk0 blv=bos_hd5


Now reboot the system and confirm that it’s running at the previous TL.


It’s worth mentioning that if the system fails to boot the standby BOS, you can attempt to start the system in maintenance mode (e.g., via NIM) and change the bootlist to point at the alternate BLV. If required—in rare cases—you can also boot the system from the open firmware prompt. You can reach the open firmware prompt by hitting the 8 key while booting. From the boot prompt you can specify the desired boot device, as shown here:


0> boot /vdevice/v
scsi@30000004/disk@8100000000000000:4 |


/vdevice -

Virtual I/O Bus

/v-scsi@30000004 -

Virtual I/O SCSI Adapter

/disk@8100000000000000:4

- Virtual I/O SCSI Disk Device


Multibos and dsh


It’s possible to perform multibos operations on several systems at once using multibos and the dsh command. The dsh command allows you to execute commands on multiple hosts in parallel. The example in Code Sample 5 (right) will perform multibos operations on all six hosts specified.


After the reboot, verify all of the hosts have been updated by running the “dsh oslevel –r” and “dsh oslevel –s” commands.


All of this work (up to the point of needing to reboot) can be carried out on live production systems without an outage.


Powerful Administration Tool


The multibos command is a powerful AIX administration tool. It has the potential to reduce outage windows required for AIX TL maintenance activities and also alleviate some of the after-hours effort on the part of the AIX administrator.


Resources


/usr/lpp/bos/README.multibos

http://publib.boulder.ibm.com/infocenter/systems/topic/com.ibm.aix.install/doc/insgdrf/multibosutility.htm

www.ibm.com/collaboration/wiki/display/WikiPtype/Boot+Process+on+Power

publib16.boulder.ibm.com/doc_link/en_US/a_doc_lib/cmds/aixcmds2/dsh.htm

Labels

BlogCatalog