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
Removing Failed or Missing Paths
Viewed 3124 times since Wed, May 30, 2018
Script to make mksysb backup from NIM to LPAR
Viewed 3857 times since Thu, Feb 21, 2019
AIX, Storage, System Admin Allocating shared storage to VIOS clients
Viewed 2531 times since Fri, Apr 19, 2019
AIX oslevel version OS
Viewed 5189 times since Wed, Apr 17, 2019
Topics: AIX, Networking, System Admin
Viewed 11803 times since Fri, Apr 19, 2019
Customizing a NIM Client Restore With a Post-Install Script
Viewed 11254 times since Wed, May 30, 2018
IBM V7000f Performance Test with Vdbench Tool on IBM AIX
Viewed 16433 times since Thu, Jan 23, 2020
IP configuration in AIX
Viewed 3136 times since Tue, Jul 17, 2018
AIX, Security, System Admin↑ Fix user accounts
Viewed 4985 times since Fri, Apr 19, 2019
AIX Booting
Viewed 10789 times since Tue, Apr 16, 2019