1826203 Members
3034 Online
109691 Solutions
New Discussion

capacity of raw file

 
SOLVED
Go to solution
???_185
Regular Advisor

capacity of raw file

I make raw file system which is created for just lvol for oracle data.
After few month, How can I check the emained data.I can not figure out due to file system.
7 REPLIES 7
Vibhor Kumar Agarwal
Esteemed Contributor

Re: capacity of raw file

Emained data?

Are you talking about the df and du commands.
Vibhor Kumar Agarwal
RAC_1
Honored Contributor

Re: capacity of raw file

lvdisplay.
There is no substitute to HARDWORK
Bharat Katkar
Honored Contributor

Re: capacity of raw file

There is no way you can judge the raw file systems usage at OS level as far as i know but i have heard about some utility (may be from query language or so) which can do the job for you. You may probably check with oracle or oracle gurus for the same.

We do have some here in forum so wait till you get some feedback from them. :)
Regards,
You need to know a lot to actually know how little you know
VIKAS AGRAWAL
Frequent Advisor

Re: capacity of raw file

Hi zungwon ,

U can get the same from oracle application only by query. for that esclate this to oracle forums .

From unix u can try dd command, give if= your raw partition name & take a backup to some tape of= tape name . After finishing u will get a message that so many records in & Out , by this way u can count the usages.

Best is close this case here & esclate the same to oracle forum
Bharat Katkar
Honored Contributor

Re: capacity of raw file

Vikas....dd won't tell you the usage!!
You need to know a lot to actually know how little you know
Bill Hassell
Honored Contributor

Re: capacity of raw file

There is no such thing as a "raw filesystem". The term raw means that a blank volume is being used by Oracle for whatever purpose your database admins need. There are no files inside the volume. Instead, Oracle maintains some pointers to the sectors that hold specific data. Only Oracle can define what is used on the raw volume. No Unix tools can do this because no Unix tools know anything about what Oracle is doing with the raw disk area.

This is one of the reasons that raw volumes are VERY difficult to manage. You can't backup the volumes with any normal tool like tar or cpio. You can use dd but the result is just a bunch of sectors stored on the tape with no documentation (like date, time, source, etc). The difference in performance between raw and filesystem databases is almost negligible today so I would recommend not using raw volunes in favor of easy system administration.


Bill Hassell, sysadmin
TwoProc
Honored Contributor
Solution

Re: capacity of raw file

You need to take a look inside of each file.

Just to get an idea of what you're looking for , from sqlplus do the following:

select * from dba_data_files;

You'll see all the files listed there, look for the one that you want to check out (by file_name - which will look like your /dev/vgxx/lvolxx) and remember the file_id.

Then from sqlplus - run the following:

select
FILE_NAME, ddf.tablespace_name TABLESPACE, ddf.bytes/(1024*1024) MB_AVAIL,
(ddf.bytes - dfs.bytes)/(1024*1024) MB_USED,
dfs.bytes/(1024*1024) MB_FREE,
round(((ddf.bytes - dfs.bytes)/ddf.bytes)*100) PCT_USED
from dba_data_files ddf, dba_free_space dfs
where ddf.file_id = dfs.file_id
and ddf.file_id = &file_id;

Enter the file_id(from before) when it prompts you to, and the output will tell you how much of the lvol you've used thus far. If you leave off the last line, it will report the usage for all datafiles(raw, in this case).

Or, you could just hook up Oracle Enterprise Manager and have a look at it graphically in there...
:-)

Lastly, the above query DOESN'T answer the question as to whether or not you need to add datafiles! This only answers the question as to whether or not a datafile(lvol in this case) is full. Whether or not more needs to be added depends on whether or not the tablespace is nearly full. You could have two datafiles for the same tablespace, one full, the other 1/2 full with 512MB free: meaning that you probably don't need to add more datafiles, unless you're consuming more than 512MB for the evaluation period(this day, this week, this month, etc).


We are the people our parents warned us about --Jimmy Buffett