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
0 (0)
Article Rating (No 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
bootlist multiple boot logical volume found
Viewed 2403 times since Tue, Apr 16, 2019
List STALE partitions across Volume Groups for each Logical Volume in AIX
Viewed 2141 times since Tue, Jul 17, 2018
AIX: How to identify the program listening in the given port
Viewed 2040 times since Mon, Jun 11, 2018
A Unix Utility You Should Know About: lsof
Viewed 1637 times since Tue, Apr 16, 2019
Part 1, Memory overview and tuning memory parameters AIX7
Viewed 3694 times since Wed, Jun 19, 2019
Useful AIX general commands
Viewed 11080 times since Wed, Apr 17, 2019
How To Mirror Your Root Disk On AIX (a.k.a. rootvg)
Viewed 4497 times since Mon, May 21, 2018
AIX Net How to check VLAN ID number on AIX?
Viewed 14432 times since Thu, Nov 29, 2018
HOWTO: Implement SEA Failover with Dual VIOS
Viewed 6812 times since Tue, Jun 4, 2019
Using the AIX splitvg command
Viewed 3761 times since Mon, Jun 3, 2019