Operating System - HP-UX
1831645 Members
3302 Online
110029 Solutions
New Discussion

Identify raw file systems

 
SOLVED
Go to solution
Jim Weidt
Occasional Contributor

Identify raw file systems

Hello,
Is there a way to find and identify raw file systems?
a
6 REPLIES 6
Zeev Schultz
Honored Contributor

Re: Identify raw file systems

man fstyp
So computers don't think yet. At least not chess computers. - Seymour Cray
Pete Randall
Outstanding Contributor

Re: Identify raw file systems

ll /dev/rdsk
ll /dev/vg*/rlvol*
?



Pete


Pete
A. Clay Stephenson
Acclaimed Contributor

Re: Identify raw file systems

First of all, there is no such thing as a raw filesystem. It's either raw disk space (entire disk, disk partition, or logical volume) or its a fully-cooked filesystem -- it can't be both.

Because, by definition, the volume is raw there is nothing to identify it as "raw".

The best you can do is to identify disks/LVOL's as unused.
I'll confine this to LVM but the same concepts apply to whole disks or vxvm.
Do a vgdisplay -v and note the logical volumes. You then need to do a bdf and display the mounted filesystem. Finally, do a swapinfo to display any used swap devices. Anything leftover is unused --- at the moment. For example, you may have unmounted a filesystem thus it will not appear in a bdf output but the LVOL does contain a filesystem. The important point is to look for unused LVOL's but be very careful.
If it ain't broke, I can fix that.
Jim Weidt
Occasional Contributor

Re: Identify raw file systems

Clay - I stand corrected on "raw filesystems", thanks. I am looking to identify the raw disk space used by our oracle databases.
a
Jeff Schussele
Honored Contributor

Re: Identify raw file systems

Hi,

This ambiguity is exactly *why* I always put commented entries for raw volumes in the /etc/fstab file. I do the same for MC/SG filesystems.

My $0.02,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: Identify raw file systems

In that case, I would ask Oracle itself.

1) Create a sqlplus script to output
"select file_name from dba_data_files;"
and output that to a file.

2) Read the files and do an ls -l | awk '{print $1}'. That will reveal the mode of the file. If the first character is a 'b' or 'c' then it is a raw volume. (If the first character is a '-' then it's a regular file. Now for the gotcha, if the first character is an 'l' then it's a symbolic link and you have to follow the link (which might be another soft link) until the first character is either 'b','c' or '-'. I normally use symbolic links for raw oracle volumes so that it's very easy to convert from raw to cooked and vice-versa --- with no Oracle changes.


If it ain't broke, I can fix that.