Operating System - HP-UX
1752782 Members
5693 Online
108789 Solutions
New Discussion юеВ

Re: how to find unused disk in LVM if i have 500 disk

 
s.raju
Advisor

how to find unused disk in LVM if i have 500 disk

if we have 10 disk then we can compare lvmtab and ioscan output but is there any other way to find which disk is not assosiate with LVM so that i easy identify the disk and make it part of vg if i require more space
7 REPLIES 7
Patrick Wallek
Honored Contributor

Re: how to find unused disk in LVM if i have 500 disk

You could write a short script to do a 'pvdisplay' on each disk device. If the disk is NOT part of a VG the command should fail, so you could check the return code and if it is non-zero, then the disk should not be part of a VG.
s.raju
Advisor

Re: how to find unused disk in LVM if i have 500 disk

one of my friend told me for the same as create the script and check for error for pvdisplay then we come to know which disk is not assosiate with LVM

but i need some other way to find hardware path or disk name (c*t*d*) from command yes i know it is little bit defficult to compare 500 disk info for lvmtab and ioscan output if there is any other command to check it is very good to know


I need some way without using Script
James R. Ferguson
Acclaimed Contributor

Re: how to find unused disk in LVM if i have 500 disk

Hi:

> yes i know it is little bit defficult to compare 500 disk info for lvmtab and ioscan output...I need some way without using Script

Well then, how about a pencil and some paper?

Why would you *NOT* want to write a script that would simply your labor? There's nothing wrong with not knowing how to do something. There's everything wrong, though, with not trying. Don't reject something just because you may not be comfortable with it.

Regards!

...JRF...
Emil Velez
Honored Contributor

Re: how to find unused disk in LVM if i have 500 disk

sam will show you all of your disks and whether it finds a vxvm or LVM header on them.


Sam -> disks

It should give you a list of every disk and what it is used for.

(It might take a while since sam is doing a ioscan and cross referencing what it finds on each disk)
raghin
New Member

Re: how to find unused disk in LVM if i have 500 disk

Hi ,
the easiest thing is to make a list of used disks from lvmtab and make a list with all the disk in the ssystem. then write a simple for loop to compare both and echo the the output if the disk is not found in the lvmtab. this works 100% only if you have all the paths configured in the vg's If some alt path is missed out then you have for do a manula comaprison to find the alt path also.
s.raju
Advisor

Re: how to find unused disk in LVM if i have 500 disk

Thanks for your Response
s.raju
Advisor

Re: how to find unused disk in LVM if i have 500 disk

sam and script will help you