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
Create bootable DVD iso image from a mksysb backup
Viewed 4860 times since Tue, Jul 17, 2018
AIX Errpt - Diag - Alog
Viewed 3842 times since Wed, Mar 20, 2019
Altering LVM Configuration When a Disk is Not in ODM Anymore
Viewed 3290 times since Mon, Jun 3, 2019
Migrating from SDDPCM to AIXPCM (the easy way)
Viewed 2756 times since Mon, Jun 3, 2019
Topics: AIX, Networking, System Admin
Viewed 11708 times since Fri, Apr 19, 2019
Technology level update on AIX using smit_update and alt_disk_install method
Viewed 5989 times since Sun, Jun 30, 2019
How to clear/clean/erase/delete/reset network adapter configuration on AIX?
Viewed 12727 times since Thu, Nov 29, 2018
Create jfs2 logical volume on AIX
Viewed 5142 times since Thu, Feb 21, 2019
Using Kerberos security with Server for NFS
Viewed 9848 times since Wed, Jun 27, 2018
The new VIOS performance advisor tool part util
Viewed 3458 times since Tue, Jun 4, 2019