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
Changing Ethernet Media Speed for AIX
Viewed 3546 times since Tue, Apr 16, 2019
AIX, Installation, NIM↑ Creating an LPP source and SPOT in NIM
Viewed 15169 times since Fri, Apr 19, 2019
AIX - How to extend JFS filesystem
Viewed 19492 times since Fri, Jun 8, 2018
Part 2, NFS monitoring and tuning
Viewed 6658 times since Mon, Jun 4, 2018
Getting list users and groups in AIX
Viewed 3953 times since Mon, May 28, 2018
Rootvg Mirroring in AIX
Viewed 2911 times since Mon, May 21, 2018
IBM V7000f Performance Test with Vdbench Tool on IBM AIX
Viewed 16298 times since Thu, Jan 23, 2020
Trick to Purge/Clean Swap Usage on AIX
Viewed 8315 times since Thu, Nov 29, 2018
sysdumpdev Command
Viewed 1996 times since Mon, Jul 16, 2018
How to install filesets/software in aix?
Viewed 6207 times since Mon, Jul 8, 2019