<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:media="http://search.yahoo.com/mrss/"><channel><title><![CDATA[asm - Svetoslav Gyurov technical blog]]></title><description><![CDATA[Technology and data]]></description><link>https://sve.to/</link><image><url>https://sve.to/favicon.png</url><title>asm - Svetoslav Gyurov technical blog</title><link>https://sve.to/</link></image><generator>Ghost 4.4</generator><lastBuildDate>Sun, 05 Apr 2026 16:09:16 GMT</lastBuildDate><atom:link href="https://sve.to/tag/asm/rss/" rel="self" type="application/rss+xml"/><ttl>60</ttl><item><title><![CDATA[Introducing Oracle ASM Filter Driver]]></title><description><![CDATA[<!--kg-card-begin: markdown--><p>The Oracle ASMFD (Filter Driver) was introduced in Oracle Database 12.1.0.2 and as of the moment it is available on Linux systems only.</p>
<p>Oracle ASM Filter Driver is a kernel module very much like the ASMLIB that resides in the I/O path of the Oracle ASM</p>]]></description><link>https://sve.to/2015/10/27/introducing-oracle-asm-filter-driver/</link><guid isPermaLink="false">5e18e5398885e2151c0555f9</guid><category><![CDATA[asm]]></category><category><![CDATA[oracle]]></category><category><![CDATA[12c]]></category><dc:creator><![CDATA[Svetoslav Gyurov]]></dc:creator><pubDate>Tue, 27 Oct 2015 11:32:00 GMT</pubDate><content:encoded><![CDATA[<!--kg-card-begin: markdown--><p>The Oracle ASMFD (Filter Driver) was introduced in Oracle Database 12.1.0.2 and as of the moment it is available on Linux systems only.</p>
<p>Oracle ASM Filter Driver is a kernel module very much like the ASMLIB that resides in the I/O path of the Oracle ASM disks. It provides an interface between the Oracle binaries and the underlying operating environment.</p>
<p>Here are some of the features of ASMFD:</p>
<ul>
<li>Reject non-Oracle I/O</li>
</ul>
<p>The ASM filter driver will reject write I/O operation issued by non-Oracle commands. This prevents non-Oracle applications from writing to ASM disks and protects ASM from accidental corruption.</p>
<ul>
<li>Device name persistence</li>
</ul>
<p>Similarly to ASMLIB you don&apos;t have to configure the device name persistence using UDEV.</p>
<ul>
<li>Faster node recovery</li>
</ul>
<p>According to the documentation ASMFD allows Oracle Clusterware to perform node level fencing without a reboot. So in case of CSS is not running or nodes are fenced the Oracle stack will be restarted instead of node to be rebooted. This is greatly reduce the boot time as with some enterprise servers it might take up to 10 minutes to boot.</p>
<ul>
<li>Reduce OS resource usage</li>
</ul>
<p>ASMFD exposes a portal device that can be used for all I/O on a particular host and thus decreasing the number of open file descriptors. With it each ASM process needs to have an open descriptor to each ASM disk. I&apos;m not sure how much this will save you but might be useful in case you got hundreds of ASM disks.</p>
<ul>
<li>Thin Provisioning &amp; Data Integrity</li>
</ul>
<p>This is another new and cool feature which is very popular in the virtualization world. When enabled the disk space not in use can be returned to the array also known as thin-provisioning. This attribute can be set only if the ASM compatibility is greater than or equal to 12.1.0.0 and requires you to use ASMFD!</p>
<p>In a way ASMFD is a replacement of ASMLIB as it includes base-ASMLIB features. However ASMFD takes it one step further by protecting the ASM disks from non-oracle write I/O operations to prevent accidental damage. Unlike ASMLIB the ASMFD is installed with the Oracle Grid Infrastructure installation.</p>
<h4 id="briefhistoryofasmandtheneedofasmfilterdriver">Brief history of ASM and the need of ASM Filter Driver</h4>
<p>To understand ASMFD better we need to understand where the need comes from. It&apos;s important to say that this is very specific to Linux as other platforms have other methods to fulfill the requirements. Because that&apos;s not the purpose of this post and it&apos;s too long I decide to keep it at the end of the post.</p>
<p>In Linux as in any other platform there is a user separation which implies access restrictions. In Linux we usually install Oracle Database under the oracle user and to do so we need to have writable access to the directories we plan to use. By default that would be /home/oracle/ and as you can imagine that&apos;s not very handy, also you might want to install the database in separate partition or file system. For this reason the root user will create the required directories and change their ownership to oracle, that is usually /u01 or /opt.</p>
<p>That would work if you want to store your database files in a file system. However the traditional file systems were not designed for database files, they need to have a file system check on a regular basis and sometimes they might get corrupted. For that reason and performance perspective many people would move to RAW devices in the past. Another case would be if you want to run RAC - you&apos;ll either need a cluster file system or RAW devices.</p>
<p>Historically with 9i and 10g we used to create RAW devices which are one to one mapping between a device file and a logical name. For example you would create partition on each device /dev/sda1, /deb/sdb1 and then map those to /dev/raw/raw1, /dev/raw/raw2 and so on. Additional because in Linux the device files are rebuild each time the system reboots you need to make sure the permissions and ownership are preserved and persist after system reboot. This was achieved by having additional rules in your last boot scripts (often rc.local). For other platforms like HP-UX for example one had to buy additional license (HP Service Guard extension for RAC) which would give you the ability to have a shared LVM groups across two or more servers.</p>
<p>However the support and maintenance of raw devices was really difficult and Oracle came up with the idea to create their own volume manager to simplify database administration and eliminate the need to manage thousands of database files - Automatic Storage Management, ASM for short. A simple description is that ASM is very sophisticated volume manager for Oracle data. ASM could also be used if you deploy RAC hence you don&apos;t need cluster file systems or RAW devices anymore. Additionally it provides a redundancy so if you have JBOD you can use ASM to do the mirroring of the data. Another important feature is that you don&apos;t need persistent device naming anymore. Upon start ASM will read all the disk drives specified by asm_diskstring and use the ones on which ASM header is found. Although ASM was released in 10.1 people were still using raw devices at the time because ASM was too new and unknown for many DBAs.</p>
<p>So ASM will logically group all the disks (LUNs presented from the storage) into what&apos;s called ASM disk groups and because it&apos;s using Oracle Managed Files you don&apos;t really care anymore where your files are and what their names are. ASM is just another abstraction layer in the database file storage. ASM is available on all platforms so in a way it will standardize the administration of database files. Often the DBAs will also administer the ASM but it could be the storage team managing the ASM. You still had to make sure the device files have the correct permissions before ASM could use them, otherwise no diskgroup will be available hence database could not start.</p>
<p>At the same time back in 2004 Oracle released another product ASMLib which only purpose was to persist the device naming and preserve the device files permissions. I don&apos;t want to go into details about ASMLib here but there is an old and very good post on ASMLib from Wim Coekaerts (<a href="https://blogs.oracle.com/wim/entry/asmlib">HERE</a>). Just to mention that ASMLib is also available under RHEL, more can be found <a href="https://access.redhat.com/solutions/315643">HERE</a>.</p>
<p>In the recent years many people like myself used UDEV to persist the permissions and ownership of the device files used by ASM. I really like to have one to one match between device files and ASM disk names for better understanding and ease any future troubleshooting.</p>
<p>ASM Filter Driver takes this one step further by introducing the features above. I can see people start using ASMFD to take advantage of the thin provisioning OR make sure no one will overwrite (by mistake) the ASM device files, yes this happened to be recently.</p>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[ASM diskgroup unable to mount because of duplicate disk]]></title><description><![CDATA[<!--kg-card-begin: markdown--><p>This is something I would like to share for a long time, but for one or another reason I didn&apos;t. The error is nothing special, but then I run into very interesting case.</p>
<p>This happen when I had to shutdown one server for maintenance and then boot it</p>]]></description><link>https://sve.to/2012/03/06/asm-diskgroup-unable-to-mount-because-of-duplicate-disk/</link><guid isPermaLink="false">5e18e5398885e2151c0555d2</guid><category><![CDATA[10.2]]></category><category><![CDATA[dba]]></category><category><![CDATA[asm]]></category><dc:creator><![CDATA[Svetoslav Gyurov]]></dc:creator><pubDate>Tue, 06 Mar 2012 10:44:20 GMT</pubDate><content:encoded><![CDATA[<!--kg-card-begin: markdown--><p>This is something I would like to share for a long time, but for one or another reason I didn&apos;t. The error is nothing special, but then I run into very interesting case.</p>
<p>This happen when I had to shutdown one server for maintenance and then boot it again. Once the OS started I notice that the database didn&apos;t ran automatically. When I try to run it manually I got the following error:</p>
<p>[plain]SQL&gt; startup<br>
ORA-01078: failure in processing system parameters<br>
ORA-01565: error in identifying file &apos;+DATA/orcl/spfileorcl.ora&apos;<br>
ORA-17503: ksfdopn:2 Failed to open file +DATA/orcl/spfileorcl.ora<br>
ORA-15077: could not locate ASM instance serving a required diskgroup[/plain]</p>
<p>The reason for this was that the ASM diskgroup wasn&apos;t mounted, again I tried to mount it manually, when I got this error:</p>
<p>[plain]SQL&gt; alter diskgroup data mount;<br>
alter diskgroup data mount<br>
*<br>
ERROR at line 1:<br>
ORA-15032: not all alterations performed<br>
ORA-15024: discovered duplicately numbered ASM disk 29[/plain]</p>
<p>So how could this happen as I didn&apos;t change any of the parameter and configuration, the database was started for just three months. Running quick script with kfed:</p>
<pre><code>ls -1 /dev/oracle/*for i in `ls -1 /dev/oracle/*`; do echo /dev/oracle/$i; kfed read /dec/oracle/$i | grep kfdhdb.dskname; done
</code></pre>
<p>showed me that I there are really two duplicate disks. ASM does not support disks with the same disk names, even if this is the same disk, but accessed by different path. The duplicate disk was an old disk, which wasn&apos;t removed at the time of the change, only its filename was changed so once ASM discovers disks in the future this one would be excluded.</p>
<p>Looking at the asm_diskstring I found that it has changed to &apos;/dev/oracle/*&apos; and should be &apos;/dev/oracle/orcl*&apos; and that&apos;s why ASM was scanning all the disks. This made me think what could happen for the time database was running and why this happen.</p>
<p>After looking at the logs and made few tests I had a conclusion. At some point when the DBA added new disks to ASM he done it through the dbca and he changed the discovery string for unknown reason. What happens in background is that dbca, implicitly is recreating the ASM parameter file with the new discovery string entered by the DBA. This is why ASM started with wrong discovery string when I rebooted the server and it discovered more disks.</p>
<p>The database ran at 26 March and a month later at 29 April new disks were added to the ASM and its parameter was recreated, almost two months later at 7 July I turned it back with correct values:</p>
<pre><code>-rw-r----- 1 oracle oinstall 1336 Jul 7 18:42 init.ora
-rw-r----- 1 oracle oinstall 1327 Apr 29 11:32 init.ora.662011221038
</code></pre>
<p>Regards,<br>
Sve</p>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Unable to create ASM disk under OEL 6.x]]></title><description><![CDATA[<!--kg-card-begin: markdown--><p>It was busy month and I&apos;m behind with my blog posts. First of all Happy New Year to all of you and wish you all the best through the new year!</p>
<p>This is a short note for installing Oracle Database with ASM under Oracle Enterprise Linux 6.x,</p>]]></description><link>https://sve.to/2012/02/22/unable-to-create-asm-disk-under-oel-6-x/</link><guid isPermaLink="false">5e18e5398885e2151c0555d1</guid><category><![CDATA[11.2]]></category><category><![CDATA[asm]]></category><dc:creator><![CDATA[Svetoslav Gyurov]]></dc:creator><pubDate>Wed, 22 Feb 2012 11:48:34 GMT</pubDate><content:encoded><![CDATA[<!--kg-card-begin: markdown--><p>It was busy month and I&apos;m behind with my blog posts. First of all Happy New Year to all of you and wish you all the best through the new year!</p>
<p>This is a short note for installing Oracle Database with ASM under Oracle Enterprise Linux 6.x, which is not certified YET!</p>
<p>If you are running ASM with ASMLib you may get the following error when try to create ASM disk:</p>
<pre><code>[root@db-app2 ~]# oracleasm createdisk DISK01 /dev/mapper/data01
Writing disk header: done
Instantiating disk: failed
Clearing disk header: done
</code></pre>
<p>Writing the header on the disk fails without obvious reason. Well, it turned out that Security Linux was blocking the access to the disk. Because configuration of SELinux is not part of the startup configuration any more I just forgot it.</p>
<p>To disable the SELinux edit file /etc/selinux/config and configure SELINUX=disabled. Then reboot your system and run getenforce to confirm that SELinux is disabled:</p>
<pre><code>[root@db-app2 ~]# /usr/sbin/getenforce
Disabled
</code></pre>
<p>The ASM disk is created successfully this time:</p>
<pre><code>[root@db-app2 ~]# oracleasm createdisk DISK01 /dev/mapper/data01
Writing disk header: done
Instantiating disk: done
</code></pre>
<p>Regards,<br>
Sve</p>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Troubleshooting ASM 11.2 disk discovery]]></title><description><![CDATA[<!--kg-card-begin: markdown--><p>I was doing some installation at customer site when they asked if there anything specific to run GI 11.2 on HP-UX as this was their first interaction with 11g. Of course I replied that there is nothing specific, just to make sure the ownership of the raw disk is</p>]]></description><link>https://sve.to/2011/12/14/troubleshooting-asm-11-2-disk-discovery/</link><guid isPermaLink="false">5e18e5398885e2151c0555cf</guid><category><![CDATA[lvm]]></category><category><![CDATA[asm]]></category><dc:creator><![CDATA[Svetoslav Gyurov]]></dc:creator><pubDate>Wed, 14 Dec 2011 12:23:08 GMT</pubDate><content:encoded><![CDATA[<!--kg-card-begin: markdown--><p>I was doing some installation at customer site when they asked if there anything specific to run GI 11.2 on HP-UX as this was their first interaction with 11g. Of course I replied that there is nothing specific, just to make sure the ownership of the raw disk is correct and had a correct ASM discovery string. They said that this is all done as it&apos;s written in the documentation, but disks could not be discovered. This made me curious and asked them to log me in the system so I could have a look.</p>
<p>The system was running latest HP-UX 11.31 and we were going to install Oracle GI 11.2.0.2, the LUN was presented from HP EVA storage.</p>
<p>I couldn&apos;t believe what they are saying and wanted them to show me what exactly they are doing. Unfortunately they were correct, after installing GI 11.2.0.2 software only, we tried to create an asm instance with asmca, but no disks were discovered although everything looked correct.</p>
<p>While I was looking around I remembered that the disk owner patch in HP-UX is a mandatory and it should be installed as the installation guide says this explicitly. I asked the customer and he said that all the required patches are installed, but when I checked the patch wasn&apos;t  installed. The patch number as per installation guide is PHCO_41479, but the latest version is PHCO_41903. Also running kfed against disk on system on which the patch is not installed shows following:</p>
<pre><code>KFED-00322: Invalid content encountered during block traversal: [kfbtTraverseBlock][Invalid OSM block type][][0]
</code></pre>
<p>I installed the patch and double checked everything and thought that this could be the reason why we are not seeing the disk, so I try to discover the disk, but again without success. The disk couldn&apos;t be seen at ASM so I had to go deeper and see what asmca was actually doing. For the purpose I had to trace the system calls and for HP-UX the utility capable of doing this was tusc. There is MOS note describing how to trace systems call and what utilities should be used with different unix distributions [ ID 110888.1].</p>
<p>I run asmca and then using tusc got attached to its process, then changed the discovery string, pointing exactly to the disk I would like to use (in my case /dev/rdisk/disk3). So this is the paragraph which makes sense to me:</p>
<pre><code>access(&quot;/dev/rdisk/disk3&quot;, W_OK|R_OK) 	........................................................................... = 0
.......
open(&quot;/dev/rdisk/disk3&quot;, O_RDONLY|O_NDELAY|0x800, 0) 	............................................................ = 7
lseek(7, 8192, SEEK_SET) 	.................................................................................	....... = 8192
read(7, &quot;L V M R E C 0 1 \r/ % aeN e2\va0&quot;.., 1024) 	............................................................. = 1024
lseek(7, 73728, SEEK_SET) 	.................................................................................	...... = 73728
read(7, &quot;L V M R E C 0 1 \r/ % aeN e2\va0&quot;.., 1024) 		............................................................. = 1024
close(7) 	.................................................................................	....................... = 0
</code></pre>
<p>The disk is first successfully tested for read and write access and it&apos;s opened for read-only in non-blocking mode. Then first 1024 bytes are read from offset 8192 from /dev/rdisk/disk3. This looked like a LVM header, AHA! So it seems that the disk was once used as LVM Physical Volume. Although the disk is not part of any volume group it has a LVM header and that&apos;s why asmca it not showing this disk as CANDIDATE. It turned out that storage admins did not recreate the virtual disk on the storage, but the LUN was once used for LVM on another server.</p>
<p>After doing dd on the disk now the header looks better and disk could be seen as CANDIDATE:</p>
<pre><code>oracle@vm:/$ dd if=/dev/zero of=/dev/rdisk/disk3 bs=1024k count=10
</code></pre>
<p>Now tusc output shows that header is filled with zeros:</p>
<pre><code>read(7, &quot;\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0&quot;.., 1024) ........................................................ = 1024
</code></pre>
<p>Just for troubleshooting purpose I try to read the disk header with kfed, before and after showed the same error:</p>
<pre><code>KFED-00322: file not found; arguments: [kfbtTraverseBlock] [Invalid OSM block type] [] [0]
</code></pre>
<p>If you are not sure whether the disk contains valuable information you could import the physical volume and activate the volume group. In my case I was sure that the disk should be deleted and simple dd do the job.</p>
<p>Regards,<br>
Sve</p>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Cannot drop the first disk group in ASM 11.2]]></title><description><![CDATA[<!--kg-card-begin: markdown--><p>I&apos;ve been using ASM for long time in different configurations, with pfile, with spfile and in some configurations on shared raw device. Playing with ASM 11gR2 (Grid Infrastructure) it happens to me that I cannot neither drop neither dismount the first disk group.</p>
<p>The following error can be</p>]]></description><link>https://sve.to/2010/10/11/cannot-drop-the-first-disk-group-in-asm-11-2/</link><guid isPermaLink="false">5e18e5398885e2151c0555b5</guid><category><![CDATA[11.2]]></category><category><![CDATA[asm]]></category><dc:creator><![CDATA[Svetoslav Gyurov]]></dc:creator><pubDate>Mon, 11 Oct 2010 16:42:28 GMT</pubDate><content:encoded><![CDATA[<!--kg-card-begin: markdown--><p>I&apos;ve been using ASM for long time in different configurations, with pfile, with spfile and in some configurations on shared raw device. Playing with ASM 11gR2 (Grid Infrastructure) it happens to me that I cannot neither drop neither dismount the first disk group.</p>
<p>The following error can be seen in asmca when try to dismount the first disk group:</p>
<p>Dismounting DiskGroup DATA failed with the following message:</p>
<pre><code>ORA-15032: not all alterations performed
ORA-15027: active use of diskgroup &quot;DATA&quot; precludes its dismount
</code></pre>
<p>If you go to sqlplus and try to drop the disk group, there is an error that the disk group is actually still active:</p>
<pre><code>SQL&gt; drop diskgroup data including contents;
drop diskgroup data including contents
*
ERROR at line 1:
ORA-15039: diskgroup not dropped
ORA-15027: active use of diskgroup &quot;DATA&quot; precludes its dismount
</code></pre>
<p>So, let&apos;s try to dismount it:</p>
<pre><code>SQL&gt; alter diskgroup all dismount;
alter diskgroup all dismount
*
ERROR at line 1:
ORA-15032: not all alterations performed
ORA-15027: active use of diskgroup &quot;DATA&quot; precludes its dismount
</code></pre>
<p>Lets see why the active group is still active. Query of v$asm_file shows all files located at this disk group:</p>
<pre><code>SQL&gt; select group_number, file_number, bytes, type from v$asm_file; GROUP_NUMBER FILE_NUMBER  BYTES TYPE
------------ ----------- ---------- --------------------
1            253         1536       ASMPARAMETERFILE
</code></pre>
<p>It seems that the ASM instance server parameter file is located in the first created disk group and thats why I cannot dismount it.</p>
<p>Quick check confirms that:</p>
<pre><code>SQL&gt; show parameter spfile
NAME  TYPE  VALUE
--------- ----------- ------------------------------
spfile  string  +DATA/asm/asmparameterfile/registry.253.731706127

srvctl command also can be used to confirm that:

[oracle@oradb /]$ srvctl config asm
...
Spfile: +DATA/asm/asmparameterfile/registry.253.731706127
...
</code></pre>
<p>I made an experiment and I just installed the grid infrastructure software. Then I went with asmca to create ASM instance. There is a button ASM Parameters and then Show Advanced Parameters. There is clearly written that the parameter file is located in $ORACLE_HOME/dbs/spfile+ASM.ora</p>
<p>It seems that after the installation the file is moved to the disk group. So if you really want to drop the disk group you should move the spfile from the disk group to the file system (or other disk group), then shutdown and startup the ASM instance and then drop the disk group. The traditional way would be to create pfile from spfile and then start the instance with pfile. There are couple of commands in ASM 11.2 available in asmcmd, one of them is spmove. It gives you the ability to move the spfile and automatically updates Grid Plug and Play (GPnP) profile. Another one is spget which gives you the current location of the ASM instance server parameter file.</p>
<p>Start the asmcmd utility and execute spget to get the current spfile, then spmove to move the spfile from the disk group to the file system:</p>
<pre><code>[oracle@oradb ~]$ asmcmd
ASMCMD&gt; spget 
+DATA/asm/asmparameterfile/registry.253.731706127
ASMCMD&gt; spmove &apos;+DATA/asm/asmparameterfile/registry.253.731706127&apos; &apos;/oracle/grid11g/dbs/spfile+ASM.ora&apos;;
ORA-15032: not all alterations performed
ORA-15028: ASM file &apos;+DATA/asm/asmparameterfile/registry.253.731706127&apos; not dropped; currently being accessed (DBD ERROR: OCIStmtExecute)
ASMCMD&gt; spget
/oracle/grid11g/dbs/spfile+ASM.ora;
</code></pre>
<p>I get the error that the file is still being used, but actually the file is copied to the file system and the profile is updated. Now shutdown and startup the ASM instance:</p>
<pre><code>SQL&gt; shutdown immediate
ASM diskgroups dismounted
ASM instance shutdown
SQL&gt; startup
ASM instance started

Total System Global Area  283930624 bytes
Fixed Size		    2212656 bytes
Variable Size		  256552144 bytes
ASM Cache		   25165824 bytes
ASM diskgroups mounted
SQL&gt; show parameter spfile;

NAME  TYPE	 VALUE
----------  ----------- ------------------------------
spfile	    string	 /oracle/grid11g/dbs/spfile+ASM.ora;
</code></pre>
<p>spget command also can be used to get the current spfile location from GPnP profile:</p>
<pre><code>[oracle@oradb ~]$ asmcmd
ASMCMD&gt; spget
/oracle/grid11g/dbs/spfile+ASM.ora;
</code></pre>
<p>So now we have the same behavior of ASM prior 11gR2, the server parameter file is in the file system and finally we can drop the disk group:</p>
<pre><code>SQL&gt; alter diskgroup data mount;

Diskgroup altered.
SQL&gt; drop diskgroup data including contents;
Diskgroup dropped.
</code></pre>
<p>This behavior of placing the spfile of the ASM instance inside ASM disk group is now recommended by Oracle. This is accomplished by the ASM background process ASMB, which reads the spfile from the disk group and starts the instance itself. Whats more if you want this behavior or use the new spmove/spcopy/spset/spget/spbackup commands, the disk group attribute COMPATIBLE.ASM must be set to 11.2</p>
<p>At the end I found that there is also MOS note about this problem:<br>
11gR2 (11.2.0.1) ORA-15027: active use of diskgroup precludes its dismount (With no database clients connected) [ID 1082876.1]</p>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Shared disk support for VirtualBox]]></title><description><![CDATA[<!--kg-card-begin: markdown--><p>I&apos;m very happy to announce that VirtualBox now supports shared disks. Finally we can attach one disk to several virtual machines and run Oracle RAC and other clusters. As Oracle promised, this feature is released with the next maintenance patch (thanks!).</p>
<p>There is a new image write mode</p>]]></description><link>https://sve.to/2010/08/09/shared-disks-support-for-virtualbox/</link><guid isPermaLink="false">5e18e5398885e2151c0555b3</guid><category><![CDATA[crs]]></category><category><![CDATA[rac]]></category><category><![CDATA[virtualbox]]></category><category><![CDATA[asm]]></category><dc:creator><![CDATA[Svetoslav Gyurov]]></dc:creator><pubDate>Mon, 09 Aug 2010 18:33:22 GMT</pubDate><content:encoded><![CDATA[<!--kg-card-begin: markdown--><p>I&apos;m very happy to announce that VirtualBox now supports shared disks. Finally we can attach one disk to several virtual machines and run Oracle RAC and other clusters. As Oracle promised, this feature is released with the next maintenance patch (thanks!).</p>
<p>There is a new image write mode which is called shareable and this options is now available for the commands createhd and modifyhd of VBoxManage. To create new shared image use the command VBoxManage createhd with type shareble, creating shared disk from the GUI is not possible. To mark an existing image as a shared use the command VBoxManage modifyhd with type shareable.</p>
<p>Something important is that only fixed size disks are supported. If the disk is dynamic you will encounter the following error if you try to modify the image:<br>
ERROR: Cannot change type for medium &apos;/home/vm/ora11g_shared.vdi&apos; to &apos;Shareable&apos; since it is a dynamic medium storage unit</p>
<p>There is other minor issue, if the image is already attached to two virtual machines the command modifyhd will also fail:<br>
ERROR: Cannot change the type of medium &apos;/home/vm/ora11g_shared.vdi&apos; because it is attached to 2 virtual machines</p>
<p>And finally, YES it works, I have tested it already!</p>
<p>sve@host:~$ VBoxManage showhdinfo /home/vm/ora11g_shared.vdi<br>
Oracle VM VirtualBox Command Line Management Interface Version 3.2.8<br>
(C) 2005-2010 Oracle Corporation<br>
All rights reserved.</p>
<pre><code>UUID:   7521f059-1196-4d68-a1a6-cf0082fb446a
Accessible:   yes
Description:  
Logical size:   2048 MBytes
Current size on disk:     2048 MBytes
Type:   shareable
Storage format:   VDI
In use by VMs:    labs1 (UUID: 25475ff4-70bc-4e2e-aa38-d8fae289273e)
				  labs2 (UUID: e4441f4c-1ef9-42e0-8e54-d2aec2c6cf4f)
Location:   /home/vm/ora11g_shared.vdi
</code></pre>
<p>Regards and happy migration ;)<br>
Sve</p>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Changing physical path of ASM disk group]]></title><description><![CDATA[<!--kg-card-begin: markdown--><p>The purpose of this document is to show that changing the psyhical path of ASM disk MEMBERS is possible and there is no risk.</p>
<p>For the purpose of the test, we create one logical volume called lvora and we grant ownership of this file to oracle:</p>
<pre><code>root@node1:/# lvcreate -n</code></pre>]]></description><link>https://sve.to/2009/08/11/changing-physical-path-of-asm-disk-group/</link><guid isPermaLink="false">5e18e5398885e2151c0555a6</guid><category><![CDATA[filesystem]]></category><category><![CDATA[lvm]]></category><category><![CDATA[asm]]></category><dc:creator><![CDATA[Svetoslav Gyurov]]></dc:creator><pubDate>Tue, 11 Aug 2009 09:52:06 GMT</pubDate><content:encoded><![CDATA[<!--kg-card-begin: markdown--><p>The purpose of this document is to show that changing the psyhical path of ASM disk MEMBERS is possible and there is no risk.</p>
<p>For the purpose of the test, we create one logical volume called lvora and we grant ownership of this file to oracle:</p>
<pre><code>root@node1:/# lvcreate -n lvora -L 1024 vg00
root@node1:/# chown oracle:dba /dev/vg00/rlvora
</code></pre>
<p>Start DBCA and create ASM instance:</p>
<ul>
<li>set sys password</li>
<li>set data group name to DATA</li>
<li>set redundancy to External</li>
<li>set Disk Discovery Path to /dev/vg00/rlv*</li>
</ul>
<p>At this stage only /dev/vg00/rlvora is CANDIDATE disk for disk group with size of 1 Gb.<br>
Select the disk and create the disk group. Now we have one mounted disk group called DATA with external redundancy and<br>
using /dev/vg00/rlvora as a MEMBER of the disk group.</p>
<p>To simulate changing (or failure) of the physical disk or even moving data from one physical disk to another we used dd<br>
to copy raw data from /dev/vg00/rlvora to /dev/rdsk/c0t2d0 and then we delete the logical volume.</p>
<p>We shutdown the ASM instance and copy the contents of the logical volume to the raw physical disk using dd:</p>
<pre><code>oracle@node1:/home/oracle$ export ORACLE_HOME=/oracle/ora10g
oracle@node1:/home/oracle$ export ORACLE_SID=+ASM
oracle@node1:/home/oracle$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Thu Dec 13 01:50:38 2007

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Connected to:
Oracle Database 10g Release 10.2.0.1.0 - 64bit Production
With the Real Application Clusters option

SQL&gt; select GROUP_NUMBER, NAME, STATE, TYPE from v$asm_diskgroup;

GROUP_NUMBER NAME                           STATE       TYPE
------------ ------------------------------ ----------- ------
1 DATA                           MOUNTED     EXTERN

SQL&gt; select GROUP_NUMBER, DISK_NUMBER, MODE_STATUS, STATE, NAME, PATH from v$asm_disk;

GROUP_NUMBER DISK_NUMBER MODE_ST STATE    NAME      PATH
------------ ----------- ------- -------- --------- ----------------
1             0          ONLINE  NORMAL   DATA_0000 /dev/vg00/rlvora

SQL&gt; shutdown immediate
ASM diskgroups dismounted
ASM instance shutdown
SQL&gt;  exit

oracle@node1:/home/oracle$ exit

root@node1:/root# chown oracle:dba /dev/rdsk/c0t2d0

root@node1:/root# dd if=/dev/vg00/rlvora of=/dev/rdsk/c0t2d0 bs=1024k
1024+0 records in
1024+0 records out
root@node1:/root#  lvremove /dev/vg00/lvora
The logical volume &quot;/dev/vg00/lvora&quot; is not empty;
do you really want to delete the logical volume (y/n) : y
Logical volume &quot;/dev/vg00/lvora&quot; has been successfully removed.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
</code></pre>
<p>We have moved data to /dev/rdsk/c0t2d0 and we have removed the logical volume.</p>
<p>Now if you try to mount the disk group or start the instance you will get the following error:</p>
<pre><code>oracle@node1:/home/oracle$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Thu Dec 13 02:05:48 2007

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Connected to an idle instance.

SQL&gt; startup
ASM instance started

Total System Global Area  130023424 bytes
Fixed Size                  1991968 bytes
Variable Size             102865632 bytes
ASM Cache                  25165824 bytes
ORA-15032: not all alterations performed
ORA-15063: ASM discovered an insufficient number of disks for diskgroup &quot;DATA&quot;

SQL&gt; select GROUP_NUMBER, NAME, STATE, TYPE from v$asm_diskgroup;

no rows selected

SQL&gt; select GROUP_NUMBER, DISK_NUMBER, MODE_STATUS, STATE, NAME, PATH from v$asm_disk;

no rows selected

SQL&gt; show parameter diskstring

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
asm_diskstring                       string      /dev/vg00/rlv*
</code></pre>
<p>As you can seen the discovery path is still pointing to /dev/vg00/rlv*, now we will change disk discovery path by pointing asm_diskstring parameter to the new location of the disk and we will mount the ASM instance:</p>
<pre><code>SQL&gt; alter system set asm_diskstring=&apos;/dev/rdsk/*&apos; scope=both;

System altered.

SQL&gt; select GROUP_NUMBER, DISK_NUMBER, MODE_STATUS, STATE, NAME, PATH from v$asm_disk;

GROUP_NUMBER DISK_NUMBER MODE_ST STATE    NAME      PATH
------------ ----------- ------- -------- --------- ----------------
0            0           ONLINE  NORMAL             /dev/rdsk/c0t2d0

SQL&gt; alter diskgroup data mount;

Diskgroup altered.

SQL&gt; select GROUP_NUMBER, DISK_NUMBER, MODE_STATUS, STATE, NAME, PATH from v$asm_disk;

GROUP_NUMBER DISK_NUMBER MODE_ST STATE    NAME      PATH
------------ ----------- ------- -------- --------- ----------------
1            0           ONLINE  NORMAL   DATA_0000 /dev/rdsk/c0t2d0

SQL&gt; select GROUP_NUMBER, NAME, STATE, TYPE from v$asm_diskgroup;

GROUP_NUMBER NAME                           STATE       TYPE
------------ ------------------------------ ----------- ------
1 DATA                           MOUNTED     EXTERN

SQL&gt; show parameter diskstring;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
asm_diskstring                       string      /dev/rdsk/*
</code></pre>
<p>Final test to show that the changes are applied:</p>
<pre><code>SQL&gt; shutdown immediate
ASM diskgroups dismounted
ASM instance shutdown
SQL&gt; startup
ASM instance started

Total System Global Area  130023424 bytes
Fixed Size                  1991968 bytes
Variable Size             102865632 bytes
ASM Cache                  25165824 bytes
ASM diskgroups mounted
SQL&gt; exit
Disconnected from Oracle Database 10g Release 10.2.0.1.0 - 64bit Production
With the Real Application Clusters option
</code></pre>
<p>Conclusion</p>
<p>ASM does not keep track of the physical disks of the data groups. Said in other way it does not matter the path or the mminor, major numbers of the physical disks, because the metadata is kept on the disk itself and there is nothing in the dictionary. When you start ASM instance it scans the disks based on the parameter asm_diskstring and reads the header information of the discovered disks.</p>
<!--kg-card-end: markdown-->]]></content:encoded></item><item><title><![CDATA[Migration of HP-UX raw devices to Oracle ASM]]></title><description><![CDATA[Learn how to move away from HP-UX raw devices to Oracle ASM.]]></description><link>https://sve.to/2009/08/10/migration-of-hp-ux-raw-devices-to-oracle-asm/</link><guid isPermaLink="false">5e18e5398885e2151c0555a5</guid><category><![CDATA[lvm]]></category><category><![CDATA[asm]]></category><dc:creator><![CDATA[Svetoslav Gyurov]]></dc:creator><pubDate>Mon, 10 Aug 2009 09:36:38 GMT</pubDate><content:encoded><![CDATA[<!--kg-card-begin: markdown--><p>This is an <a href="https://www.dropbox.com/s/exqugmjlhidnc9v/oracle10g_hpux_raw_to_asm.pdf?dl=0">article</a> which I wrote about how to migrate Oracle datafiles from LVM raw devices to Oracle ASM.</p>
<!--kg-card-end: markdown-->]]></content:encoded></item></channel></rss>