Thursday, August 27, 2015

How to expand LUN on Solaris

1 Expand LUN on SAN side

2. Add it to current SMI Label
# format                                   
Searching for disks...done                             


AVAILABLE DISK SELECTIONS:
       0. c0t5000CCA0562C310Cd0 <HITACHI-H109060SESUN600G-A690-558.91GB>
          /scsi_vhci/disk@g5000cca0562c310c                            
          /dev/chassis/SYS/SASBP/HDD0/disk                             
       1. c0t5000CCA0562C3070d0 <HITACHI-H109060SESUN600G-A690 cyl 64986 alt 2 hd 27 sec 668>  solaris
          /scsi_vhci/disk@g5000cca0562c3070                                                          
          /dev/chassis/SYS/SASBP/HDD1/disk                                                           
       2. c0t60080E500036B7F800000C0C55B86E3Ad0 <SUN-LCSM100_F-0784 cyl 15358 alt 2 hd 64 sec 64>    
          /scsi_vhci/ssd@g60080e500036b7f800000c0c55b86e3a                                           
       3. c0t60080E500036B7F800000C0E55B86ED1d0 <SUN-LCSM100_F-0784 cyl 30718 alt 2 hd 64 sec 64>    
          /scsi_vhci/ssd@g60080e500036b7f800000c0e55b86ed1                                           
       4. c0t60080E500036B7F800000C0955B86D60d0 <SUN-LCSM100_F-0784 cyl 38398 alt 2 hd 128 sec 64>   
          /scsi_vhci/ssd@g60080e500036b7f800000c0955b86d60                                           
       5. c7t5d31 <SUN-Universal Xport-0784 cyl 8 alt 2 hd 64 sec 64>                                
          /pci@400/pci@2/pci@0/pci@8/SUNW,qlc@0/fp@0,0/ssd@w20660080e53683c6,1f                      
       6. c8t10d31 <SUN-Universal Xport-0784 cyl 8 alt 2 hd 64 sec 64>                               
          /pci@400/pci@2/pci@0/pci@8/SUNW,qlc@0,1/fp@0,0/ssd@w20570080e53683c6,1f                    
Specify disk (enter its number): 4                                                                   
selecting c0t60080E500036B7F800000C0955B86D60d0                                                      
[disk formatted]                                                                                     
Note: detected additional allowable expansion storage space that can be                              
added to current SMI label's computed 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         
        save       - save new disk/partition definitions
        inquiry    - show disk ID                      
        volname    - set 8-character volume name       
        !<cmd>     - execute <cmd>, then return        
        quit                                           
format> type                                           


AVAILABLE DRIVE TYPES:
        0. Auto configure
        1. Quantum ProDrive 80S
        2. Quantum ProDrive 105S
        3. CDC Wren IV 94171-344
        4. SUN0104             
        5. SUN0207             
        6. SUN0327             
        7. SUN0340             
        8. SUN0424             
        9. SUN0535             
        10. SUN0669            
        11. SUN1.0G            
        12. SUN1.05            
        13. SUN1.3G            
        14. SUN2.1G            
        15. SUN2.9G
        16. Zip 100
        17. Zip 250
        18. Peerless 10GB
        19. HITACHI-H109060SESUN600G-A690
        20. SUN-LCSM100_F-0784
        21. SUN-LCSM100_F-0784
        22. SUN-LCSM100_F-0784
        23. SUN-Universal Xport-0784
        24. other
Specify disk type (enter its number)[20]: 0
c0t60080E500036B7F800000C0955B86D60d0: configured with capacity of 159.99GB
<SUN-LCSM100_F-0784 cyl 40958 alt 2 hd 128 sec 64>
selecting c0t60080E500036B7F800000C0955B86D60d0
[disk formatted]
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
        7      - change `7' partition
        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> p
Current partition table (default):
Total disk cylinders available: 40958 + 2 (reserved cylinders)

Part      Tag    Flag     Cylinders         Size            Blocks
  0       root    wm       0 -    31      128.00MB    (32/0/0)       262144
  1       swap    wu      32 -    63      128.00MB    (32/0/0)       262144
  2     backup    wu       0 - 40957      159.99GB    (40958/0/0) 335527936
  3 unassigned    wm       0                0         (0/0/0)             0
  4 unassigned    wm       0                0         (0/0/0)             0
  5 unassigned    wm       0                0         (0/0/0)             0
  6        usr    wm      64 - 40957      159.74GB    (40894/0/0) 335003648
  7 unassigned    wm       0                0         (0/0/0)             0

partition> q
format> label
Ready to label disk, continue? yes
Login as Grid user

 $ sqlplus / as sysasm
 SQL> alter diskgroup DATA resize all;

Diskgroup altered.

SQL> select name, total_mb, usable_file_mb from v$asm_diskgroup;

NAME                             TOTAL_MB USABLE_FILE_MB
------------------------------ ---------- --------------
ARC                                 61180          61044
DATA                               163576          46175
FRA                                 30460          30365