<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Raw Device Syntax in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/raw-device-syntax/m-p/3244108#M174162</link>
    <description>Hi Ketan,&lt;BR /&gt;&lt;BR /&gt;Please check this link:&lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=56780" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=56780&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;hth.</description>
    <pubDate>Thu, 08 Apr 2004 18:57:15 GMT</pubDate>
    <dc:creator>Sanjiv Sharma_1</dc:creator>
    <dc:date>2004-04-08T18:57:15Z</dc:date>
    <item>
      <title>Raw Device Syntax</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/raw-device-syntax/m-p/3244103#M174157</link>
      <description>Hi!,&lt;BR /&gt;&lt;BR /&gt;We have just started installing oracle Rac on XP512 - 1 thing which I am concerned with is how do I check if the raw partition is filled or empty. If its a small database - Yes I could check the Raw paritions under /dev/RAC and than make sure which are used under v$datafile - but if you get a Page at 2 am and you have a couple of 100 datafiles - its a tough one. Can some one please let me know some commands to know the size of the raw partition and how do I know its empty of not before I add a datafile ?&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Ketan</description>
      <pubDate>Thu, 08 Apr 2004 16:02:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/raw-device-syntax/m-p/3244103#M174157</guid>
      <dc:creator>Ketan_6</dc:creator>
      <dc:date>2004-04-08T16:02:11Z</dc:date>
    </item>
    <item>
      <title>Re: Raw Device Syntax</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/raw-device-syntax/m-p/3244104#M174158</link>
      <description>I run a different database on raw storage. The only way we have to check usage is with commands provided with the database software.&lt;BR /&gt;&lt;BR /&gt;In oracle land, its sqlplus commands. That doesn't mean there is no way to do it with the OS, but every command I've seen just shows the size of the raw disk area.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Thu, 08 Apr 2004 16:06:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/raw-device-syntax/m-p/3244104#M174158</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2004-04-08T16:06:22Z</dc:date>
    </item>
    <item>
      <title>Re: Raw Device Syntax</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/raw-device-syntax/m-p/3244105#M174159</link>
      <description>Hi Ketan,&lt;BR /&gt;&lt;BR /&gt;That is why it is called Raw. Because you cannot find out from unix whether you are using the complete space or not. You can check that from oracle only.&lt;BR /&gt;&lt;BR /&gt;Hope this helps.&lt;BR /&gt;&lt;BR /&gt;Regds&lt;BR /&gt;</description>
      <pubDate>Thu, 08 Apr 2004 16:06:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/raw-device-syntax/m-p/3244105#M174159</guid>
      <dc:creator>Sanjay_6</dc:creator>
      <dc:date>2004-04-08T16:06:31Z</dc:date>
    </item>
    <item>
      <title>Re: Raw Device Syntax</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/raw-device-syntax/m-p/3244106#M174160</link>
      <description>&lt;BR /&gt;Script it!&lt;BR /&gt;&lt;BR /&gt;Ask oracle to tell you which 'files' is knows about, and compare/diff with the raw devices. All include a little show_file_sizes.sql script to get the oracle data. SHoudl be easy enough to adapt to your needs. &lt;BR /&gt;Add a little perl and/or shell script and let the system do the work.&lt;BR /&gt;&lt;BR /&gt;I try to avoid this situation by very clear LVM naming conventions.&lt;BR /&gt;&lt;BR /&gt;If I do use raw devices directly, then I do not tell oracle abut them but go through a softlink in a directotry created just for the db instances. Such softlink list would be any easy driver  table to see what is in use.&lt;BR /&gt;[Other forum members do not care much for the intermediate softlink directory, but it has severd me well. It allows me to flip from production to test and back with a single directory rename!]&lt;BR /&gt;&lt;BR /&gt;fwiw,&lt;BR /&gt;Hein.&lt;BR /&gt;</description>
      <pubDate>Thu, 08 Apr 2004 17:03:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/raw-device-syntax/m-p/3244106#M174160</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2004-04-08T17:03:16Z</dc:date>
    </item>
    <item>
      <title>Re: Raw Device Syntax</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/raw-device-syntax/m-p/3244107#M174161</link>
      <description>[not having a good day doing attachment/includes]&lt;BR /&gt;&lt;BR /&gt;column status format a8&lt;BR /&gt;column member format a55&lt;BR /&gt;column file_name format a45&lt;BR /&gt;column Tablespace format a15&lt;BR /&gt;column segment_name format a15&lt;BR /&gt;column extent_name format a15&lt;BR /&gt;column owner format a10&lt;BR /&gt;column file format a45&lt;BR /&gt;column id format 99&lt;BR /&gt;&lt;BR /&gt;set pages 9999&lt;BR /&gt;set heading off&lt;BR /&gt;set FEEDBACK off&lt;BR /&gt;select 'redo_'||l.group# "Tablespace", l.group# "Id", l.bytes/(1024*1024) "MB",&lt;BR /&gt;    MEMBER "File" from v$logfile f, v$log l where l.group# = f.group#&lt;BR /&gt;union&lt;BR /&gt;select tablespace_name "Tablespace", FILE_ID "Id", bytes/(1024*1024) "MB",&lt;BR /&gt;    file_name "File" from dba_data_files&lt;BR /&gt;union&lt;BR /&gt;select tablespace_name "Tablespace", FILE_ID "Id", bytes/(1024*1024) "MB",&lt;BR /&gt;    file_name "File" from dba_temp_files&lt;BR /&gt;union&lt;BR /&gt;select 'Control_file' "Tablespace", rownum "Id", 0 "MB",&lt;BR /&gt;    name "File" from v$controlfile&lt;BR /&gt;order by 1&lt;BR /&gt;/&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 08 Apr 2004 18:45:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/raw-device-syntax/m-p/3244107#M174161</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2004-04-08T18:45:52Z</dc:date>
    </item>
    <item>
      <title>Re: Raw Device Syntax</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/raw-device-syntax/m-p/3244108#M174162</link>
      <description>Hi Ketan,&lt;BR /&gt;&lt;BR /&gt;Please check this link:&lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=56780" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=56780&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;hth.</description>
      <pubDate>Thu, 08 Apr 2004 18:57:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/raw-device-syntax/m-p/3244108#M174162</guid>
      <dc:creator>Sanjiv Sharma_1</dc:creator>
      <dc:date>2004-04-08T18:57:15Z</dc:date>
    </item>
    <item>
      <title>Re: Raw Device Syntax</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/raw-device-syntax/m-p/3244109#M174163</link>
      <description>Hi.&lt;BR /&gt;&lt;BR /&gt;Probably, there is no way for check %used of raw device by OS command.&lt;BR /&gt;OS does not know how oracle is using raw device.&lt;BR /&gt;&lt;BR /&gt;You should write SQL script.&lt;BR /&gt;I don't know SQL well.&lt;BR /&gt;e.g.)&lt;BR /&gt; select sum(...),,,&lt;BR /&gt; from v$data, sys.dba_data_files, ...&lt;BR /&gt; group by tablespace_name&lt;BR /&gt;&lt;BR /&gt;Thanks.&lt;BR /&gt;</description>
      <pubDate>Thu, 08 Apr 2004 20:02:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/raw-device-syntax/m-p/3244109#M174163</guid>
      <dc:creator>Kiyoshi Miyake</dc:creator>
      <dc:date>2004-04-08T20:02:43Z</dc:date>
    </item>
    <item>
      <title>Re: Raw Device Syntax</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/raw-device-syntax/m-p/3244110#M174164</link>
      <description>Hi!,&lt;BR /&gt;&lt;BR /&gt;AS Heuvel - suggested - I do have a script which will give me the list of all my datafiles. But here is the problem I face&lt;BR /&gt;&lt;BR /&gt;OS has /dev/RAC/RAW Partitions..&lt;BR /&gt;The PArtitions range from 2 GB to 8 GB.&lt;BR /&gt;Total Partitions 320&lt;BR /&gt;&lt;BR /&gt;From an oracle script I would surely know which partitions are used and than add datafiles accordingly. But it would be very error prone and cumbersome once you have to scan through 150 datafiles name and compare with OS partitions to check which are free. &lt;BR /&gt;&lt;BR /&gt;I guess from all the replies I hvae received so far - creating an TXT doc on the host would be helpfull and update the sheet when one adds a datafile. Or to have a small table with this information and keep updating the table once to add a datafile.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Ketan</description>
      <pubDate>Thu, 08 Apr 2004 20:12:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/raw-device-syntax/m-p/3244110#M174164</guid>
      <dc:creator>Ketan_6</dc:creator>
      <dc:date>2004-04-08T20:12:09Z</dc:date>
    </item>
    <item>
      <title>Re: Raw Device Syntax</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/raw-device-syntax/m-p/3244111#M174165</link>
      <description>But why not write a scripts to do the comparing and/or adding.&lt;BR /&gt;About that adding... what is the function of that. The datafiles remain independend even though though logically add up to a tablespace.&lt;BR /&gt;&lt;BR /&gt;Why not send us a sample (attach to next reply) say 5 or 10 line output from the SQL file name/size report, AS WELL AS the a 5 - 10 line sample of the ls/vgdisplay output you use to list the raw devices. (and the command used to get that data). I'm sure someone here can whip up a perl/shell or awk script to compare them, calling out missing items.&lt;BR /&gt;&lt;BR /&gt;If a raw device is too big (oracle uses less than all of the device give or take one mb) then you conceivably can 'dd count=oracle-size-in-mb if=old-raw bs=1024k of=temp-file;&lt;BR /&gt;recreate raw smaller; dd ... if=temp of=new-raw; rename file in Oracle if need be (startup nomount, alter...., mount...)&lt;BR /&gt; &lt;BR /&gt;Hein.</description>
      <pubDate>Thu, 08 Apr 2004 21:09:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/raw-device-syntax/m-p/3244111#M174165</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2004-04-08T21:09:28Z</dc:date>
    </item>
    <item>
      <title>Re: Raw Device Syntax</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/raw-device-syntax/m-p/3244112#M174166</link>
      <description>from oracle side - I run&lt;BR /&gt;select name from v4datafile &amp;lt;- this gives me the list of raw partitions already used :&lt;BR /&gt;Eg of the output is&lt;BR /&gt;&lt;BR /&gt;/dev/RAC/RACsystem01&lt;BR /&gt;/dev/RAC/RAC1undo&lt;BR /&gt;/dev/RAC/RAC2undo&lt;BR /&gt;/dev/RAC/RAC3undo&lt;BR /&gt;/dev/RAC/RAC4undo&lt;BR /&gt;/dev/RAC/RACdata01&lt;BR /&gt;/dev/RAC/RACdata02&lt;BR /&gt;/dev/RAC/RACdata03&lt;BR /&gt;/dev/RAC/RACdata04&lt;BR /&gt;/dev/RAC/RACdata05&lt;BR /&gt;&lt;BR /&gt;Now from the OS here is the output&lt;BR /&gt;&lt;BR /&gt;oracle@tsonode1[eraclte1]$ ls -l /dev/RAC/&lt;BR /&gt;total 0&lt;BR /&gt;&lt;BR /&gt;crw-r--r--    Oct  4  2002 RACdata01&lt;BR /&gt;crw-r--r--    Oct  4  2002 RACdata02&lt;BR /&gt;crw-r--r--    Oct  4  2002 RACdata03&lt;BR /&gt;crw-r--r--    Oct  4  2002 RACdata04&lt;BR /&gt;crw-r--r--    Oct  4  2002 RACdata05&lt;BR /&gt;crw-r--r--    Oct  4  2002 RACdata06&lt;BR /&gt;crw-r--r--    Oct  4  2002 RACdata07&lt;BR /&gt;crw-r--r--    Oct  4  2002 RACdata08&lt;BR /&gt;crw-r--r--    Oct  4  2002 RACdata09&lt;BR /&gt;crw-r--r--    Oct  4  2002 RACdata10&lt;BR /&gt;crw-r--r--    Oct  4  2002 RACdata11&lt;BR /&gt;crw-r--r--    Oct  4  2002 RACdata12&lt;BR /&gt;crw-r--r--    Oct  4  2002 RACdata13&lt;BR /&gt;crw-r--r--    Oct  4  2002 RACdata14&lt;BR /&gt;crw-r--r--    Oct  4  2002 RACdata15&lt;BR /&gt;crw-r--r--    Oct  4  2002 RACdata16&lt;BR /&gt;&lt;BR /&gt;The list goes on till RACdata340.&lt;BR /&gt;</description>
      <pubDate>Mon, 12 Apr 2004 18:55:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/raw-device-syntax/m-p/3244112#M174166</guid>
      <dc:creator>Ketan_6</dc:creator>
      <dc:date>2004-04-12T18:55:14Z</dc:date>
    </item>
    <item>
      <title>Re: Raw Device Syntax</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/raw-device-syntax/m-p/3244113#M174167</link>
      <description>&lt;BR /&gt;If those are the files you have to work with then for example do:&lt;BR /&gt;&lt;BR /&gt;&amp;gt; awk -F/ '{print $NF}' &amp;lt; oracle.dat | sort &amp;gt; oracle.sorted&lt;BR /&gt;&amp;gt; awk '{print $NF}' &amp;lt; device.dat | sort &amp;gt; device.sorted&lt;BR /&gt;&amp;gt; diff oracle.sorted device.sorted&lt;BR /&gt;&lt;BR /&gt;(the -F tells awk to use "/" as field seperator instead of the default 'space'. NF is 'Number of Fields' (here 3), thus $NF is $3 is the last field.)&lt;BR /&gt;&lt;BR /&gt;You can do is unsorted in one go with perl:&lt;BR /&gt;&lt;BR /&gt;perl -e 'open (O,"&lt;ORACLE.DAT&gt;){(/(\w+)$/);$o{$1}=1}&lt;BR /&gt;open (D,"&lt;DEVICE&gt;){(/(\w+)$/);&lt;BR /&gt;print "$1 not used\n" unless($o{$1})}'&lt;BR /&gt;&lt;BR /&gt;read the oracle file, using the last word on the line to create a hash array element.&lt;BR /&gt;read the device file, print 'not in use' unless the last word has an array element.&lt;BR /&gt;&lt;BR /&gt;You can make your life easier by making the lists closer as you make them. For example for oracle use:&lt;BR /&gt;.. select name from v$datafile order by name;&lt;BR /&gt;for the device files use: &lt;BR /&gt;find /dev/RAC/* | sort &amp;gt; device.dat&lt;BR /&gt;Now diff.&lt;BR /&gt;&lt;BR /&gt;Enjoy!&lt;BR /&gt;Hein.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/DEVICE&gt;&lt;/ORACLE.DAT&gt;</description>
      <pubDate>Tue, 13 Apr 2004 16:58:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/raw-device-syntax/m-p/3244113#M174167</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2004-04-13T16:58:42Z</dc:date>
    </item>
  </channel>
</rss>

