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
How to mirror the rootvg in AIX?
Viewed 6247 times since Mon, May 21, 2018
AIX: How to identify the program listening in the given port
Viewed 3305 times since Mon, Jun 11, 2018
How to setup an user in AIX
Viewed 5674 times since Mon, May 28, 2018
Creating Normal,Big,Scalable VG on AIX
Viewed 16516 times since Fri, Feb 1, 2019
List STALE partitions across Volume Groups for each Logical Volume in AIX
Viewed 4021 times since Tue, Jul 17, 2018
Changing ’defined’ or ’missing’ hard disk states to ’Available’ in IBM Smart Analytics System for AIX environment
Viewed 3283 times since Thu, Sep 20, 2018
How to install filesets/software in aix?
Viewed 7680 times since Mon, Jul 8, 2019
LVM: Shrink & extend a filesystem/volume
Viewed 2953 times since Sun, Jun 3, 2018
AIX, Red Hat, Security, System Admin↑ System-wide separated shell history files for each user and session
Viewed 3260 times since Fri, Apr 19, 2019
AIX check the HBA status
Viewed 18764 times since Tue, May 22, 2018