{"id":561,"date":"2013-10-10T13:33:54","date_gmt":"2013-10-10T06:33:54","guid":{"rendered":"http:\/\/blog.trichev.com\/?p=561"},"modified":"2017-08-10T09:31:08","modified_gmt":"2017-08-10T02:31:08","slug":"installing-and-configuring-asmlib-on-rhel6","status":"publish","type":"post","link":"https:\/\/trichev.com\/blog\/2013\/10\/10\/installing-and-configuring-asmlib-on-rhel6\/","title":{"rendered":"Installing and Configuring ASMLib on RHEL6"},"content":{"rendered":"<p>Installing and Configuring ASMLib **Applies to RHEL 6 and if not setting udev rules:<\/p>\n<p>ASMLib consists of the following components:<br \/>\nAn open source (GPL) kernel module package: kmod-oracleasm<br \/>\nAn open source (GPL) utilities package: oracleasm-support<br \/>\nA closed source (proprietary) library package: oracleasmlib<\/p>\n<p>\u0421\u043a\u0430\u0447\u0430\u0442\u044c oracleasm-support, oracleasmlib \u043c\u043e\u0436\u043d\u043e \u0437\u0434\u0435\u0441\u044c &#8211; http:\/\/www.oracle.com\/technetwork\/server-storage\/linux\/asmlib\/rhel6-1940776.html.<br \/>\n&#8216;The kernel driver package &#8216;kmod-oracleasm&#8217; is available directly from Red Hat, and can be installed from the &#8220;RHEL Server Supplementary (v. 6 64-bit x86_64)&#8221; channel on Red Hat Network (RHN).&#8217;<br \/>\n\u0421\u043f\u043e\u0441\u043e\u0431\u044b \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438 \u043d\u0430 RHEL Server Supplementary (v. 6 64-bit x86_64) \u043a\u0430\u043d\u0430\u043b:<br \/>\n1. CLI<br \/>\nrhn-channel &#8211;list<br \/>\nrhn-channel &#8211;add &#8211;channel=rhel-x86_64-server-supplementary-6<br \/>\nrhn-channel &#8211;list<br \/>\n2. Red Hat Network Web Interface<\/p>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043f\u0430\u043a\u0435\u0442\u043e\u0432:<br \/>\nrpm -Uhv oracleasmlib-2.0.4-1.el6.x86_64.rpm<br \/>\nrpm -Uhv oracleasm-support-2.1.8-1.el6.x86_64.rpm<br \/>\nyum install kmod-oracleasm<\/p>\n<p>rpm -qa | grep oracleasm<\/p>\n<p>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u0434\u0438\u0441\u043a\u043e\u0432:<br \/>\nfdisk -l<br \/>\nfdisk \/dev\/sdb<br \/>\nn p 1 [ENTER] w<\/p>\n<p>fdisk \/dev\/sd\u0441<br \/>\nn p 1 [ENTER] w<\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u043b\u0438\u0441\u044c \u043b\u0438 \u043f\u0430\u0440\u0442\u0438\u0446\u0438\u0438 \u0442\u0438\u043f\u0430 &#8220;Linux&#8221;:<br \/>\nfdisk -l \/dev\/sdb<br \/>\nfdisk -l \/dev\/sd\u0441<\/p>\n<p>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 ASMLib:<br \/>\noracleasm configure<\/p>\n<p>\/usr\/sbin\/oracleasm configure<br \/>\nORACLEASM_ENABLED=false<br \/>\nORACLEASM_UID=<br \/>\nORACLEASM_GID=<br \/>\nORACLEASM_SCANBOOT=true<br \/>\nORACLEASM_SCANORDER=&#8221;&#8221;<br \/>\nORACLEASM_SCANEXCLUDE=&#8221;&#8221;<br \/>\nORACLEASM_USE_LOGICAL_BLOCK_SIZE=&#8221;false&#8221;<\/p>\n<p>\u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c:<br \/>\n\/etc\/init.d\/oracleasm configure<br \/>\nDefault user to own the driver interface [grid]:<br \/>\nDefault group to own the driver interface [asmadmin]:<br \/>\nStart Oracle ASM library driver on boot (y\/n) [y]:<br \/>\nScan for Oracle ASM disks on boot (y\/n) [y]:<\/p>\n<p>\/etc\/init.d\/oracleasm start<\/p>\n<p>\u0421\u043c\u043e\u0442\u0440\u0438\u043c \u0447\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c:<br \/>\noracleasm configure:<br \/>\nORACLEASM_ENABLED=true<br \/>\nORACLEASM_UID=grid<br \/>\nORACLEASM_GID=asmadmin<br \/>\nORACLEASM_SCANBOOT=true<br \/>\nORACLEASM_SCANORDER=&#8221;&#8221;<br \/>\nORACLEASM_SCANEXCLUDE=&#8221;&#8221;<br \/>\nORACLEASM_USE_LOGICAL_BLOCK_SIZE=&#8221;false&#8221;<\/p>\n<p>lsmod oracleasm &#8211; \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d \u043b\u0438 \u043c\u043e\u0434\u0443\u043b\u044c<\/p>\n<p>\u0418\u043c\u0435\u043d\u043d\u043e \u0441 \u043f\u0440\u0430\u0432\u0430\u043c\u0438 grid:asmadmin \u0431\u0443\u0434\u0443\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u0438\u0441\u043a\u0438 \u0432 ASMLib.<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0434\u0438\u0441\u043a\u0438:<br \/>\n\/etc\/init.d\/oracleasm createdisk ASMDISK01 \/dev\/sdb1<br \/>\n\/etc\/init.d\/oracleasm createdisk ASMDISK02 \/dev\/sdc1<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u043e\u0448\u0438\u0431\u043a\u0430 \u0432\u0438\u0434\u0430:<br \/>\n&#8216;Marking disk &#8220;ASMDISK01&#8221; as an ASM disk: [FAILED]&#8217;, \u0442\u043e \u0432 \/var\/log\/oracleasm \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c &#8220;permission denied&#8221;, \u0442\u043e \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u043f\u0440\u0438\u0447\u0438\u043d\u0430 \u044d\u0442\u043e\u0433\u043e &#8211; \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u044b\u0439 \u0432 enforcing SELinux.<br \/>\n\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c:<br \/>\ngetenforce<br \/>\n\u0415\u0441\u043b\u0438 \u0432\u044b\u0432\u043e\u0434\u0438\u0442 enforcing, \u0442\u043e vi \/etc\/sysconfig\/selinux:<br \/>\nSELINUX=permissive \u0438\u043b\u0438 SELINUX=disabled<br \/>\n\u043b\u0438\u0431\u043e<br \/>\ncat &gt; oracleasm.te &lt;&lt; EOF<br \/>\nmodule oracleasm 1.0;<br \/>\nrequire {<br \/>\ntype unlabeled_t;<br \/>\nclass filesystem associate;<br \/>\n}<br \/>\nallow unlabeled_t unlabeled_t:filesystem associate;<br \/>\nEOF<br \/>\ncheckmodule -M -m -o oracleasm.mod oracleasm.te<br \/>\nsemodule_package -o oracleasm.pp -m oracleasm.mod<br \/>\nsemodule -i oracleasm.pp<\/p>\n<p>showdown -r now \u0438 \u0437\u0430\u043d\u043e\u0432\u043e \u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0434\u0438\u0441\u043a\u0438.<\/p>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043f\u043e\u0441\u043b\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0434\u0438\u0441\u043a\u043e\u0432:<br \/>\noracleasm listdisks<br \/>\noracleasm scandisks<br \/>\nls -l \/dev\/oracleasm\/disks\/*<br \/>\nbrw-rw&#8212;-. 1 grid asmadmin 8, 17 \u041e\u043a\u0442 9 14:07 \/dev\/oracleasm\/disks\/ASMDISK01<br \/>\nbrw-rw&#8212;-. 1 grid asmadmin 8, 33 \u041e\u043a\u0442 9 14:07 \/dev\/oracleasm\/disks\/ASMDISK02<\/p>\n<p>\u0421\u0441\u044b\u043b\u043a\u0438:<br \/>\n<a href=\"http:\/\/et.elostech.cz\/docs\/en-US\/html\/Installation_Guide\/Subscribing_to_the_Red_Hat_Enterprise_Virtualization_Manager_Channels_using_RHN_Classic.html\">http:\/\/et.elostech.cz\/docs\/en-US\/html\/Installation_Guide\/Subscribing_to_the_Red_Hat_Enterprise_Virtualization_Manager_Channels_using_RHN_Classic.html<\/a><br \/>\n<a href=\"https:\/\/access.redhat.com\/site\/documentation\/en-US\/Red_Hat_Enterprise_Virtualization\/3.0\/html\/Installation_Guide\/Tasks_RHEV_Red_Hat_Network_Subscription.html\">https:\/\/access.redhat.com\/site\/documentation\/en-US\/Red_Hat_Enterprise_Virtualization\/3.0\/html\/Installation_Guide\/Tasks_RHEV_Red_Hat_Network_Subscription.html<\/a><br \/>\n<a href=\"http:\/\/www.dbaexpert.com\/blog\/red-hat6-support-for-asmlib\/\">http:\/\/www.dbaexpert.com\/blog\/red-hat6-support-for-asmlib\/<\/a><br \/>\n<a href=\"http:\/\/www.dba-oracle.com\/t_asm_disk_does_not_exist_or_is_not_instantiated.htm\">http:\/\/www.dba-oracle.com\/t_asm_disk_does_not_exist_or_is_not_instantiated.htm<\/a><br \/>\n<a href=\"http:\/\/pythianpang.wordpress.com\/2009\/06\/23\/initializing-the-oracle-asmlib-driver-failed-selinux-is-turned-on\/\">http:\/\/pythianpang.wordpress.com\/2009\/06\/23\/initializing-the-oracle-asmlib-driver-failed-selinux-is-turned-on\/<\/a><br \/>\n<a href=\"http:\/\/midba.blogspot.ru\/2013\/04\/redhat-64-comes-with-supporting-asm.html\">http:\/\/midba.blogspot.ru\/2013\/04\/redhat-64-comes-with-supporting-asm.html<\/a><br \/>\n<a href=\"http:\/\/docs.oracle.com\/cd\/E11882_01\/install.112\/e17212\/storage.htm#CHDFAGJD\">http:\/\/docs.oracle.com\/cd\/E11882_01\/install.112\/e17212\/storage.htm#CHDFAGJD<\/a><br \/>\n<a href=\"https:\/\/access.redhat.com\/site\/articles\/216093\">https:\/\/access.redhat.com\/site\/articles\/216093<\/a><br \/>\n<a href=\"http:\/\/en.community.dell.com\/techcenter\/enterprise-solutions\/w\/oracle_solutions\/3336.how-to-deploy-oracle-11gr2-on-rhel6oracle-linux-6.aspx\">http:\/\/en.community.dell.com\/techcenter\/enterprise-solutions\/w\/oracle_solutions\/3336.how-to-deploy-oracle-11gr2-on-rhel6oracle-linux-6.aspx<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Installing and Configuring ASMLib **Applies to RHEL 6 and if not setting udev rules: ASMLib consists of the following components: An open source (GPL) kernel module package: kmod-oracleasm An open source (GPL) utilities package: oracleasm-support A closed source (proprietary) library package: oracleasmlib \u0421\u043a\u0430\u0447\u0430\u0442\u044c oracleasm-support, oracleasmlib \u043c\u043e\u0436\u043d\u043e \u0437\u0434\u0435\u0441\u044c &#8211; http:\/\/www.oracle.com\/technetwork\/server-storage\/linux\/asmlib\/rhel6-1940776.html. &#8216;The kernel driver package &#8216;kmod-oracleasm&#8217; is [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[231],"tags":[183,184,32,86,28,14,11],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/trichev.com\/blog\/wp-json\/wp\/v2\/posts\/561"}],"collection":[{"href":"https:\/\/trichev.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/trichev.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/trichev.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/trichev.com\/blog\/wp-json\/wp\/v2\/comments?post=561"}],"version-history":[{"count":5,"href":"https:\/\/trichev.com\/blog\/wp-json\/wp\/v2\/posts\/561\/revisions"}],"predecessor-version":[{"id":615,"href":"https:\/\/trichev.com\/blog\/wp-json\/wp\/v2\/posts\/561\/revisions\/615"}],"wp:attachment":[{"href":"https:\/\/trichev.com\/blog\/wp-json\/wp\/v2\/media?parent=561"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/trichev.com\/blog\/wp-json\/wp\/v2\/categories?post=561"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/trichev.com\/blog\/wp-json\/wp\/v2\/tags?post=561"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}