Showing results for 
Search instead for 
Did you mean: 

how can I know free raw devices?

Frequent Advisor

how can I know free raw devices?

Hi all

simple question!!!

how can I know unused raw logical volumes in a HP-UX RISC servers?

we have currently two node cluster servicegaured running Oracle 9i database RAC.

recently, I discovered 1 TB unused (not belong to cluster RAC) after discussion with our application team.

Normally, with AIX servers, there is a flag closed/syncd or open/syncd to give you the status of the device.

how can I know that in HP-UX?

Thanks and regards.
Bill Hassell
Honored Contributor

Re: how can I know free raw devices?

The ONLY accurate answer is to ask the Oracle database admins to list the defined devices. You could use fuser or lsof pointed to the various rlvols but that is only a guess. The reason is that Oracle code may or may not have every raw lvol open at a given moment. It is also possible that one or more Oracle instances have rlvols configured but have not yet stored any data on them. Raw devices are 100% under control of applications so HP-UX cannot provide any usage (or potential usage) information.

Bill Hassell, sysadmin
A. Clay Stephenson
Acclaimed Contributor

Re: how can I know free raw devices?

Actually your question is far from simple. The most common use of raw disks/LVOL's is a database but that is not the only use. It's relatively easy to find those in use but it's extremely difficult to know that a given LVOL is not in use by any application. That's why it's vitally important to document your disk/LVOL usage. SAM does have a facility to annotate the use of a disk but this is advisory only. My convention is to write a known pattern of bytes to the first 10MiB of every LVOL when the LVOL's are first created; I do this whether or not I intend to use the LVOl immediately. (Actually it's part of my VG/LVOL creation script). I then examine the same area of the LVOL to see if this pattern is intact. If so, that is an extremely good indication that the LVOL is not in use by any application. Another sometimes overlooked usage of an LVOL is as a swap device though I doubt this applies in your case.
If it ain't broke, I can fix that.
Honored Contributor

Re: how can I know free raw devices?

We create the raw files with spare* and rename to a db specific name when it is relesed for datasbe use.
Honored Contributor

Re: how can I know free raw devices?


Indeed it is quite difficult a question especially that you know your system more better than us.

I would recommend that you run the command:
alter database backup controlfile to trace as '/tmp/foo.sql'

Verify all the files being used and verify all the disk device files at the OS level

hope this helps too!
kind regards

No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Volker Borowski
Honored Contributor

Re: how can I know free raw devices?

A good indication would be, if the ownership uid/gid belongs to a database account.

You could run dbv against the raw device.
It will pretty sure tell you if this "file" has oracle structure or not (at least for datafiles).

Logfiles and controlfile are more complicated.

For ALL databases select ALL filenames from
and check the result for being either a raw device name or a symlink to a raw device.

List might not be complete, but a good starter and might need adjustment for other databases as well if installed in addition to oracle.

Good hunting
Honored Contributor

Re: how can I know free raw devices?


You may find this recent thread on the topic useful:

Frequent Advisor

Re: how can I know free raw devices?

Thanks guys

I very sorry for my delayed response.

for this issue, I wrote a script for our DBA team to check the current used raw devices in the Oracle RAC and compare it with all raw devices in the system to find out the free volumes.

This is the only way I can see to solve this issue.