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 set automatic logoff (only for terminals)
Viewed 3234 times since Mon, Jun 11, 2018
Processes and Devices—It’s All About the Children
Viewed 2378 times since Wed, May 30, 2018
AIX Migrating from SDDPCM to AIXPCM (the easy way)
Viewed 20123 times since Mon, Dec 31, 2018
IBM V7000f Performance Test with Vdbench Tool on IBM AIX
Viewed 16296 times since Thu, Jan 23, 2020
AIX- Procedure to replace rootvg harddisk
Viewed 4767 times since Tue, Apr 16, 2019
Install and configure GNU’s screen on AIX
Viewed 9212 times since Thu, Feb 21, 2019
AIX - How to get Memory infomation
Viewed 11115 times since Fri, Jun 8, 2018
Topics: PowerHA / HACMP, Storage Adding a new volume group to an active PowerHA resource group
Viewed 2777 times since Mon, Jun 3, 2019
ILMT Procedure - ILMT / TAD4D / SUA / BFI
Viewed 10374 times since Fri, Jul 5, 2019
AIX Not all filesets for 6100-07_AIX_ML were found
Viewed 3185 times since Tue, Jul 17, 2018