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
Part 3, Tuning swap space settings AIX7
Viewed 9215 times since Wed, Jun 19, 2019
AIX: Script to create a file with commands to remove missing & failed paths
Viewed 3440 times since Tue, Jun 12, 2018
AIX: How to manage network tuning parameters
Viewed 4119 times since Mon, Jun 11, 2018
Altering LVM Configuration When a Disk is Not in ODM Anymore
Viewed 3359 times since Mon, Jun 3, 2019
Manages processor scheduler tunable parameters schedo AIX
Viewed 2718 times since Thu, Sep 20, 2018
List AIX File Systems the Easy Way With the lsvgfs Command
Viewed 2355 times since Thu, Sep 20, 2018
AIX - How to get CPU infomation
Viewed 6092 times since Fri, Jun 8, 2018
How to deal with performance monitoring in AIX ?
Viewed 8029 times since Fri, May 25, 2018
Working with Virtual media library on VIO servers
Viewed 16022 times since Thu, Feb 21, 2019
Topics: AIX, System Admin↑ Export and import PuTTY sessions
Viewed 3236 times since Fri, Apr 19, 2019