AIX: Script to create a file with commands to remove missing & failed paths
Article Number: 262 | Rating: 5/5 from 1 votes | Last Updated: Tue, Jun 12, 2018 9:02 AM
To create a file with commands to remove the missing paths
|
1
2
3
4
5
6
7
8
9
|
#!/bin/sh# rmpaths>xrmpathsecho "#!/bin/sh" >>xrmpathsdisks=$(lspv | awk '{print $1}')for loop in $disksdolspath -l $loop -H -F "name:parent:connection:status" |grep Missing| awk -F: '{print "rmpath -dl",$1,"-p", $2, "-w", $3}'>>xrmpathsdone |
To create a file with commands to remove the failed paths
|
1
2
3
4
5
6
7
8
9
|
#!/bin/sh# rmpaths>xrmpathsecho "#!/bin/sh" >>xrmpathsdisks=$(lspv | awk '{print $1}')for loop in $disksdolspath -l $loop -H -F "name:parent:connection:status" |grep Failed| awk -F: '{print "rmpath -dl",$1,"-p", $2, "-w", $3}'>>xrmpathsdone |

