Monday, October 23, 2017

GRID: Create New Disk Group

Shutdown Database

Create A New LUN at Storage Side


Discover new LUN

# format
format> disk                                          
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 40958 alt 2 hd 128 sec 64>  
          /scsi_vhci/ssd@g60080e500036b7f800000c0955b86d60                                          
       5. c0t60080E500036B7F800000E00566FCC76d0 <SUN-LCSM100_F-0784 cyl 25598 alt 2 hd 64 sec 64>     
          /scsi_vhci/ssd@g60080e500036b7f800000e00566fcc76                                          
       6. 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                     
       7. 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)[3]: 5                                                               
selecting c0t60080E500036B7F800000E00566FCC76d0                                                     
[disk formatted]                                                                                    
Disk not labeled.  Label it now? yes                                                                
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: 25598 + 2 (reserved cylinders)

Part      Tag    Flag     Cylinders         Size            Blocks
  0       root    wm       0 -    63      128.00MB    (64/0/0)       262144
  1       swap    wu      64 -   127      128.00MB    (64/0/0)       262144
  2     backup    wu       0 - 25597       50.00GB    (25598/0/0) 104849408
  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     128 - 25597       49.75GB    (25470/0/0) 104325120
  7 unassigned    wm       0                0         (0/0/0)             0
partition> quit
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> quit    

Change new disk owner and permission 

(This step must be done on all nodes, otherwise, you won't be able to see it in asmca)

 # ls -l /dev/rdsk/c0t60080E500036B7F800000E00566FCC76d0s6                                   
lrwxrwxrwx   1 root     root          67 Dec 15 10:21 /dev/rdsk/c0t60080E500036B7F800000E00566FCC76d0s6 -> ../../devices/scsi_vhci/ssd@g60080e500036b7f800000e00566fcc76:g,raw
# chown grid:asmadmin ../../devices/scsi_vhci/ssd@g60080e500036b7f800000e00566fcc76:g,raw
# chmod g+w ssd@g60080e500036b7f800000e00566fcc76:g,raw
# ls -l ../../devices/scsi_vhci/ssd@g60080e500036b7f800000e00566fcc76:g,raw                                                                             
crw-rw----   1 grid     asmadmin 237, 334 Dec 18 09:02 ../../devices/scsi_vhci/ssd@g60080e500036b7f800000e00566fcc76:g,raw

Add New LUN to existing ASM diskgroup with asmca

Login as grid, and run asmca
$ asmca
Right click on the existing diskgroup, and choose add disks.

No comments:

Post a Comment