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
NMON nmon
Viewed 14401 times since Tue, Apr 16, 2019
Do you Know These 5 Use of V$session View ?
Viewed 160995 times since Thu, Jun 21, 2018
NTLMSSP, SPN and AIX CIFS
Viewed 9236 times since Fri, Jun 15, 2018
Configure log file for cron daemon on AIX
Viewed 12139 times since Thu, Feb 21, 2019
How to Configure Sendmail not to Look up MX records
Viewed 5105 times since Fri, Apr 19, 2019
AIX Full memory dump configure
Viewed 4427 times since Mon, Jul 16, 2018
vfcpmap on VIO Server
Viewed 10928 times since Tue, Jun 4, 2019
How to know witch process is running in a particular port on AIX using KDB
Viewed 13969 times since Thu, Nov 29, 2018
Trouble Shooting AIX Networking
Viewed 3674 times since Tue, May 22, 2018
Rootvg Mirroring in AIX
Viewed 4077 times since Mon, May 21, 2018