My blog has moved,please visit the new site

Friday, September 11, 2009

Unknown hostname for Solaris 10 DHCP client

When I installed Solaris 10 x86, my computer thought its hostname was unknown. Aside from being annoying, this seemed to be causing a few issues, so I set about trying to set it to a name of my choice.

Using the uname -S hostname command set the hostname for me but this information didn’t persist on reboot. A bit of googling turned up various references to editing /etc/init.d/network so that it read /etc/nodename and set the hostname accordingly (as well as a script to set the hostname), but my system didn’t have an /etc/nodename file.

I understood that /etc/nodename should contain my computer’s name, but didn’t know if any other settings were required (I later found Jeff Hunter’s TCP/IP quick configuration guide, which confirmed that the file just contains the computer’s name - in my case laptop3).

How to Enable a Solaris DHCPv4 Client to Request a Specific Host Name

On the client system, edit the /etc/default/dhcpagent file as superuser.

Find the REQUEST_HOSTNAME keyword in the /etc/default/dhcpagent file and modify the keyword as follows:

REQUEST_HOSTNAME=yes

If a comment sign (#) is in front of REQUEST_HOSTNAME, remove the #. If the REQUEST_HOSTNAME keyword is not present, insert the keyword.

Edit the /etc/hostname.interface file on the client system to add the following line:

inethostname

hostname is the name that you want the client to use.

Type the following commands to have the client perform a full DHCP negotiation upon rebooting:

# ifconfig interface dhcp release# reboot

The DHCP data that is cached on the client is removed. The client restarts the protocol to request new configuration information, including a new host name. The DHCP server first makes sure that the host name is not in use by another system on the network. The server then assigns the host name to the client. If configured to do so, the DHCP server can update name services with the client's host name.

When topas command is called, it failed with error "Segmentation fault(coredump)" and then exit to command prompt.

Solution:

This issue is occuring when there are more number of tape drives. You can install this fix on all 53TL09SP3 machines.APAR IZ52203 has been opened for this issue. Tentative availabilty date of this APAR would be November 2009.

Wednesday, June 03, 2009

Tried to commit applied Software Updates, failed with the following messages.

MISSING REQUISITES: The following filesets are requisites of one or moreof the selected filesets listed above. They are not currently installedon the system. You should install these requisites to ensure that theselected filesets function correctly. You MUST install these requisitesbefore committing the selected filesets.

Resolving the problembosboot uses the PdDv ODM class files to build device information into the boot image and pre-allocate memory for these devices. If the file is too large, malloc cannot satisfy the request, causing bosboot to fail.

The following instructions can be used to reduce the size of the PdDv.vc file:

AnswerNOTE: Not all processes that show up in ps -ef will be able to have stack traces built on them. Old processes tend to be eventually paged out of memory and neither dbx or kdb will then be able to be used to look at the stack trace for that process.

DBX Stack Trace Instructions for building a stack trace on a hung process:In order to use dbx, the customer must first have the fileset bos.adt.debug installed.

Attach to hung process1. Capture console output, enter: script

2. Enter: ps -ef | grep

3. Enter: dbx -a

4. Format trace, enter: where

5. Leave dbx, enter: detach (Typing quit will kill the process)

6. To leave script, type exit.The script will be named typescript and will be located in the currentworking directory.

The JFS2 snapshot command will create an image of a filesystem at a point in time, allowing the user to back up data from the snapshot rather than from the original filesystem. This allows backing up data without having to stop using it first.The concept used in the snapped filesystem is "copy on write". During creation of the snapshot filesystem the source filesystem is quiesced while the copy is made, to insure a proper copy. Then only the filesystem structure is created. When any modification is done to the source system, such as a write of data or delete, the original data is copied into the snapped filesystem.

Usually a snapshot filesystem will only need to be 2-6% of the size of the original filesystem, due to this copy-on-write feature.

In the lsfs -q output the size is reported in 512-byte blocks. So in the above example the filesystem and logical volume are 2Gb in size. We'll make the snapshot filesystem 204Mb (10% of the original).

# snapshot -o snapfrom=/origfs -o size=419430Snapshot for file system /origfs created on /dev/fslv05

Friday, May 22, 2009

Replacing a disk in an SSA RAID5 Array

Environment

OS level: 4.3.x - 5.x SSA Raid 5 Array

Problem

How do I replace a disk in an SSA RAID5 array?

Solution

If the disk has not been rejected from the array:Enter smitty ssaraid and select the following:--> Change Member Disks in an SSA RAID Array--> Remove a disk from an SSA RAID Array--> Select the array in question and remove pdisk#...

The following steps apply to both rejected and non-rejected disks:2) Have the CE physically replace the disk (he should set it in service mode).3) rmdev -dl pdisk# ; cfgmgr -vl ssar4)Enter smitty ssaraid and select the following:--> Change/Show use of an ssa physical disk--> Change the new pdisk's "current use" to Array Candidate.5) smitty ssaraid--> Change Member Disks in an SSA RAID Array--> Add a disk to an SSA RAID Array--> Add the new pdisk definition to the array

This definition should now be in a "degraded" state. After adding the new disk the array will go into a "Rebuilding" state, and ultimately a "Good" state after the rebuild operation is complete. This progress can be monitored via:

smitty ssaraid--> List Status of all Defined SSA RAID Arrays--> These numbers will get smaller as the array rebuilds and once they all go to zero, the array should be in a "Good" State"

This menu does not update dynamically, you will have to exit out, then go back in to see the progress.

