This discussion is archived
1 2 Previous Next 25 Replies Latest reply: Mar 21, 2013 2:36 AM by Mohanad Awad RSS

Re-size Oracle ASM space

Mohanad Awad Newbie
Currently Being Moderated
Hello,

My database use oracle ASM , I use storage for DATA (datafiles and archive ... ) . my storage around to be full , so i want to add new space to storage (new hard disks).

So my question ..... from DBA side is there anything must be done ? like fdisk new hard disk then added to disk group ? or the space will automatically added to total space ?

My storage admin told me that he can re-size the space from his side without doing anything from my side as DBA , is any problem for that way ? is new hard disk will be same as old one .

Please advice ,


Regards,
Mohanad Awad
  • 1. Re: Re-size Oracle ASM space
    BillyVerreynne Oracle ACE
    Currently Being Moderated
    I would not allow anyone to touch and resize disks in use. I would request new disks/LUNs (same size as the existing ones used), and then add these to the ASM diskgroup needing more space and do a rebalance. If the diskgroup is normal or high redundancy, then a new LUN needs to be added to each failgroup.

     
    PS. See support note +How To Resize An ASM Disk On Release 10.2.0.X? [ID 470209.1]+. Take special note of the step 1 - a complete and full backup of the entire database, for all affected databases. In other words - someone screws up during the resize and you will loose the entire database. So make sure you can recover that. (which is why I prefer the existing disks/LUNs in use, not to be touched by anything or anyone, except ASM and the database)
  • 2. Re: Re-size Oracle ASM space
    CKPT Guru
    Currently Being Moderated
    Mohanad Awad wrote:
    Hello,

    My database use oracle ASM , I use storage for DATA (datafiles and archive ... ) . my storage around to be full , so i want to add new space to storage (new hard disks).

    So my question ..... from DBA side is there anything must be done ? like fdisk new hard disk then added to disk group ? or the space will automatically added to total space ?

    My storage admin told me that he can re-size the space from his side without doing anything from my side as DBA , is any problem for that way ? is new hard disk will be same as old one .

    Please advice ,


    Regards,
    Mohanad Awad
    Check this link http://jarneil.wordpress.com/2008/04/22/expanding-an-asm-disk/
  • 3. Re: Re-size Oracle ASM space
    Mohanad Awad Newbie
    Currently Being Moderated
    Dears,

    Thanks , but can you advice me why oracleasm not found even that oracle install using oracle ASM !

    /etc/init.d/oracleasm listdisks
    -bash: /etc/init.d/oracleasm: No such file or directory


    --- i use that from oracle user and root with same error and i try to (locate oracleasm). i did not found ?

    Really fisrt time i see ASM like this

    SELECT
    NVL(a.name, '[CANDIDATE]') disk_group_name
    , b.path disk_file_path
    , b.name disk_file_name
    , b.failgroup disk_file_fail_group
    FROM
    v$asm_diskgroup a RIGHT OUTER JOIN v$asm_disk b USING (group_number)
    ORDER BY
    a.name;

    disk_group_name disk_file_path disk_file_name disk_file_fail_group
    ------------------------------------------------------------------------------------------
    DATA      /dev/sdb3     DATA_0000     DATA_0000
    [CANDIDATE]     /dev/sdb1          
    [CANDIDATE]     /dev/sdb2          

    * As you see above the disks it seem the disks not foramated with fdisk !! can you advice on this also ! /dev/sdb*

    Regards,
    Mohanad Awad

    Edited by: Mohanad Awad on Feb 25, 2013 1:55 AM
  • 4. Re: Re-size Oracle ASM space
    BillyVerreynne Oracle ACE
    Currently Being Moderated
    Mohanad Awad wrote:

    can you advice me why oracleasm not found even that oracle install using oracle ASM !
    Because the kernel driver ASMlib (with its command line script support) is optional.
    ------------------------------------------------------------------------------------------
    DATA      /dev/sdb3     DATA_0000     DATA_0000
    [CANDIDATE]     /dev/sdb1          
    [CANDIDATE]     /dev/sdb2          

    * As you see above the disks it seem the disks not foramated with fdisk !! can you advice on this also ! /dev/sdb*
    fdisk does not format. mkfs does. fdisk partitions.

    And using 3 partitions on the same local physical disk as separate ASM disks - that does not make sense.
  • 5. Re: Re-size Oracle ASM space
    User328666 Newbie
    Currently Being Moderated
    There are two options.

    1. Your storage admin can expand a LUN, and then you can resize the ASM disk into the extra space.
    http://docs.oracle.com/cd/E11882_01/server.112/e18951/asmdiskgrps.htm#sthref282

    2. Your storage admin can give you another LUN. When you add this LUN to a diskgroup, ASM will automatically use it and therefore expand the size of the diskgroup.

    My preference is #2. It is less work, and has less risk.
  • 6. Re: Re-size Oracle ASM space
    Mohanad Awad Newbie
    Currently Being Moderated
    Dear Billy.

    If it's optaion as you say below :

    so what the benefit of below command when we install oracle with ASM :

    /etc/init.d/oracleasm createdisk VOL1 /dev/sdb1

    so why we install and configure ASMLib if it optional as mention above !

    and on my case , if my storage admin add to me new hard disk and connect it to oracle server and appear like this

    /dev/sdc ...........

    so from my side as DBA is to add it directly like this :

    Alter DISKGROUP DATA add DISK '/dev/sdc' ;

    or use

    ALTER DISKGROUP DATA RESIZE DISK diska1 SIZE 800G;

    Note : i see on internet use below for add NORMAL REDUNDANCY ... must i use FAILGROUP if my ASM use extrenal REDUNDANCY ?

    CREATE DISKGROUP disk_group_1 NORMAL REDUNDANCY
    FAILGROUP failure_group_1 DISK
    '/devices/diska1' NAME diska1,
    '/devices/diska2' NAME diska2
    FAILGROUP failure_group_2 DISK
    '/devices/diskb1' NAME diskb1,
    '/devices/diskb2' NAME diskb2;


    * another note : in my OS i did not found /dev/raw/raw* files and /etc/sysconfig/rawdevices file is empty ! it's optional also and what the benefit of it please ?

    Thanks,
    Mohanad Awad
  • 7. Re: Re-size Oracle ASM space
    Mohanad Awad Newbie
    Currently Being Moderated
    Dears,

    Why it must be same size if i use external redundancy ?

    i mean of re-size from his side is to keep all current disk as it with same pa-rationing - and same size - , and he will add new hard disks and it will appear as new pa-ration oracle OS. so it's that fair ?

    This what i mean for re-size , from storage side - storage admin - will add new disk to group on storage it self .... is this will effect on my current data ?

    Regards,
    Mohanad Awad
  • 8. Re: Re-size Oracle ASM space
    User328666 Newbie
    Currently Being Moderated
    I will try to answer your questions in the order you asked,

    First, ASMlib is optional and is not even available on some operating systems like RHEL 6.0 and higher. You can use it if you want to and on a supported operating system, but you do not have to use it. This forum (automatic storage management) has many discussions of the pros and cons of ASMlib.

    Second, failgroup is not required if you are using external redundancy.

    Third, you should not be using raw character mode devices and this is why /dev/raw/raw is empty and /etc/sysconfig/rawdevices is also empty. You should be using raw block devices which are listed as /dev/sd*. For each raw block device the first letter in the device listing should be a "b" indicating block device. Character mode devices are for Oracle 7 through 10. There is much documentation on the Internet where Oracle has said "raw devices are desupported" and they are specifically referring to the raw character mode devices not the raw block mode devices.

    Fourth, the storage admin can expand the LUN by adding disks, hypers, metas, or whatever his unit of measure. This will not affect your current data unless the storage admin makes a mistake. This is very unlikely, but anything is possible so you should backup the database to be safe. After the storage admin is done adding space ASM will not see the new space until you resize the disk in ASM. When the disks were first added to a diskgroup, ASM recorded the size of each disk. If you want ASM to update this information then you need to run the alter diskgroup resize command that I mentioned earlier today.
  • 9. Re: Re-size Oracle ASM space
    onedbguru Pro
    Currently Being Moderated
    >
    My storage admin told me that he can re-size the space from his side without doing anything from my side as DBA , is any problem for that way ? is new hard disk will be same as old one .
    NEVER do this unless you want to be restoring from backup. Have him give you a new device EXACTLY the same size as the current one. Then follow the docs on how to add a new disk for your environment.

    Please advice ,


    Regards,
    Mohanad Awad
  • 10. Re: Re-size Oracle ASM space
    BillyVerreynne Oracle ACE
    Currently Being Moderated
    Mohanad Awad wrote:

    Why it must be same size if i use external redundancy ?
    ASM creates a stripe set across disks in a diskgroup. So to have a balanced diskgroup, all disks in it need to be of the same size, and should be of the same speed. See support note +ASM Technical Best Practices For 10g and 11gR1 Release [ID 265633.1]+.
    i mean of re-size from his side is to keep all current disk as it with same pa-rationing - and same size - , and he will add new hard disks and it will appear as new pa-ration oracle OS. so it's that fair ?
    I would not be comfortable with storage admins touching any of the LUNs I have in use in ASM. I would want hands off - and if extra space is needed, for them to assign brand new LUNs.
    This what i mean for re-size , from storage side - storage admin - will add new disk to group on storage it self .... is this will effect on my current data ?
    If they touch existing LUNs that you are using as disks in an ASM diskgroup, they can trash your entire database.
  • 11. Re: Re-size Oracle ASM space
    Mohanad Awad Newbie
    Currently Being Moderated
    Dears ,

    Thanks all for answer.

    Just to make sure ...

    1 - New size of hard-desk (MUST) be same as exist one ! it's not clear for me , I use external redundancy , not NORMAL nor HIGH ! or it's the case not realted to redundancy / Mirror case ? so what the it must same size.

    My current size of total ASM group is 500G so I must request new 500G ?

    2 - if ASMlib optional and dose not exist on my server and my disk look like this : /dev/sdb ....... and new one look like (/dev/sdc) ... so must i do anything must i use on OS ?

    or added directly from Oracle DB : alter diskgroup add disk '/dev/sdc' ; ........... ? JUST , my OS is Red Hat Enterprise Linux Server release 5.4 (Tikanga)

    3- When and why we use ASMlib ?

    Best Regards & Thanks
  • 12. Re: Re-size Oracle ASM space
    BillyVerreynne Oracle ACE
    Currently Being Moderated
    Mohanad Awad wrote:

    1 - New size of hard-desk (MUST) be same as exist one ! it's not clear for me , I use external redundancy , not NORMAL nor HIGH ! or it's the case not realted to redundancy / Mirror case ? so what the it must same size.
    If an ASM diskgroup contains 4 disks of 256MB each, and you want to add another 2 disks to the diskgroup - then those 2 new disks should also be 256MB in size each.
    My current size of total ASM group is 500G so I must request new 500G ?
    It is not about the size of the diskgroup. It is about the sizes of the disks in the diskgroup. As these disks are striped (forget about mirroring as you are confusing that with striping). For a striped set of disks to be balanced, the disks in that striped set needs to be of the same size each.
    2 - if ASMlib optional and dose not exist on my server and my disk look like this : /dev/sdb ....... and new one look like (/dev/sdc) ... so must i do anything must i use on OS ?
    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?
    or added directly from Oracle DB : alter diskgroup add disk '/dev/sdc' ; ........... ? JUST , my OS is Red Hat Enterprise Linux Server release 5.4 (Tikanga)
    Assuming this disk is the same size as existing disk(s) in that diskgroup, yes.
    3- When and why we use ASMlib ?
    Management.

    >
    page 9
    Oracle Database 11g Release 1 and 10g Release 2
    Automatic Storage Management
    Overview and Technical Best Practices

    Oracle is providing an ASMLIB, called the Oracle ASMLIB, for the Linux platform (current version as of
    this writing is 2.0). This implementation of ASMLIB makes it easier to provision storage for a clustered
    pool of storage. Providing a kernel level driver access to disk means that permissions and device mapping
    are more stable upon the reboot of a server. ASMLIB also makes the discovery process simpler to manage
    and removes the challenge of having disks added to one node and not known to other nodes in the cluster.
    It should be noted that, <b>ASMLIB is first and foremost a device management tool and not necessarily a tool
    to improve performance of disk I/O.</b>
  • 13. Re: Re-size Oracle ASM space
    Mohanad Awad Newbie
    Currently Being Moderated
    Dears,

    All point now clear to me , just about you Q :

    2 - if ASMlib optional and dose not exist on my server and my disk look like this : /dev/sdb ....... and new one look like (/dev/sdc) ... so must i do anything must i use on OS ?

    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 ,
    So there is tow Q :

    A . On My case i see on oracle server OS one paration devices look like this /dev/sdb ..... total size =560G ; come from tow phyical Hardisk each one 300 , so must i add 560 or 300?
    B. And you showed above these as partitions and partitions used as ASM disks? Yes so can i use it direct >> alter diskgroup DATA add disk '/dev/sdc' ?


    Regards,
  • 14. Re: Re-size Oracle ASM space
    655734 Newbie
    Currently Being Moderated
    @Mohanad Awad
    what is output of
    sql> select header_status from v$asm_disk;
1 2 Previous Next

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points