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
0 (0)
Article Rating (No 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
How to mirror the rootvg in AIX?
Viewed 4513 times since Mon, May 21, 2018
AIX Booting
Viewed 9871 times since Tue, Apr 16, 2019
AIX 7.2 running on my Macbook?
Viewed 11928 times since Mon, Jun 3, 2019
How to determine why your AIX oslevel is downlevel (and a script to help!)
Viewed 3569 times since Fri, Jul 13, 2018
Script to make mksysb backup from NIM to LPAR
Viewed 3377 times since Thu, Feb 21, 2019
AIX, user gets “pwd: The file access permissions do not allow the specified action.”
Viewed 10250 times since Tue, Mar 16, 2021
List AIX File Systems the Easy Way With the lsvgfs Command
Viewed 1732 times since Thu, Sep 20, 2018
AIX Commands Related to Boot and Init Process
Viewed 4060 times since Tue, Apr 16, 2019
Got Duplicate PVIDs in Your User VG? Try Recreatevg!
Viewed 2928 times since Fri, Feb 1, 2019
NMON nmon
Viewed 11433 times since Tue, Apr 16, 2019