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, Networking↑ Adding and deleting a static network route using the command line
Viewed 2636 times since Fri, Apr 19, 2019
Part 1, The basics of network troubleshooting
Viewed 5202 times since Tue, May 22, 2018
Recovery AIX system when hang on boot (554 code error).
Viewed 16050 times since Thu, Feb 21, 2019
Useful AIX general commands
Viewed 11768 times since Wed, Apr 17, 2019
AIX, Monitoring, System Admin↑ NMON recordings
Viewed 2968 times since Fri, Apr 19, 2019
AIX oslevel version OS
Viewed 4863 times since Wed, Apr 17, 2019
Convert to Scalable Volume Groups
Viewed 3782 times since Wed, May 30, 2018
AIX, Security, System Admin↑ Fix user accounts
Viewed 4696 times since Fri, Apr 19, 2019
SSH-COPY-ID on AIX. SSH remote AIX’s box without password
Viewed 16750 times since Thu, Feb 21, 2019
Calculate hdisk READ / WRITE throughput (sequential IO) from AIX systems
Viewed 2622 times since Thu, Feb 21, 2019