1837159 Members
2827 Online
110112 Solutions
New Discussion

A simple query

 
VIRENDER SINGH_1
Occasional Contributor

A simple query

Hi,

OS : HP-UX 11i
Database : Oracle 10g (10.2.1.0)

i am working as a Oracle DBA,we are using raw devices for storage.

brw-r----- 1 oracle dba 64 0*020000 apr 12 2006 kdb_control1_raw

[/dev/vg_rac (location of file)]

plz tell what this statement acctually signifies.

what 64 and 0*020000 shows .

Thanks.


7 REPLIES 7
Danny Petterson - DK
Trusted Contributor

Re: A simple query

Hi!

These numbers are used by LVM, its a block device (the "b" in the beginnign of the line), device special file, with the major number 64 and the minor number 0x020000. 64 will be the save for all your logical volumes, where the minor will be uniqe for each of them.

Yours
Danny
VIRENDER SINGH_1
Occasional Contributor

Re: A simple query

tahnks ...

How can we see the size of this file(filled size).

and what is the process of taking cold backup for these files ?

cheers.
Oviwan
Honored Contributor

Re: A simple query

Hey

-I assume you are using asm with the raw files. so you can check the used size with asm.

-make backups with rman and do not use dd.

Regards
VIRENDER SINGH_1
Occasional Contributor

Re: A simple query

hi,

no, i am not using ASM.


cheers.
Hein van den Heuvel
Honored Contributor

Re: A simple query

>> How can we see the size of this file(filled size).

You can NOT ask the OS about the filled size. It does not know that's why they call it a 'raw' device.

The OS will know the allocated size: vgdisplay, lvdisplay...

The application (oracle) knows the used size. Ask it kindly.
You could possibly use 'dd' to make a copy/backup either copying everything, or copying as much as t oracle thinks it is using.
Using dd is tedious and error prone, thus discouraged.

You would drive it with information obtained through SQL with queries similar to:

column status format a8
column member format a55
column file_name format a45
column Tablespace format a15
column segment_name format a15
column extent_name format a15
column owner format a10
column file format a45
column id format 99

set pages 9999
set heading off
set FEEDBACK off
select 'redo_'||l.group# "Tablespace", l.group# "Id", l.bytes/(1024*1024) "MB",
MEMBER "File" from v$logfile f, v$log l where l.group# = f.group#
union
select tablespace_name "Tablespace", FILE_ID "Id", bytes/(1024*1024) "MB",
file_name "File" from dba_data_files
union
select tablespace_name "Tablespace", FILE_ID "Id", bytes/(1024*1024) "MB",
file_name "File" from dba_temp_files
union
select 'Control_file' "Tablespace", rownum "Id", 0 "MB",
name "File" from v$controlfile
order by 1
/


The last part of that union applies to the specific raw device you ask about.


Hope this helps some,
Hein van den Heuvel (at gmail dot com)
HvdH Performance Consulting



Jeeshan
Honored Contributor

Re: A simple query


64 indicates the LUN's major number
0*020000 indicates the LUN's minor number
a warrior never quits
Shibin_2
Honored Contributor

Re: A simple query

In unix admin point of view, to find the used space and available space, you may use bdf command.

eg. To find the details of your device use :

bdf |grep kdb_control1_raw

This command will show you how many percentage of spaces filled and how many left. All sizes will be in kb. To know details you may use:

lvdisplay /dev/vg_rac/kdb_control1_raw
Regards
Shibin