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
Manually Editing /etc/filesystems Can Cause Issues
Viewed 6734 times since Tue, May 22, 2018
O’Reilly’s CD bookshelf
Viewed 15176 times since Wed, Jun 27, 2018
AIX, Storage, System Admin↑ Identifying a Disk Bottleneck Using filemon
Viewed 10896 times since Fri, Apr 19, 2019
Part 1, Memory overview and tuning memory parameters AIX7
Viewed 5472 times since Wed, Jun 19, 2019
AIX, Monitoring, Networking, Red Hat, Security, System Admin↑ Determining type of system remotely
Viewed 3192 times since Fri, Apr 19, 2019
AIX 6.1: Extend VG 0516-1714 extendvg 0516-1254 extendvg
Viewed 5540 times since Fri, Jul 6, 2018
AIX, Red Hat, Security, System Admin↑ System-wide separated shell history files for each user and session
Viewed 3149 times since Fri, Apr 19, 2019
AIX Increase paging space logical volume size
Viewed 3927 times since Tue, Jul 17, 2018
Removing Failed or Missing Paths
Viewed 4445 times since Wed, May 30, 2018
Using splitvg in AIX to make a copy of a volume group
Viewed 9946 times since Mon, Jun 3, 2019