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
Install and configure yum on AIX
Viewed 4353 times since Thu, Feb 21, 2019
How To Mirror Your Root Disk On AIX (a.k.a. rootvg)
Viewed 4936 times since Mon, May 21, 2018
How to Easily Generate AIX Systems Management Reports
Viewed 2790 times since Wed, May 30, 2018
Using AIX VG mirroring in combination with hardware snapshots
Viewed 4756 times since Sat, May 25, 2019
http://ibmsystemsmag.com/aix/administrator/backuprecovery/remote-sync/
Viewed 5207 times since Wed, May 30, 2018
Using expect to automate mundane tasks
Viewed 1679 times since Mon, Jun 3, 2019
AIX Password expiry /etc/passwd
Viewed 18111 times since Wed, Jul 3, 2019
AIX hangs on boot? How to debug boot process on AIX systems
Viewed 9205 times since Thu, Feb 21, 2019
Convert to Scalable Volume Groups
Viewed 3489 times since Wed, May 30, 2018
The new VIOS performance advisor tool part util
Viewed 3030 times since Tue, Jun 4, 2019