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 Cloning a rootvg using alternate disk installation
Viewed 12366 times since Sun, Jun 30, 2019
AIX 7.2 running on my Macbook?
Viewed 13544 times since Mon, Jun 3, 2019
System Admin Mirrorvg without locking the volume group
Viewed 3671 times since Mon, May 21, 2018
Control Your Logs AIX
Viewed 19912 times since Wed, May 30, 2018
Using Kerberos security with Server for NFS
Viewed 10633 times since Wed, Jun 27, 2018
This document discusses a new feature implemented for JFS2 filesystems to prevent simultaneous mounting.
Viewed 3385 times since Sat, Jun 1, 2019
Writing a Custom PVID
Viewed 3493 times since Fri, Feb 1, 2019
ILMT Procedure - ILMT / TAD4D / SUA / BFI
Viewed 10849 times since Fri, Jul 5, 2019
Useful AIX general commands
Viewed 12856 times since Wed, Apr 17, 2019
Removing Failed or Missing Paths
Viewed 3778 times since Wed, May 30, 2018