Wednesday, April 22, 2009

In the early days of unix, when they started creating common users, like root and admin and sys, the defaulted their ids as certain number so they would be common over all unix systems. They all had to create other accounts like nobody and created the id as -2, meaning that it is not a real id. (If you look at the /etc/security/passwd you will see they don't actually have a password.)

They had created this -2 in a 32 bit world. -2 is actually the twos compliment of 4294967294 in a 32 bit world. They are actually the same number. However, some programs thought that ids would only be positive and thus would reject the -2. Later versions of UNIX would allow both -2 and 4294967294 to mean the same thing. Some programs will only accept 4294967294. Which is why they have recently started to default the number to 4294967294, which by the way, is also double the maximumnumber you are allow to put into that field.

In short, -2 and 4294967294 are the same number and can be swapped back and forth at will. Why they are different on different machines is propably due to the different levels of AIX that they are and when those files were made. It is also possible that some programs will change those numbers themselves. For instance, mkuser will allow you to add a user to the nobody group and even if the nobody group is 4294967294, it will change it to -2.

Device discovery for devices can be difficult when minimal information is available.

Answer

Device discovery on AIX.Starting with AIX 5.2 ML05 and AIX 5.3 ML01 there is an ability to log information via the alog utility for the cfg methods. Depending on the OS version and maintenance level the amount of detail that can be logged vary.

One key thing is the verbosity level. If the level is high enough the SCSI id and LUN are reported as a discovered device. If an open is done on the device the SCIOSTART is used.

On AIX 5.2 server, got warning message which means scary when building boot image on hdisk0.

aixserver:/root# bosboot -ad /dev/hdisk0

bosboot: Boot image is 24922 512 byte blocks.

***** ATTENTION *****The boot image you just created might fail to boot becausethe size exceeds the system limit. For information aboutfixes or workarounds, see /usr/lpp/bos.sysmgt/README.***** ATTENTION *****

aixserver:/root# oslevel -s5200-10-06-0835

Solution:

Since the boot image is over the 12Mb line, you will see this warning.Older systems cannot handle a large boot image like this, but with thelatest system firmware and at your 5.2 ML 8 this server will boot upfine, as you have the necessary APARs installed to boot from the largerimage.

You will still see this warning however when you run bosboot or ifmksysb runs bosboot, but you may ignore it. You may also see this onother systems once the boot image has grown past 12Mb, such as withadding new disks or adapters to the system.

Check the system firmware level, this server is at SF240_284, which support boot image greater than 12MB. So we can ignore this warning message.# lsmcode┌──────────────────────────────────────────────────────┐│ ││ Building Resource Database. ││ Please stand by. │ └──────────────────────────────────────────────────────┘DISPLAY MICROCODE LEVEL 802811

Determining Microcode levels.......

Please stand by.

DISPLAY MICROCODE LEVEL 802811IBM,9117-570

The current permanent system firmware image is SF240_284The current temporary system firmware image is SF240_284The system is currently booted from the temporary firmware image.

If you don't know which LPAR owns the CD-ROM drive, use the HMC manager or WEBSM tool.Select the managed system and open "Properties".Select the "I/O" tab. Look for the I/O device with the description "Other Mass Storage Controller" and read the "Owner" field. This will show the LPAR currently owning that device.

Select the LPAR currently owning the CD-ROM, and in the Actions menu select:Dynamic Logical Partitioning -> Physical Adapters -> Move or RemoveSelect the adapter for "Other Mass Storage Controller" and move to the desired target LPAR.This will perform a DLPAR operation on both the source and target LPAR.

In cases where the rootvg filesystems cannot be mounted automatically (for example the CD media is a different Technology Level than what exists on hard disk; or the filesystems for some reason won't automatically mount), commands such as the "vi" editor won't be available to edit the inittab.

In this case a hard-luck method can be used to create a minimal inittab.

Wednesday, March 25, 2009

Device discovery for devices can be difficult when minimal information is available.

Answer

Device discovery on AIX.Starting with AIX 5.2 ML05 and AIX 5.3 ML01 there is an ability to log information via the alog utility for the cfg methods. Depending on the OS version and maintenance level the amount of detail that can be logged vary.

One key thing is the verbosity level. If the level is high enough the SCSI id and LUN are reported as a discovered device. If an open is done on the device the SCIOSTART is used.

What is the HMC v5, v6 and v7 command line to disable attention LED on system p servers

Cause

Hardware errors that occur on a server requiring attention will cause the system attention LED to come on. Manual intervention is required to turn off the attention LED.

Answer

The system attention LED can be disabled using the graphic user interface (GUI) service utility application, but it can be more quickly done using the chled command. The managed system name is needed to run the chled command and the lssyscfg command can be used to retrieve all the managed systems names if you don't already know them.

lssyscfg -r sys -F name

Once you know the managed system name to use in the command line interface (CLI), check to see if the attention LED is activelsled -r sa -t phys -m <managed_system>

Question

Does Virtual Memory Manager (VMM) work with raw logical updates, and if so, how? If raw logical volumes do not use block I/O buffer cache, does sync update raw logical volumes or does VMM?

Answer

When an application directly accesses a raw logical volume, the VMM is not involved. The VMM is involved when accessing the Journaled File System (JFS). sync only updates JFS, so neither sync nor VMM updates raw logical volumes. All writes to raw logical volumes are synchronous, which means that the writes do not return until the data has made it to disk and therefore does not require a sync.