AIX 6/7 Script to create a file with commands to remove missing and 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: How to assign a specific PVID
Viewed 6829 times since Fri, Feb 1, 2019
AIX Health Check basic
Viewed 3943 times since Fri, Jun 8, 2018
AIX ODM for MPIO User Guide 09
Viewed 3741 times since Mon, Dec 31, 2018
https://www.ibm.com/developerworks/learn/aix/index.html
Viewed 11016 times since Wed, May 30, 2018
AIX Assign a PVID to a new hdisk
Viewed 6317 times since Tue, Jul 17, 2018
Mirroring the rootvg Volume Group for AIX
Viewed 3722 times since Mon, May 21, 2018
Script to download TL and SP for AIX using NIM and SUMA
Viewed 8888 times since Thu, Feb 21, 2019
vfcpmap on VIO Server
Viewed 9252 times since Tue, Jun 4, 2019
0516-404 allocp: This system cannot fulfill the allocation request. [AIX]
Viewed 4853 times since Thu, Sep 20, 2018
0516-787 extendlv: Maximum allocation for logical volume error
Viewed 8397 times since Tue, Mar 12, 2019