Comment ajouter un diskgroup lorsque nous sommes sur une infrastructure Exadata ?
La procédure n’est pas la même que dans un environnement classique car il faut gérer l’ajout de griddisks sur les cellserveurs.
L’opération est donc découpée en deux partie :
- L’ajout des griddisks sur les cellserveurs
- Création des diskgroups sous ASM
Ajout des griddisks sur l’exadata
Attention, l’opération est à réaliser sur l’ensemble de vos cellserveurs.
Si vous avez trois cellserveurs, il faut donc réaliser l’opération sur les trois environnements.
Avant de commencer, il faut dans un premier temps valider les noms des celldisks :
list celldisk where name like 'CD.*' attributes name, lun, size, freespace, freespacemap CD_00_test1_adm 0_0 8.9094085693359375T 1.50018310546875T ((offset=7.4092254638671875T,size=1.50018310546875T)) CD_01_test1_adm 0_1 8.9094085693359375T 1.50018310546875T ((offset=7.4092254638671875T,size=1.50018310546875T)) CD_02_test1_adm 0_2 8.9094085693359375T 1.50018310546875T ((offset=7.4092254638671875T,size=1.50018310546875T)) CD_03_test1_adm 0_3 8.9094085693359375T 1.50018310546875T ((offset=7.4092254638671875T,size=1.50018310546875T)) CD_04_test1_adm 0_4 8.9094085693359375T 1.50018310546875T ((offset=7.4092254638671875T,size=1.50018310546875T)) CD_05_test1_adm 0_5 8.9094085693359375T 1.50018310546875T ((offset=7.4092254638671875T,size=1.50018310546875T))
On liste ensuite les griddisks déjà présents :
list griddisk attributes name, size DATA1_CD_00_test1_adm 1.2216796875T DATA1_CD_01_test1_adm 1.2216796875T DATA1_CD_02_test1_adm 1.2216796875T DATA1_CD_03_test1_adm 1.2216796875T DATA1_CD_04_test1_adm 1.2216796875T DATA1_CD_05_test1_adm 1.2216796875T RECO1_CD_00_test1_adm 417G RECO1_CD_01_test1_adm 417G RECO1_CD_02_test1_adm 417G RECO1_CD_03_test1_adm 417G RECO1_CD_04_test1_adm 417G RECO1_CD_05_test1_adm 417G
On peut alors créer les griddisks sur chaque cellserveur.
On ajoute un griddisk sur chaque celldisk, il faut donc calculer l’espace que l’on doit attribuer pour chaque griddisk.
Dans notre cas, nous souhaitons ajouter un premier diskgroup DATA4 de 10Go et un second diskgroup RECO4 de 5Go.
Il faut donc diviser l’espace disque total que vous souhaitez attribuer par le nombre celldisk.
Ici, on fait donc (10/6)*1024 = 1706
Attention, il faut impérativement que la valeur ajoutée soit un multiple de 16Mb. ( Doc ID 2176737.1 )
La commande suivante permet de vous donner le multiple de 16 le plus proche :
select 16*TRUNC(1706/16) new_disk_size from dual; NEW_DISK_SIZE ------------- 1696
On peut désormais ajouter les gridisks sur chaque cellserveur.
L’option « ALL HARDDISK » permet de créer un griddisk de la taille définit avec le paramètre « size » sur chaque celldisk.
L’option « PREFIX » préfixe le nom de chaque griddisk par la valeur positionnée (dans notre cas DATA4 et RECO4).
-- CELL1 CellCLI> CREATE GRIDDISK ALL HARDDISK PREFIX=DATA4, size=1696M; GridDisk DATA4_CD_00_test1_adm successfully created GridDisk DATA4_CD_01_test1_adm successfully created GridDisk DATA4_CD_02_test1_adm successfully created GridDisk DATA4_CD_03_test1_adm successfully created GridDisk DATA4_CD_04_test1_adm successfully created GridDisk DATA4_CD_05_test1_adm successfully created CellCLI> CREATE GRIDDISK ALL HARDDISK PREFIX=RECO4, size=853M; GridDisk RECO4_CD_00_test1_adm successfully created GridDisk RECO4_CD_01_test1_adm successfully created GridDisk RECO4_CD_02_test1_adm successfully created GridDisk RECO4_CD_03_test1_adm successfully created GridDisk RECO4_CD_04_test1_adm successfully created GridDisk RECO4_CD_05_test1_adm successfully created -- CELL2 CellCLI> CREATE GRIDDISK ALL HARDDISK PREFIX=DATA4, size=1696M; GridDisk DATA4_CD_00_test2_adm successfully created GridDisk DATA4_CD_01_test2_adm successfully created GridDisk DATA4_CD_02_test2_adm successfully created GridDisk DATA4_CD_03_test2_adm successfully created GridDisk DATA4_CD_04_test2_adm successfully created GridDisk DATA4_CD_05_test2_adm successfully created CellCLI> CREATE GRIDDISK ALL HARDDISK PREFIX=RECO4, size=853M; GridDisk RECO4_CD_00_test2_adm successfully created GridDisk RECO4_CD_01_test2_adm successfully created GridDisk RECO4_CD_02_test2_adm successfully created GridDisk RECO4_CD_03_test2_adm successfully created GridDisk RECO4_CD_04_test2_adm successfully created GridDisk RECO4_CD_05_test2_adm successfully created ...
On vérifie alors sur chaque cellserveur la présence des nouveaux griddisks :
-- CELL1 CellCLI> list griddisk where name like '.*.4_CD_.*._test1_adm.*' attributes name, size DATA4_CD_00_test1_adm 1.65625G DATA4_CD_01_test1_adm 1.65625G DATA4_CD_02_test1_adm 1.65625G DATA4_CD_03_test1_adm 1.65625G DATA4_CD_04_test1_adm 1.65625G DATA4_CD_05_test1_adm 1.65625G RECO4_CD_00_test1_adm 848M RECO4_CD_01_test1_adm 848M RECO4_CD_02_test1_adm 848M RECO4_CD_03_test1_adm 848M RECO4_CD_04_test1_adm 848M RECO4_CD_05_test1_adm 848M -- CELL2 CellCLI> list griddisk where name like '.*.4_CD_.*._test2_adm.*' attributes name, size DATA4_CD_00_test2_adm 1.65625G DATA4_CD_01_test2_adm 1.65625G DATA4_CD_02_test2_adm 1.65625G DATA4_CD_03_test2_adm 1.65625G DATA4_CD_04_test2_adm 1.65625G DATA4_CD_05_test2_adm 1.65625G RECO4_CD_00_test2_adm 848M RECO4_CD_01_test2_adm 848M RECO4_CD_02_test2_adm 848M RECO4_CD_03_test2_adm 848M RECO4_CD_04_test2_adm 848M RECO4_CD_05_test2_adm 848M ...
La partie sur les cellserveurs est maintenant terminée.
Ajout des diskgroups sous ASM
Dans un premier temps il est primordial de penser à vérifier votre paramètre asm_diskstring.
Dans notre cas, il a fallu changer le paramètre asm_disksting pour découvrir les nouveaux griddisk :
alter system set asm_diskstring='o/*/DATA2_*, o/*/RECO2_*, /dev/exadata_quorum/*, o/*/DATA4_*, o/*/RECO4_*' scope=both;
Attention à ne pas enlever les valeurs déjà paramétrées car ASM ne pourrait plus voir les anciens griddisks.
Avant d’ajouter les diskgroups, il est impératif de connaître le nom des Failgroups sur lesquels nous allons ajouter les diskgroups:
select a.group_number,b.name,a.name,a.failgroup,path from v$asm_disk a inner join v$asm_diskgroup b on a.group_number=b.group_number GROUP_NUMBER NAME NAME FAILGROUP PATH ------------ ------------------------------ ------------------------------ ------------------------------ --------------------------------------------------------------------------- 1 RECO1 RECO1_CD_01_TEST2_ADM TEST2_ADM o/192.168.55.27;192.168.55.28/RECO1_CD_01_test2_adm 1 RECO1 RECO1_CD_05_TEST2_ADM TEST2_ADM o/192.168.55.27;192.168.55.28/RECO1_CD_05_test2_adm 1 RECO1 RECO1_CD_02_TEST2_ADM TEST2_ADM o/192.168.55.27;192.168.55.28/RECO1_CD_02_test2_adm 1 RECO1 RECO1_CD_00_TEST2_ADM TEST2_ADM o/192.168.55.27;192.168.55.28/RECO1_CD_00_test2_adm 1 RECO1 RECO1_CD_01_TEST1_ADM TEST1_ADM o/192.168.55.25;192.168.55.26/RECO1_CD_01_test1_adm 1 RECO1 RECO1_CD_00_TEST1_ADM TEST1_ADM o/192.168.55.25;192.168.55.26/RECO1_CD_00_test1_adm 1 RECO1 RECO1_CD_03_TEST1_ADM TEST1_ADM o/192.168.55.25;192.168.55.26/RECO1_CD_03_test1_adm 1 RECO1 RECO1_CD_04_TEST1_ADM TEST1_ADM o/192.168.55.25;192.168.55.26/RECO1_CD_04_test1_adm 1 RECO1 RECO1_CD_05_TEST1_ADM TEST1_ADM o/192.168.55.25;192.168.55.26/RECO1_CD_05_test1_adm 1 RECO1 RECO1_CD_02_TEST1_ADM TEST1_ADM o/192.168.55.25;192.168.55.26/RECO1_CD_02_test1_adm 1 RECO1 RECO1_CD_03_TEST2_ADM TEST2_ADM o/192.168.55.27;192.168.55.28/RECO1_CD_03_test2_adm 1 RECO1 RECO1_CD_04_TEST2_ADM TEST2_ADM o/192.168.55.27;192.168.55.28/RECO1_CD_04_test2_adm 1 DATA1 DATA1_CD_03_TEST3_ADM TEST3_ADM o/192.168.55.29;192.168.55.30/DATA1_CD_03_test3_adm 1 DATA1 DATA1_CD_01_TEST3_ADM TEST3_ADM o/192.168.55.29;192.168.55.30/DATA1_CD_01_test3_adm 1 DATA1 DATA1_CD_02_TEST3_ADM TEST3_ADM o/192.168.55.29;192.168.55.30/DATA1_CD_02_test3_adm 1 DATA1 DATA1_CD_04_TEST3_ADM TEST3_ADM o/192.168.55.29;192.168.55.30/DATA1_CD_04_test3_adm 1 DATA1 DATA1_CD_05_TEST3_ADM TEST3_ADM o/192.168.55.29;192.168.55.30/DATA1_CD_05_test3_adm 1 DATA1 DATA1_CD_00_TEST3_ADM TEST3_ADM o/192.168.55.29;192.168.55.30/DATA1_CD_00_test3_adm 1 DATA1 DATA1_CD_01_TEST2_ADM TEST2_ADM o/192.168.55.27;192.168.55.28/DATA1_CD_01_test2_adm 1 DATA1 DATA1_CD_00_TEST2_ADM TEST2_ADM o/192.168.55.27;192.168.55.28/DATA1_CD_00_test2_adm ...
On se connecte ensuite avec le compte « / as sysasm » sur l’instance ASM et on crée le diskgroup.
Attention, il est important de bien valider l’ensemble des paramètres tel que « compatible.asm », »compatible.rdbms », »content.type » et « au_size ».
CREATE DISKGROUP DATA4 HIGH REDUNDANCY FAILGROUP TEST1_ADM DISK 'o/192.168.55.25;192.168.55.26/DATA4_CD_*' FAILGROUP TEST2_ADM DISK 'o/192.168.55.27;192.168.55.28/DATA4_CD_*' FAILGROUP TEST3_ADM DISK 'o/192.168.55.29;192.168.55.30/DATA4_CD_*' ATTRIBUTE 'au_size' = '4M', 'content.type' = 'data', 'cell.smart_scan_capable'='TRUE', 'compatible.asm' = '12.2.0.1', 'compatible.rdbms' = '12.2.0.1'; Diskgroup created. CREATE DISKGROUP RECO4 HIGH REDUNDANCY FAILGROUP TEST1_ADM DISK 'o/192.168.55.25;192.168.55.26/RECO4_CD_*' FAILGROUP TEST2_ADM DISK 'o/192.168.55.27;192.168.55.28/RECO4_CD_*' FAILGROUP TEST3_ADM DISK 'o/192.168.55.29;192.168.55.30/RECO4_CD_*' ATTRIBUTE 'au_size' = '4M', 'content.type' = 'recovery', 'cell.smart_scan_capable'='TRUE', 'compatible.asm' = '12.2.0.1', 'compatible.rdbms' = '12.2.0.1'; Diskgroup created.
On vérifie la création du diskgroup dans sysasm :
select a.group_number,b.name,a.name,a.failgroup,path from v$asm_disk a inner join v$asm_diskgroup b on a.group_number=b.group_number where b.name like '%4'; GROUP_NUMBER NAME NAME FAILGROUP PATH ------------ ------------------------------ ------------------------------ ------------------------------ --------------------------------------------------------------------------- 4 RECO4 RECO4_CD_01_TEST2_ADM TEST2_ADM o/192.168.55.27;192.168.55.28/RECO4_CD_01_test2_adm 4 RECO4 RECO4_CD_05_TEST2_ADM TEST2_ADM o/192.168.55.27;192.168.55.28/RECO4_CD_05_test2_adm 4 RECO4 RECO4_CD_02_TEST2_ADM TEST2_ADM o/192.168.55.27;192.168.55.28/RECO4_CD_02_test2_adm 4 RECO4 RECO4_CD_00_TEST2_ADM TEST2_ADM o/192.168.55.27;192.168.55.28/RECO4_CD_00_test2_adm 4 RECO4 RECO4_CD_01_TEST1_ADM TEST1_ADM o/192.168.55.25;192.168.55.26/RECO4_CD_01_test1_adm 4 RECO4 RECO4_CD_00_TEST1_ADM TEST1_ADM o/192.168.55.25;192.168.55.26/RECO4_CD_00_test1_adm 4 RECO4 RECO4_CD_03_TEST1_ADM TEST1_ADM o/192.168.55.25;192.168.55.26/RECO4_CD_03_test1_adm 4 RECO4 RECO4_CD_04_TEST1_ADM TEST1_ADM o/192.168.55.25;192.168.55.26/RECO4_CD_04_test1_adm 4 RECO4 RECO4_CD_05_TEST1_ADM TEST1_ADM o/192.168.55.25;192.168.55.26/RECO4_CD_05_test1_adm 4 RECO4 RECO4_CD_02_TEST1_ADM TEST1_ADM o/192.168.55.25;192.168.55.26/RECO4_CD_02_test1_adm 4 RECO4 RECO4_CD_03_TEST2_ADM TEST2_ADM o/192.168.55.27;192.168.55.28/RECO4_CD_03_test2_adm 4 RECO4 RECO4_CD_04_TEST2_ADM TEST2_ADM o/192.168.55.27;192.168.55.28/RECO4_CD_04_test2_adm 3 DATA4 DATA4_CD_03_TEST3_ADM TEST3_ADM o/192.168.55.29;192.168.55.30/DATA4_CD_03_test3_adm 3 DATA4 DATA4_CD_01_TEST3_ADM TEST3_ADM o/192.168.55.29;192.168.55.30/DATA4_CD_01_test3_adm 3 DATA4 DATA4_CD_02_TEST3_ADM TEST3_ADM o/192.168.55.29;192.168.55.30/DATA4_CD_02_test3_adm 3 DATA4 DATA4_CD_04_TEST3_ADM TEST3_ADM o/192.168.55.29;192.168.55.30/DATA4_CD_04_test3_adm 3 DATA4 DATA4_CD_05_TEST3_ADM TEST3_ADM o/192.168.55.29;192.168.55.30/DATA4_CD_05_test3_adm 3 DATA4 DATA4_CD_00_TEST3_ADM TEST3_ADM o/192.168.55.29;192.168.55.30/DATA4_CD_00_test3_adm 3 DATA4 DATA4_CD_01_TEST2_ADM TEST2_ADM o/192.168.55.27;192.168.55.28/DATA4_CD_01_test2_adm 3 DATA4 DATA4_CD_00_TEST2_ADM TEST2_ADM o/192.168.55.27;192.168.55.28/DATA4_CD_00_test2_adm 3 DATA4 DATA4_CD_05_TEST2_ADM TEST2_ADM o/192.168.55.27;192.168.55.28/DATA4_CD_05_test2_adm 3 DATA4 DATA4_CD_02_TEST2_ADM TEST2_ADM o/192.168.55.27;192.168.55.28/DATA4_CD_02_test2_adm 3 DATA4 DATA4_CD_04_TEST2_ADM TEST2_ADM o/192.168.55.27;192.168.55.28/DATA4_CD_04_test2_adm 3 DATA4 DATA4_CD_03_TEST2_ADM TEST2_ADM o/192.168.55.27;192.168.55.28/DATA4_CD_03_test2_adm 3 DATA4 DATA4_CD_04_TEST1_ADM TEST1_ADM o/192.168.55.25;192.168.55.26/DATA4_CD_04_test1_adm 3 DATA4 DATA4_CD_05_TEST1_ADM TEST1_ADM o/192.168.55.25;192.168.55.26/DATA4_CD_05_test1_adm 3 DATA4 DATA4_CD_00_TEST1_ADM TEST1_ADM o/192.168.55.25;192.168.55.26/DATA4_CD_00_test1_adm 3 DATA4 DATA4_CD_02_TEST1_ADM TEST1_ADM o/192.168.55.25;192.168.55.26/DATA4_CD_02_test1_adm 3 DATA4 DATA4_CD_03_TEST1_ADM TEST1_ADM o/192.168.55.25;192.168.55.26/DATA4_CD_03_test1_adm 3 DATA4 DATA4_CD_01_TEST1_ADM TEST1_ADM o/192.168.55.25;192.168.55.26/DATA4_CD_01_test1_adm 4 RECO4 RECO4_CD_04_TEST3_ADM TEST3_ADM o/192.168.55.29;192.168.55.30/RECO4_CD_04_test3_adm 4 RECO4 RECO4_CD_00_TEST3_ADM TEST3_ADM o/192.168.55.29;192.168.55.30/RECO4_CD_00_test3_adm 4 RECO4 RECO4_CD_02_TEST3_ADM TEST3_ADM o/192.168.55.29;192.168.55.30/RECO4_CD_02_test3_adm 4 RECO4 RECO4_CD_03_TEST3_ADM TEST3_ADM o/192.168.55.29;192.168.55.30/RECO4_CD_03_test3_adm 4 RECO4 RECO4_CD_05_TEST3_ADM TEST3_ADM o/192.168.55.29;192.168.55.30/RECO4_CD_05_test3_adm 4 RECO4 RECO4_CD_01_TEST3_ADM TEST3_ADM o/192.168.55.29;192.168.55.30/RECO4_CD_01_test3_adm
On peut aussi valider la création des diskgroups sous ASMCMD :
ASCMD>lsdg State Type Rebal Sector Logical_Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name MOUNTED HIGH N 512 512 4096 4194304 13842688 7162644 1538048 1874809 0 Y DATA1/ MOUNTED HIGH N 512 512 4096 4194304 30528 30168 3392 8925 0 N DATA4/ MOUNTED HIGH N 512 512 4096 4194304 3078400 511948 342016 56566 0 N RECO1/ MOUNTED HIGH N 512 512 4096 4194304 15264 14904 1696 4402 0 N RECO4/
Dans le cas d’un RAC, il faut penser à monter les deux nouveaux diskgroup sur le second noeud si ils ne l’ont pas été automatiquement :
alter diskgroup DATA4 mount; alter diskgroup RECO4 mount;
Besoin de formation, de support pour votre exploitation ou la réalisation de vos projets ?
N’hésitez pas à nous contacter !