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
Script to reset NIM state and deallocate resources
Viewed 3462 times since Thu, Feb 21, 2019
Trouble Shooting AIX Networking
Viewed 3667 times since Tue, May 22, 2018
AIX - How to monitor memory usage
Viewed 7921 times since Fri, Jun 8, 2018
0516-404 allocp: This system cannot fulfill the allocation request. [AIX]
Viewed 6722 times since Thu, Sep 20, 2018
AIX Reviewing AIX Error and Boot Logs
Viewed 5152 times since Wed, Mar 20, 2019
Aix: How to assign a specific PVID
Viewed 10147 times since Fri, Feb 1, 2019
Control Your Logs AIX
Viewed 21024 times since Wed, May 30, 2018
AIX: Script to get Total Disk Size
Viewed 5495 times since Tue, Jun 12, 2018
How to Easily Generate AIX Systems Management Reports
Viewed 4111 times since Wed, May 30, 2018
Do you Know These 5 Use of V$session View ?
Viewed 160977 times since Thu, Jun 21, 2018