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
A Unix Utility You Should Know About: lsof
Viewed 2553 times since Tue, Apr 16, 2019
Authenticate AIX using MS DC’s kerberos servers (Active Directory)
Viewed 2749 times since Thu, Feb 21, 2019
How to setup an user in AIX
Viewed 5138 times since Mon, May 28, 2018
Recovery from LED 552, 554, or 556 in AIX
Viewed 3333 times since Tue, Apr 16, 2019
How to Maintain a Virtual I/O Server With FBO Part II
Viewed 11203 times since Wed, Jun 5, 2019
Processes and Devices—It’s All About the Children
Viewed 2905 times since Wed, May 30, 2018
Tuning AIX Network Performance
Viewed 4896 times since Tue, May 22, 2018
Check connection (rsh or nimsh) between NIM server and LPAR
Viewed 11845 times since Thu, Feb 21, 2019
AIX smtctl The smtctl command controls the enabling and disabling of processor simultaneous multithreading mode.
Viewed 16058 times since Fri, Jan 18, 2019
AIX boot proccess
Viewed 3886 times since Tue, Apr 16, 2019