Operating System - HP-UX
1823985 Members
3997 Online
109667 Solutions
New Discussion юеВ

Finding the unallocated-disks/Free-disks.

 
sudhapage
Regular Advisor

Finding the unallocated-disks/Free-disks.

Hi All,

How to find the unallocated-disks/Free-disks in hpux.

That disk should be part of LVM/VERITAS/ORACLE RAW FILESYSTEM.

Please suggest.

Regards,
Sudhakaran.K
8 REPLIES 8
Sandeep_Chaudhary
Trusted Contributor

Re: Finding the unallocated-disks/Free-disks.

run "ioscan -funCdisk" to find disks available in machine


If the disk is not yet used in LVM then u get following output

suxde034 # pvdisplay /dev/dsk/c17t1d0
pvdisplay: Couldn't find the volume group to which
physical volume "/dev/dsk/c17t1d0" belongs.

If the disk is/was part of LVM use

suxde900 # pvdisplay /dev/dsk/c3t1d0
--- Physical volumes ---
PV Name /dev/dsk/c3t1d0
VG Name /dev/vg01
PV Status available
Allocatable yes
VGDA 2
Cur LV 1
PE Size (Mbytes) 4
Total PE 2169
Free PE 1418
Allocated PE 751
Stale PE 0
IO Timeout (Seconds) default
Autoswitch On


here u can look for

Total PE 2169
Free PE 1418
Allocated PE 751
If "total PE" and "Free PE" are same means though disk is part of LVM it is free

another way is vgdisplay -v vgname
at the end u get disks the VG is having and its PE statistics


for ex:
PV Name /dev/dsk/c3t1d0
PV Status available
Total PE 2169
Free PE 1418
Autoswitch On

here "Total PE" and "free PE" are not matching means disk is used.


IS this what u expected?
Prashanth Waugh
Esteemed Contributor

Re: Finding the unallocated-disks/Free-disks.

Hi Sudha,


#strings /etc/lvmtab | grep "cntndn"

If its not a part of lvmtab means this disk is free on server. it is not used anywhere.

Regards
Prashant
For success, attitude is equally as important as ability
sudhapage
Regular Advisor

Re: Finding the unallocated-disks/Free-disks.

Hi Sandeep/Prasanth,

Thanks for the reply.

In my server, there are 400 disks are there in ioscan output. So I can't verify manually. Is there any script to verify the disks are free.

That disks should not be in LVM/Veritas/Oracle RAW format disk,etc..

Regards,
Sudhakaran.K
Prashanth Waugh
Esteemed Contributor

Re: Finding the unallocated-disks/Free-disks.

Hi Sudha,

/etc/lvmtab contains the all vgs and its pv respectively. so if its not a part of vg means its not part of lv.see if u r using raw FS for oracle but that raw FS is nothing but the lv. and lv will be the part of vg. its ebntry will be in /etc/lvmtab. so that disk will not be a member of raw FS

Regards
Prashant
For success, attitude is equally as important as ability
sudhapage
Regular Advisor

Re: Finding the unallocated-disks/Free-disks.

Is there any script to list freedisks in the servers.

In our server, there 400 EMC disks are there, so I can't verify individually.

Regards,
Sudhakaran.K

Re: Finding the unallocated-disks/Free-disks.

Hi,

If you have VxVM initialized on your system then,

vxdisk list

should show you at least VxVM and LVM disks - I'm not sure whether it can identify raw Oracle disks, Oracle ASM disks or Oracle Clusterware registry/voting disks

HTH

Duncan

I am an HPE Employee
Accept or Kudo
Sandeep_Chaudhary
Trusted Contributor

Re: Finding the unallocated-disks/Free-disks.

vgdisplay -v|grep "PV Name"|awk '{print $NF}'>/tmp/lvmdisk
ioscan -funCdisk|awk '{print $NF}'|grep dev>/tmp/ioscandisk

and compare two files
Deepak Kr
Respected Contributor

Re: Finding the unallocated-disks/Free-disks.

Prashant wrote:

>>> if u r using raw FS for oracle but that raw FS is nothing but the lv.<<

It is not always true. For example Oracle 10g is capable of using disks even without sitting top of LVM.

But as suggested, getting comparison from ioscan and lvmtab will be helpful here.

If it is a prod box, go through the configuration doc if any.

"There is always some scope for improvement"