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

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
Top 4 Reasons for Node Reboot or Node Eviction in Real Application Cluster (RAC) Environment
Viewed 90010 times since Thu, Jun 21, 2018
AIX rootvg Mirroring
Viewed 4517 times since Mon, May 21, 2018
Understanding dump devices sysdumpdev
Viewed 4555 times since Mon, Jul 9, 2018
Install and configure GNU’s screen on AIX
Viewed 8873 times since Thu, Feb 21, 2019
AIX - How to get network speed and statistic of ethernet adapter in AIX
Viewed 13776 times since Fri, Jun 8, 2018
IBM V7000f Performance Test with Vdbench Tool on IBM AIX
Viewed 15976 times since Thu, Jan 23, 2020
Install and configure yum on AIX
Viewed 4557 times since Thu, Feb 21, 2019
bootlist multiple boot logical volume found
Viewed 2678 times since Tue, Apr 16, 2019
AIX - How to monitor memory usage
Viewed 5275 times since Fri, Jun 8, 2018
Getting bosboot errors, don’t reboot just yet
Viewed 2831 times since Tue, Apr 16, 2019