Tuesday, August 10, 2021

How to extend ASM SAN disk group in Solaris zone

1. First of all, identify disk's paths to work with. Use sqlplus, kfod or OS utilities to get the information.

Example using sqlplus (GI home) :

% sqlplus / as sysdba

SYS@+ASM> col path for a50

SYS@+ASM> select path,os_mb,total_mb,free_mb from v$asm_disk ;

Example using kfod (GI home) :

% kfod disks=all

2. Next, increase the space on LUNs using storage system software (on HPE 3PAR, it was made by growvv command)

3. Next, on the global zone, use format utility to extend the space on OS side:

For example :

# format /dev/rdsk/c0t60002AC00000000002003CDE000095DDd0

selecting c0t60002AC00000000002003CDE000095DDd0 <3PARdata-VV-3226-2.49TB>
[disk formatted]
Note: capacity in disk label is less than the disk capacity.
Select <partition> <expand> to adjust the label capacity.

FORMAT MENU:
       disk       - select a disk
       type       - select (define) a disk type
       partition  - select (define) a partition table
       current    - describe the current disk
       format     - format and analyze the disk
       repair     - repair a defective sector
       label      - write label to the disk
       analyze    - surface analysis
       defect     - defect list management
       backup     - search for backup labels
       verify     - read and display labels
       inquiry    - show disk ID
       volname    - set 8-character volume name
       !<cmd>     - execute <cmd>, then return
       quit
format> p


PARTITION MENU:
       0      - change `0' partition
       1      - change `1' partition
       2      - change `2' partition
       3      - change `3' partition
       4      - change `4' partition
       5      - change `5' partition
       6      - change `6' partition
       expand - expand label to use the maximum allowed space
       select - select a predefined table
       modify - modify a predefined partition table
       name   - name the current table
       print  - display the current table
       label  - write partition map and label to the disk
       !<cmd> - execute <cmd>, then return
       quit
partition> ex
The expanded capacity is added to the unallocated space.
partition> p

Current partition table (original):
Total disk sectors available: 5343526845 + 16384 (reserved sectors)

Part      Tag    Flag     First Sector          Size          Last Sector
 0        usr    wm                64         2.00TB           4294950847
 1 unassigned    wm                 0            0                0
 2 unassigned    wm                 0            0                0
 3 unassigned    wm                 0            0                0
 4 unassigned    wm                 0            0                0
 5 unassigned    wm                 0            0                0
 6 unassigned    wm                 0            0                0
 8   reserved    wm        5343526879         8.00MB           5343543262

partition> 0
Part      Tag    Flag     First Sector          Size          Last Sector
 0        usr    wm                64         2.00TB           4294950847

Enter partition id tag[usr]:
Enter partition permission flags[wm]:
Enter new starting sector[64]:
Enter partition size[4294950784b, 4294950847e, 2097143mb, 2047gb, 1tb]: $
partition> p
Current partition table (unnamed):
Total disk sectors available: 5343526845 + 16384 (reserved sectors)

Part      Tag    Flag     First Sector          Size          Last Sector
 0        usr    wm                64         2.49TB           5343526877
 1 unassigned    wm                 0            0                0
 2 unassigned    wm                 0            0                0
 3 unassigned    wm                 0            0                0
 4 unassigned    wm                 0            0                0
 5 unassigned    wm                 0            0                0
 6 unassigned    wm                 0            0                0
 8   reserved    wm        5343526879         8.00MB           5343543262

partition> label
Ready to label disk, continue? y

partition> q


FORMAT MENU:
       disk       - select a disk
       type       - select (define) a disk type
       partition  - select (define) a partition table
       current    - describe the current disk
       format     - format and analyze the disk
       repair     - repair a defective sector
       label      - write label to the disk
       analyze    - surface analysis
       defect     - defect list management
       backup     - search for backup labels
       verify     - read and display labels
       inquiry    - show disk ID
       volname    - set 8-character volume name
       !<cmd>     - execute <cmd>, then return
       quit
format> ver

Volume name = <        >
ascii name  = <3PARdata-VV-3226-2.49TB>
bytes/sector    =  512
sectors = 5343543295  
accessible sectors = 5343543262
Part      Tag    Flag     First Sector          Size          Last Sector
 0        usr    wm                64         2.49TB           5343526877
 1 unassigned    wm                 0            0                0
 2 unassigned    wm                 0            0                0
 3 unassigned    wm                 0            0                0
 4 unassigned    wm                 0            0                0
 5 unassigned    wm                 0            0                0
 6 unassigned    wm                 0            0                0
 8   reserved    wm        5343526879         8.00MB           5343543262

format> q

4. Repeat previous step for the rest of LUNs

5. Resize ASM diskgroup 

SYS@+ASM> alter diskgroup disk_group_name resize all ;

You might encounter the error 

ORA-15099, 00000, "disk '%s' is larger than maximum size of %s MBs" 

In my case it was low compatibility.rdbms value (10.1) for the altered diskgroup.


Good Luck !


No comments:

Post a Comment