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 monitor CPU usage
Viewed 26766 times since Fri, Jun 8, 2018
O’Reilly’s CD bookshelf
Viewed 12170 times since Wed, Jun 27, 2018
How to set Kernel Parameters in AIX ?
Viewed 14650 times since Tue, Jul 2, 2019
AIX Commands Related to Boot and Init Process
Viewed 4480 times since Tue, Apr 16, 2019
Trick to Purge/Clean Swap Usage on AIX
Viewed 7740 times since Thu, Nov 29, 2018
How do I analyze and debug core files on AIX
Viewed 6254 times since Thu, Feb 21, 2019
Backing up your VIOS configuration with viosbr.
Viewed 11484 times since Mon, May 28, 2018
AIX FC Performance improvements for IBM AIX FC and FCoE device driver stacks
Viewed 5620 times since Fri, Jan 31, 2020
AIX QHA
Viewed 11006 times since Mon, Jun 3, 2019
Aix: How to assign a specific PVID
Viewed 7173 times since Fri, Feb 1, 2019