AIX 6/7 Script to create a file with commands to remove missing and failed paths
Article Number: 728 | Rating: 5/5 from 1 votes | Last Updated: Tue, Jun 14, 2022 10:43 AM
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 |