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
AIX NFS Version 4 configuration over Kerberos inter-realm setup
Viewed 3636 times since Wed, Jun 27, 2018
To do a quick check on the number of path present (does not mean all are Enabled] using for loop
Viewed 3497 times since Fri, Jun 8, 2018
AIX Undocumented AIX command lquerypv
Viewed 3335 times since Tue, Jul 17, 2018
AIX - How to extend JFS filesystem
Viewed 16828 times since Fri, Jun 8, 2018
AIX Commands Related to Boot and Init Process
Viewed 4126 times since Tue, Apr 16, 2019
AIX HOW TO CLONE A ROOTVG USING ALTERNATE DISK INSTALLATION ALTER_DISK_COPY
Viewed 15692 times since Sun, Jun 30, 2019
How to Use the Linux lsof Command
Viewed 11000 times since Sun, Jun 30, 2019
Kerberos, Active Directory and AIX
Viewed 6032 times since Mon, Jun 25, 2018
How to Backup and Upgrade a Virtual I/O Server Part I
Viewed 4140 times since Wed, Jun 5, 2019
Create a mksysb + SPOT using NIM (CLI)
Viewed 5354 times since Tue, Jul 17, 2018