Online resizing of Oracle volumes on Pure FlashArray

While thin provisioning enables higher capacity volumes without the guilt of actually wasting the space, we still see storage admins creating volumes close to what the DBAs have asked for and hence there is always a need for expanding the volume when the current volume reaches its capacity.

When it comes to ASM, lot of DBAs prefer to add a new volume than expanding the existing volume which would address the need but if there is a simple way to expand the ASM volume size without any downtime and not add any overhead with volume management, why not take advantage of it?

This blog post is to showcase the simplicity in resizing the FlashArray volume in ASM environment on Linux platform.  I am using Red Hat Linux 7.0 version in my environment.  Also I am using UDEV rules to manage the device and not ASMlib which gives the flexibility of not partitioning the device.

Following are the steps.

  1. Run the multipath command as root on the Linux host to get the current size of the lun.  Note the friendly devicename is mpathb and the current size on the host is 225GB.
    [root@Ora12cRac1 ~]# multipath -ll
    mpathb (3624a93708c44af151613837200011011) dm-6 PURE ,FlashArray 
    size=225G features='0' hwhandler='0' wp=rw
    
    `-+- policy='round-robin 0' prio=1 status=active
     |- 0:0:0:1 sdc 8:32 active ready running
     |- 0:0:1:1 sdd 8:48 active ready running
     |- 0:0:2:1 sde 8:64 active ready running
     |- 0:0:3:1 sdf 8:80 active ready running
     |- 1:0:0:1 sdg 8:96 active ready running
     |- 1:0:1:1 sdh 8:112 active ready running
     |- 1:0:2:1 sdi 8:128 active ready running
     |- 1:0:3:1 sdj 8:144 active ready running
     |- 2:0:0:1 sdk 8:160 active ready running
     |- 2:0:1:1 sdl 8:176 active ready running
     |- 2:0:2:1 sdm 8:192 active ready running
     |- 2:0:3:1 sdn 8:208 active ready running
     |- 3:0:0:1 sdo 8:224 active ready running
     |- 3:0:1:1 sdp 8:240 active ready running
     |- 3:0:2:1 sdq 65:0 active ready running
     `- 3:0:3:1 sdr 65:16 active ready running
    
  2. Extend the LUN by editing the volume in the Pure UI and increase the size.lun_resize1
  3. Rescan the SCSI devices to with the following command which will identify luns that were resized.  (Need sg3_utils package for this to work, use yum install sg3_utils)

    [root@Ora12cRac1 ~]# rescan-scsi-bus.sh -s
    Scanning SCSI subsystem for new devices
    Searching for resized LUNs
    RESIZED: Host: scsi0 Channel: 00 Id: 01 Lun: 01
    Vendor: PURE Model: FlashArray Rev: 464
    Type: Direct-Access ANSI SCSI revision: 06
    RESIZED: Host: scsi0 Channel: 00 Id: 02 Lun: 01
    . . .
    . . .
    16 remapped or resized device(s) found.
    [0:0:1:1]
    [0:0:2:1]
    [0:0:3:1]
    [0:0:4:1]
    [1:0:1:1]
    [1:0:2:1]
    [1:0:3:1]
    [1:0:4:1]
    [2:0:0:1]
    [2:0:1:1]
    [2:0:4:1]
    [2:0:5:1]
    [3:0:0:1]
    [3:0:1:1]
    [3:0:2:1]
    [3:0:5:1]
    0 device(s) removed.
  4. Resize the multipath device using the following command.  Replace the <devicename> with the friendly name of your volume.  (mpathb in this example)

    multipathd -k'resize map <device name>'
    [root@Ora12cRac1 ~]# multipathd -k'resize map mpathb'
    ok [/code]
  5. Run the multipath command again to validate the volume with the extended size.  (You can see the increased size from 225G to 251G in our example)
    [root@Ora12cRac1 tst]# multipath -ll
    mpathb (3624a93708c44af151613837200011011) dm-6 PURE ,FlashArray
    size=251G features='0' hwhandler='0' wp=rw
    
    `-+- policy='round-robin 0' prio=1 status=active
     |- 0:0:0:1 sdc 8:32 active ready running
     |- 0:0:1:1 sdd 8:48 active ready running
     |- 0:0:2:1 sde 8:64 active ready running
     |- 0:0:3:1 sdf 8:80 active ready running
     |- 1:0:0:1 sdg 8:96 active ready running
     |- 1:0:1:1 sdh 8:112 active ready running
     |- 1:0:2:1 sdi 8:128 active ready running
     |- 1:0:3:1 sdj 8:144 active ready running
     |- 2:0:0:1 sdk 8:160 active ready running
     |- 2:0:1:1 sdl 8:176 active ready running
     |- 2:0:2:1 sdm 8:192 active ready running
     |- 2:0:3:1 sdn 8:208 active ready running
     |- 3:0:0:1 sdo 8:224 active ready running
     |- 3:0:1:1 sdp 8:240 active ready running
     |- 3:0:2:1 sdq 65:0 active ready running
     `- 3:0:3:1 sdr 65:16 active ready running
    
  6. If you are using ASM, resize the volume at the ASM level by resizing the corresponding diskgroup using the following command which can be done while the diskgroup is mounted.
    alter diskgroup <dg name> resize disk <disk name> size <s>;
    SQL> alter diskgroup dg_test resize disk dg_test_01 size 251g; 
    Diskgroup altered.
    

If you are using ASMlib, you have two options to extend the space.

  1. Create a second partition on the extended space which means you have to create a new disk on the second partition and add it to the diskgroup.  This is no different than adding a new volume but certainly has the following advantages.
    1. Less intrusive.  No need to attach the volume to the host as it is already part of the volume.  Still have to perform rescan-scsi-bus.sh with “s” option.
    2. Does not count against volume count if there is any limit to the volumes on the storage array.
  2. Extend the initial partition by deleting the partition and recreating the partition using fdisk (d,n,p with defaults, w) followed by altering the diskgroup with new size which certainly works in theory but is not a preferred or recommended approach whether for production or non-production environment.  If you wanted to try this, do it at your risk but at least take a snapshot of the volume before making any change to protect yourself.

If you are using cooked filesystem which again has partitions, you can certainly resize and the steps are similar to the above #2 where you have to delete the partition and create new partition with the same starting block and run command like resize2fs or xfs_growfs.  This can be done online as well but the same disclaimer and warnings apply.  You better know what you are doing and if not you can mess up the data.

Like it? Share ...Tweet about this on TwitterShare on LinkedIn

Leave a Reply

Your email address will not be published. Required fields are marked *