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
Managing System Dump Devices sysdumpdev
Viewed 3792 times since Mon, Jul 9, 2018
AIX, System Admin↑ The chrctcp command
Viewed 3237 times since Fri, Apr 19, 2019
AIX - How to unlock and reset user’s account
Viewed 17090 times since Fri, Jun 8, 2018
Installing a Interim Fix (APAR IV16587)
Viewed 3185 times since Tue, Jul 17, 2018
Restoring mksysb
Viewed 3711 times since Wed, May 30, 2018
Calculate hdisk READ / WRITE throughput (sequential IO) from AIX systems
Viewed 2842 times since Thu, Feb 21, 2019
How to check dual path in AIX
Viewed 14371 times since Fri, Jun 8, 2018
How to Easily Generate AIX Systems Management Reports
Viewed 3174 times since Wed, May 30, 2018
0516-404 allocpThis system cannot fulfill the allocation
Viewed 10261 times since Thu, Sep 20, 2018
Authenticate AIX using MS DC’s kerberos servers (Active Directory)
Viewed 2325 times since Thu, Feb 21, 2019