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 0516-404 allocp: This system cannot fulfill the allocation
Viewed 4219 times since Thu, Sep 20, 2018
AIX - How to get Memory infomation
Viewed 12897 times since Fri, Jun 8, 2018
Script to make mksysb backup from NIM to LPAR
Viewed 4348 times since Thu, Feb 21, 2019
List STALE partitions across Volume Groups for each Logical Volume in AIX
Viewed 3511 times since Tue, Jul 17, 2018
How to determine why your AIX oslevel is downlevel (and a script to help!)
Viewed 5642 times since Fri, Jul 13, 2018
Part 2, Monitoring memory usage (ps, sar, svmon, vmstat) and analyzing the results AIX7
Viewed 14115 times since Wed, Jun 19, 2019
AIX alt_disk_copy
Viewed 10889 times since Sun, Jun 30, 2019
Managing System Dump Devices sysdumpdev
Viewed 4837 times since Mon, Jul 9, 2018
Create volume groups on AIX - Normal Big Scalable
Viewed 7954 times since Thu, Feb 21, 2019
A tcpdump Tutorial and Primer with Examples
Viewed 6703 times since Sun, Jun 17, 2018