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
AIX, user gets “pwd: The file access permissions do not allow the specified action.”
Viewed 11666 times since Tue, Mar 16, 2021
How to know witch process is running in a particular port on AIX using KDB
Viewed 12968 times since Thu, Nov 29, 2018
Setup private yum repository for AIX clients
Viewed 11477 times since Thu, Feb 21, 2019
AIX: Script to get Total Disk Size
Viewed 4006 times since Tue, Jun 12, 2018
Create a mksysb + SPOT using NIM (CLI)
Viewed 5735 times since Tue, Jul 17, 2018
Customizing a NIM Client Restore With a Post-Install Script
Viewed 11199 times since Wed, May 30, 2018
List STALE partitions across Volume Groups for each Logical Volume in AIX
Viewed 2761 times since Tue, Jul 17, 2018
Part 1, The basics of network troubleshooting
Viewed 5767 times since Tue, May 22, 2018
How to Use the Linux lsof Command
Viewed 11948 times since Sun, Jun 30, 2019
How to Maintain a Virtual I/O Server With FBO Part II
Viewed 10760 times since Wed, Jun 5, 2019