AIX Changing ’defined’ or ’missing’ hard disk states to ’Available’ in IBM Smart Analytics System for AIX environment

Technote (troubleshooting)


Problem(Abstract)

Hard disks in 'defined' or 'missing' state should be changed to 'Available' state in IBM Smart Analytics System for AIX environment and disk settings need to be reconfigured.

Resolving the problem

The following steps will not require an outage:


1. Capture current output for all disks.

a. Current disk settings for all disks.

lsdev | grep hdisk | awk '{print $1}' | xargs -n 1 lsattr -OEl  > lsattr_out_pre.txt


b. Current Physical volume (PV) / Volume group (VG) assignments.

lspv > lspv_out_pre.txt

c. Current VG to Logical Volume (LV) /Filesystem assignments.

lsvg -o | xargs lsvg -l   > lsvg_o_out_pre.txt

2. Identify all of the "Missing" or "Defined" hdisks.

lsdev | grep hdisk | egrep -i "missing|defined"

It is a good idea to run the above command to scrutinise the output. Then you can proceed to the next step.

To assign these hdisks to a variable you can do the following:

hdisklist=$(lsdev | grep hdisk | egrep -i "missing|defined" | awk '{print $1}')

To test the list do the following:

for hdisk in ${hdisklist};do echo ${hdisk};done

3. To remove the hdisk definitions from the ODM, do this:

for hdisk in ${hdisklist}
do
echo "Removing ${hdisk}"
rmdev -dl ${hdisk}
done


4. Rerun the lsdev check again to make sure that all the Defined or Missing hdisks are in fact gone.

lsdev | grep hdisk | egrep -i "missing|defined"

5. If there area any 'dac' devices that are Defined or Missing, remove them as well.

daclist=$(lsdev | grep '^dac' | egrep -i 'Missing|Defined' | awk '{print $1}')
 
for dac in ${daclist}
do
echo "Removing ${dac}"
rmdev -dl ${dac}
done

The next steps require an outage. To run the chdev command to change the hdisk parameters it will be necessary to unmount filesystems and varyoff the vgs where they are varied on and mounted.

6. When the system is ready, run hastopdb2. In the 7700 environment this will unmount and varyoff all TSA controlled LVM based filesystems on external storage. The cold storage should be put under HA control to allow for seemless failover.

7. Run the following command to determine hdisk settings for the remaining hdisks: (the printf print the hdisk as part of the attributes line, you must use printf to avoid the line feed). This will pick up the disks we deleted earlier.

lsdev | grep hdisk | grep MPIO | awk '{print $1}' | while read hdisk;do printf "${hdisk}:";lsattr -a queue_depth -a max_transfer -a reserve_policy -a algorithm -OEl ${hdisk} | grep -v queue_depth;done

*** SAMPLE OUTPUT *******
hdisk2:128:0x100000:no_reserve:round_robin
hdisk3:128:0x100000:no_reserve:round_robin
hdisk4:128:0x100000:no_reserve:round_robin
hdisk5:128:0x100000:no_reserve:round_robin
hdisk6:128:0x100000:no_reserve:round_robin
hdisk7:128:0x100000:no_reserve:round_robin
hdisk8:128:0x100000:no_reserve:round_robin
hdisk9:128:0x100000:no_reserve:round_robin
hdisk10:128:0x100000:no_reserve:round_robin
hdisk11:128:0x100000:no_reserve:round_robin
hdisk12:10:0x40000:single_path:fail_over
hdisk13:10:0x40000:single_path:fail_over
hdisk14:10:0x40000:single_path:fail_over


8. Run the above command again, but only pick out those that have incorrect values, this is all one line, since we know the pattern, we can weed out the ones that are already set correctly. The following command only returns the list of hdisks that don't meet the current specs.

lsdev | grep hdisk | grep MPIO | awk '{print $1}' | while read hdisk;do printf "${hdisk}:";lsattr -a queue_depth -a max_transfer -a reserve_policy -a algorithm -OEl ${hdisk} | grep -v queue_depth;done
| grep -v '128:0x100000:no_reserve:round_robin'
*** SAMPLE OUTPUT *******
hdisk12:10:0x40000:single_path:fail_over
hdisk13:10:0x40000:single_path:fail_over
hdisk14:10:0x40000:single_path:fail_over

9. You can create a second disk list ${modlist} for those disks that will be modified:

lsdev | grep hdisk | grep MPIO | awk '{print $1}' | while read hdisk;do printf "${hdisk}:";lsattr -a queue_depth -a max_transfer -a reserve_policy -a algorithm -OEl ${hdisk} | grep -v queue_depth;done
| grep -v '128:0x100000:no_reserve:round_robin' | cut -d: -f 1
**** SAMPLE OUTPUT *****
hdisk12
hdisk13
hdisk14


modlist=$(lsdev | grep hdisk | grep MPIO | awk '{print $1}' | while read hdisk;do printf "${hdisk}:";lsattr -a queue_depth -a max_transfer -a reserve_policy -a algorithm -OEl ${hdisk} | grep -v queue_depth;done
| grep -v '128:0x100000:no_reserve:round_robin' |  cut -d: -f 1)

# echo ${modlist}
*** SAMPLE OUTPUT****
hdisk12 hdisk13 hdisk14


10. Modify the hdisk parameters.

for hdisk in ${modlist}
do
chdev -l ${hdisk} -a queue_depth=128 -a max_transfer=0x100000 -a reserve_policy=no_reserve -a algorithm=round_robin
done

11. After this step is done, restart from step #1. Change the 'pre' to 'post' and compare the output. Look for changes in the PVID columns.

12. Rerun step 9. The output should be blank as all of the MPIO disks should have their ODM parameters updated. Since the devices were made inactive a reboot is not required.

0 (0)
Article Rating (No Votes)
Rate this article
Attachments
There are no attachments for this article.
Comments
There are no comments for this article. Be the first to post a comment.
Full Name
Email Address
Security Code Security Code
Related Articles RSS Feed
How to Investigate a System Reboot
Viewed 4332 times since Mon, Jul 16, 2018
Backup and Restore With AIX
Viewed 4088 times since Sat, May 19, 2018
SSH-COPY-ID on AIX. SSH remote AIX’s box without password
Viewed 15869 times since Thu, Feb 21, 2019
AIX smtctl The smtctl command controls the enabling and disabling of processor simultaneous multithreading mode.
Viewed 14701 times since Fri, Jan 18, 2019
AIX - How to extend JFS filesystem
Viewed 16828 times since Fri, Jun 8, 2018
Authenticate AIX using MS DC’s kerberos servers (Active Directory)
Viewed 1964 times since Thu, Feb 21, 2019
AIX Oracle tuning
Viewed 206089 times since Tue, Jul 2, 2019
Create memory resident filesystems (RAM disk) on AIX
Viewed 2451 times since Thu, Feb 21, 2019
AIX: Configuring a network interface
Viewed 2911 times since Sat, Jun 2, 2018
LVM: Unmirror/Mirror "rootvg" Volume Group
Viewed 3116 times since Mon, May 21, 2018