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 - How to get CPU infomation
Viewed 5435 times since Fri, Jun 8, 2018
Top 4 Reasons for Node Reboot or Node Eviction in Real Application Cluster (RAC) Environment
Viewed 87181 times since Thu, Jun 21, 2018
NMON nmon
Viewed 11759 times since Tue, Apr 16, 2019
Script to show Total, Free and Used Memory on AIX
Viewed 3330 times since Thu, Nov 29, 2018
IP configuration in AIX
Viewed 2662 times since Tue, Jul 17, 2018
Undocumented AIX command lquerypv
Viewed 3519 times since Mon, Jul 16, 2018
AIX: Script to get Total Disk Size
Viewed 3617 times since Tue, Jun 12, 2018
List STALE partitions across Volume Groups for each Logical Volume in AIX
Viewed 2456 times since Tue, Jul 17, 2018
AIX LVM QUORUM mysteries revealed
Viewed 3221 times since Wed, May 22, 2019
Rootvg Mirroring in AIX
Viewed 2603 times since Mon, May 21, 2018