1 2 Previous Next 25 Replies Latest reply on Mar 21, 2013 9:36 AM by Mohanad Awad Go to original post
      • 15. Re: Re-size Oracle ASM space
        Mohanad Awad
        what is output of
        sql> select header_status from v$asm_disk;

        • 16. Re: Re-size Oracle ASM space
          Mohanad Awad wrote:
          No. But devices /dev/sdb and /dev/sdc seems like local devices? And you showed above these as partitions and partitions used as ASM disks?
          No it's not local device , it's come from storge , and my disk group contain just from one disk memeber ! from storge defination the group created from tow physical hard disk device ,
          If it is not a local device, what storage is used? What is the I/O fabric layer? Fibre channel (FC)? Infiniband? FCoE? Scsi over Ethernet? Something else?

          When a storage server is used, using device +/dev/sdc+ is very likely the wrong device to use. And if you +/dev/sdb+ is also a storage server device, it would also be likely the wrong device to use. The major reason is that these names are NOT guaranteed to be consistent and CAN AND DO often change to another device name after reboot.

          For FC and Infiniband devices, the +/dev/mpath+ or +/dev/emcpower+ devices need to be used. For Ethernet based storage devices, you should define a udev rule to create a symbolic device for it, basing the name on the unique WWID of the device and device path.

          ASM needs a CONSISTENT device name (which means a logical name for a SAN LUN and not local physical scsi device name), that also supports multi I/O paths (which is standard for most SAN storage).

          IMO a lack of knowledge on how storage devices need to be configured and used (not just for ASM, but as a general o/s principle), is a cause of serious concern and a major risk.
          • 17. Re: Re-size Oracle ASM space
            Mohanad Awad

            From log time this DB install -3 year - and server rebbot many time. without any issue !!

            what i read for my OS version 5.4 :

            Configuring raw disks on RHEL 4 was done via the rawdevices service, which seems to be unavailable on RHEL 5.0 and 5.1. I haven't checked RHEL 5.2 and 5.3, but 5.4 and 5.5 do have it back. Here I will demonstrate how can we use "UDEV" to configure raw devices on RHEL 5.0 and 5.1.



            all my issue is on raw device how to use not more !

            /bin/raw >> exist ! but no raw1 , raw2 ....
            /dev/raw/raw1 >> dose not exist

            [root@XX rules.d]# cd /dev/raw
            -bash: cd: /dev/raw: No such file or directory
            [root@XX rules.d]#

            [root@XX init.d]# cat /etc/sysconfig/rawdevices
            # raw device bindings
            # format: <rawdev> <major> <minor>
            # <rawdev> <blockdev>
            # example: /dev/raw/raw1 /dev/sda1
            # /dev/raw/raw2 8 5


            so how it come ?

            Edited by: Mohanad Awad on Feb 27, 2013 3:40 AM
            • 18. Re: Re-size Oracle ASM space
              One thing you might want to do is search for a book called "Automatic Storage Management - Under-the-Hood - A Practical Deployment Guide". This will give you a great overview of how ASM diskgroups actually work. You really need to understand how ASM does works.
              1 person found this helpful
              • 19. Re: Re-size Oracle ASM space
                Mohanad Awad wrote:

                all my issue is on raw device how to use not more !
                The rawdevices approach was used to perform direct I/O on block devices, via a character device I/O interface, as block devices did not support direct I/O.

                This has ceased to be the case a few kernel versions back and block devices can be opened for direct I/O. Thus the rawdevices feature is obsolete and should not be used.
                • 20. Re: Re-size Oracle ASM space
                  Mohanad Awad
                  So to make sure on my case and for redhat 5.4 version no need to use raw device ?
                  • 21. Re: Re-size Oracle ASM space
                    Oracle Support Note *RAC: Frequently Asked Questions [ID 220970.1]*+:
                    Q. What storage option should I use for Oracle RAC on Linux? ASM / OCFS / Raw Devices / Block Devices / Ext3 ?
                    A. Since RAW devices are being phased out of Linux in the long term, it is recommended everyone should switch to using the block devices (meaning, pass these block devices to ASM or OCFS/2 or Oracle Clusterware)

                    Support Note *How To Setup ASM on Linux Using ASMLIB Disks, Raw Devices, Block Devices or UDEV Devices? [ID 580153.1]*+ provides an overview of how to setup various devices for Oracle Grid.
                    • 22. Re: Re-size Oracle ASM space
                      Mohanad Awad

                      - Just make everything clear :

                      I try to test all my question that on virtual machine , i create oracle with ASM disk group Name (DATA) having just one hard disk , named (/dev/sda1) and it ASM accept the partition directly without make any change on it (without raw device) and without (ASMLib) so i mention above as told you that on Linux 5 these no raw device .

                      but one problem i face after reboot the server >> the the ASM instance dose not work becouse the permission lost after reboot ! but the solution is very easy after long search ... (create any file name like below 99-oracle.rules ... you can create any name :)

                      more /etc/udev/rules.d/99-oracle.rules
                      #ASM disks
                      KERNEL==”sda”, OWNER=”oracle”, GROUP=”dba”, MODE=”0660″
                      KERNEL==”sdb”, OWNER=”oracle”, GROUP=”dba”, MODE=”0660″
                      KERNEL==”sdc”, OWNER=”oracle”, GROUP=”dba”, MODE=”0660″
                      KERNEL==”sdd”, OWNER=”oracle”, GROUP=”dba”, MODE=”0660″
                      KERNEL==”sde”, OWNER=”oracle”, GROUP=”dba”, MODE=”0660″
                      KERNEL==”sdf”, OWNER=”oracle”, GROUP=”dba”, MODE=”0660″

                      >> Then after restart / reboot the ASM instance work normally without any error !


                      - and about Q is new hard disk must be same size as current one ? the answer is yes ... and this is the explanation :

                      i try to add new hard disk "/dev/sdc1" to current DATA diskgroup which has one disk member "/dev/sdb1" with size 25G ... the new one (/dev/sdc1) with size 200M ...

                      Alter diskgroup DATA add disk '/dev/sdc1'; ........ command run without any issue .. and l look for table

                      select * from v$asm_diskgroup >>> i see that the total_mb column increase ... but the issue happen when the new disk 200M become full and free_MB become zero !!!

                      i execute log DML code to insert record in dummy table ... after the new space become full error appear even so that the old hard disk have free space ...........

                      >>so it must be same size

                      **** NOTE ****when i try alter disk group DATA rebalance; the full one become free and the used one transfer to used one and the database .. and the database work fine ... but when it become full the issue return again and so one ....

                      --- after i add new hard disk with same size 25G and do rebalance... i get and undrstand your answer now.

                      * But My Q : Why oracle ASM dose not do re-balance automatically !!!!!!!!!!! ??????????

                      Thanks all for helps ,
                      Mohanad Awad
                      • 23. Re: Re-size Oracle ASM space
                        Regarding rebalance, it works automatically according to the value of asm power limit. If you you add a device correctly, then ASM will automatically start a rebalance operation. You can monitor the operation in sqlplus by querying the view v$asm_operation (connect to your ASM instance using sqlplus / as sysasm and then query the view). If there is no operation, then the disk was not added correctly.

                        For example, if you want to add disk partition sdc1 to the diskgroup, but you only set ownership and permissions on sdc, then only device sdc will be added to the diskgroup. This only adds 1 MB to your diskgroup, so the rebalance will happen very fast and you will not notice it.

                        Regarding the file 99-oracle.rules make sure you list your devices correctly. If you only want the partition to be owned by oracle then you need to add the partition number to the rule such as KERNEL==”sdc1”, OWNER=”oracle”, GROUP=”dba”, MODE=”0660″. I noticed you were missing the partition number on all devices.
                        • 24. Re: Re-size Oracle ASM space
                          Mohanad Awad
                          yes i put it as sdc1 , sdd1 ..... sure ! i just put an example , on my test yes i put sdc1 .... and ASM member added without any issue and yes i monitor v$asm_operation ! but this not the issue !

                          the issue it seem coz the size for test is very small ! 200 M so my it seem the ASM dose not have time to do rebalance and coz power limit =1 ,, i don't know on which criteria the re-balance happen ? every period ? on which size limit ? .........
                          • 25. Re: Re-size Oracle ASM space
                            Mohanad Awad
                            Thanks All ,

                            Finally done .................... i told you on Redhat 5 no need for using raw device and you can use the hard disk direct ...

                            chown -R oracle:dba /dev/sdc1
                            chmod -R 660 /dev/sdc1

                            vi /etc/udev/rules.d/65-raw-permissions.rules

                            KERNEL=="sdc1", OWNER="oracle", GROUP="dba", MODE="660"

                            SQL> show parameter disk

                            NAME                    TYPE     VALUE
                            ------------------------------------ ----------- ------------------------------
                            asm_diskgroups               string     DATA
                            asm_diskstring               string     /dev/sdb[1-3]
                            disk_asynch_io               boolean     TRUE

                            ALTER SYSTEM SET asm_diskstring = '/dev/sdb[1-3]','/dev/sdc1' SCOPE=memory sid='*'; -- don't froget to change it alos on pfile (on my case my Asm start from pfile ... )

                            alter diskgroup DATA add disk '/dev/sdc1';

                            -- to check new space :
                            SELECT name, type, ceil (total_mb/1024) TOTAL_GB , ceil (free_mb/1024) FREE_GB, required_mirror_free_mb,
                            ceil ((usable_file_mb)/1024) FROM V$ASM_DISKGROUP;

                            Best Regards :)
                            Mohanad Awad
                            1 2 Previous Next