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
Software management in AIX
Viewed 6429 times since Mon, Jun 25, 2018
AIX WIKIS developerworks
Viewed 1981 times since Sun, Jun 17, 2018
Using expect to automate mundane tasks
Viewed 1529 times since Mon, Jun 3, 2019
AIX: How to determine which application created the OS core file
Viewed 2065 times since Mon, Jun 11, 2018
AIX snap - Prevent dump collection
Viewed 11990 times since Mon, Sep 17, 2018
0516-404 allocp: This system cannot fulfill the allocation request. [AIX]
Viewed 4437 times since Thu, Sep 20, 2018
How to enable Large Pages for a specific user on AIX?
Viewed 1633 times since Thu, Nov 29, 2018
How to Maintain a Virtual I/O Server With FBO Part II
Viewed 10294 times since Wed, Jun 5, 2019
AIX Increase paging space logical volume size
Viewed 2503 times since Tue, Jul 17, 2018
AIX PDF ALL
Viewed 5886 times since Mon, Jul 16, 2018