{"id":32,"date":"2007-11-22T00:57:40","date_gmt":"2007-11-21T21:57:40","guid":{"rendered":"http:\/\/www.held.org.il\/blog\/?p=32"},"modified":"2007-11-22T00:57:40","modified_gmt":"2007-11-21T21:57:40","slug":"setting-a-raw-device-in-redhatcentos-5","status":"publish","type":"post","link":"http:\/\/www.held.org.il\/blog\/2007\/11\/setting-a-raw-device-in-redhatcentos-5\/","title":{"rendered":"Setting a raw device in RedHat\/CentOS 5 for Oracle RAC"},"content":{"rendered":"<p>Apparently the issue got changed since RedHat 4,  which had \/etc\/sysconfig\/rawdevices, \/etc\/init.d\/raw &amp; \/usr\/bin\/raw.<\/p>\n<p>This version introduces  \/etc\/udev\/rules.d\/60-raw.rules &amp; \/bin\/raw.<\/p>\n<p><strong>A. Doing it manually <\/strong>(example):<\/p>\n<blockquote><p>\/bin\/raw \/dev\/raw\/raw1 \/dev\/sdb1<\/p><\/blockquote>\n<p>of course, it'll be forgotten after reboot. so:<\/p>\n<p><strong>B. Doing it the right way - <a href=\"http:\/\/en.wikipedia.org\/wiki\/Udev\">udev<\/a><\/strong> (example)<strong>:<\/strong><\/p>\n<ol>\n<li>Add to <em>\/etc\/udev\/rules.d\/60-raw.rules<\/em>:<\/li>\n<blockquote><p>ACTION==\"add\", KERNEL==\"sdb1\", RUN+=\"\/bin\/raw \/dev\/raw\/raw1 %N\"<\/p><\/blockquote>\n<li>[Optional] to set permissions, create a new<em> \/etc\/udev\/rules.d\/99-raw-perms.rules<\/em> containing lines such as<em>:<\/em><\/li>\n<blockquote><p>KERNEL==\"raw[1-2]\", MODE=\"0640\", GROUP=\"oinstall\", OWNER=\"oracle\"<\/p><\/blockquote>\n<\/ol>\n<p>The header of <em>rules.d\/60-raw.rules<\/em> file mentions that this method of using raw devices is deprecated. But still, I think that's the only available way if one wants to use raw devices with Oracle RAC, Either for cluster issues (Voting+OCR) or simple Oracle data files.<\/p>\n<p><strong>C. Oracle RAC raw device permissions<\/strong><\/p>\n<p>You might ask: what permissions should I give the Oracle RAC disks? This is what I've found out with Roman, a DBA expert who came to help:<\/p>\n<ul>\n<li><em>OCR Device(s)<\/em>: root:oinstall , mode 0640<\/li>\n<li><em>Voting device(s)<\/em>: oracle:oinstall, mode 0660\n<ul>\n<li>CRS cannot run if user oracle can't access the device!<\/li>\n<\/ul>\n<\/li>\n<li>Other devices (i.e. data): I guess also oracle:oinstall mode 0660, because oracle user might need to access them.<\/li>\n<\/ul>\n<p>Disclaimer: I'm not a DBA expert; I hope this helps. Don't blame me if it <a href=\"http:\/\/it.slashdot.org\/article.pl?sid=07\/11\/20\/1537254\">ruins important data<\/a>; send comments if you think I'm wrong\/right.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Apparently the issue got changed since RedHat 4, which had \/etc\/sysconfig\/rawdevices, \/etc\/init.d\/raw &amp; \/usr\/bin\/raw. This version introduces \/etc\/udev\/rules.d\/60-raw.rules &amp; \/bin\/raw. A. Doing it manually (example): \/bin\/raw \/dev\/raw\/raw1 \/dev\/sdb1 of course, it&#8217;ll be forgotten after reboot. so: B. Doing it the right way &#8211; udev (example): Add to \/etc\/udev\/rules.d\/60-raw.rules: ACTION==&#8221;add&#8221;, KERNEL==&#8221;sdb1&#8243;, RUN+=&#8221;\/bin\/raw \/dev\/raw\/raw1 %N&#8221; [Optional] to [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[5,75],"tags":[],"_links":{"self":[{"href":"http:\/\/www.held.org.il\/blog\/wp-json\/wp\/v2\/posts\/32"}],"collection":[{"href":"http:\/\/www.held.org.il\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.held.org.il\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.held.org.il\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.held.org.il\/blog\/wp-json\/wp\/v2\/comments?post=32"}],"version-history":[{"count":0,"href":"http:\/\/www.held.org.il\/blog\/wp-json\/wp\/v2\/posts\/32\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.held.org.il\/blog\/wp-json\/wp\/v2\/media?parent=32"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.held.org.il\/blog\/wp-json\/wp\/v2\/categories?post=32"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.held.org.il\/blog\/wp-json\/wp\/v2\/tags?post=32"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}