AIX: Script to create a file with commands to remove missing & failed paths

To create a file with commands to remove the missing paths

1
2
3
4
5
6
7
8
9
#!/bin/sh
# rmpaths
>xrmpaths
echo "#!/bin/sh" >>xrmpaths
disks=$(lspv | awk '{print $1}')
for loop in $disks
do
lspath -l $loop -H -F "name:parent:connection:status" |grep Missing| awk -F: '{print "rmpath -dl",$1,"-p", $2, "-w", $3}'>>xrmpaths
done

 

To create a file with commands to remove the failed paths

1
2
3
4
5
6
7
8
9
#!/bin/sh
# rmpaths
>xrmpaths
echo "#!/bin/sh" >>xrmpaths
disks=$(lspv | awk '{print $1}')
for loop in $disks
do
lspath -l $loop -H -F "name:parent:connection:status" |grep Failed| awk -F: '{print "rmpath -dl",$1,"-p", $2, "-w", $3}'>>xrmpaths
done
5 (1)
Article Rating (1 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
Migrating from SDDPCM to AIXPCM (the easy way)
Viewed 2754 times since Mon, Jun 3, 2019
To do a quick check on the number of path present (does not mean all are Enabled] using for loop
Viewed 4012 times since Fri, Jun 8, 2018
Installation of the Virtual I/O Server directly from the HMC
Viewed 21329 times since Tue, Jun 4, 2019
AIX oslevel version OS
Viewed 5094 times since Wed, Apr 17, 2019
bootlist multiple boot logical volume found
Viewed 2834 times since Tue, Apr 16, 2019
replacing (hot-swap) failed disk in rootvg
Viewed 9347 times since Thu, Sep 20, 2018
Configure log file for cron daemon on AIX
Viewed 10829 times since Thu, Feb 21, 2019
Tuning AIX Network Performance
Viewed 3870 times since Tue, May 22, 2018
Trouble Shooting AIX Networking
Viewed 2704 times since Tue, May 22, 2018
AIX Not all filesets for 6100-07_AIX_ML were found
Viewed 3185 times since Tue, Jul 17, 2018