Anda di halaman 1dari 4

Consultas ASM.

txt

=========Consultsas diskstrings

SQL>select group_number, disk_number, name,


failgroup, create_date, path from v$asm_disk;

GROUP_NUMBER DISK_NUMBER NAME FAILGROUP CREATE_DA PATH


------------ ----------- ---------- ---------- --------- ---------------
0 0
0 1
0 2
0 3
2 1 RECOV_0001 RECOV_0001 08-JUL-07 /dev/raw/raw4
2 0 RECOV_0000 RECOV_0000 08-JUL-07 /dev/raw/raw3
1 1 DATA_0001 DATA_0001 08-JUL-07 /dev/raw/raw2
1 0 DATA_0000 DATA_0000 08-JUL-07 /dev/raw/raw1

========== Consulta espacio libre en los diskgroup

SQL>select group_number, name, type, total_mb, free_mb


from v$asm_diskgroup;

GROUP_NUMBER NAME TYPE TOTAL_MB FREE_MB


------------ ------------------------------ ------ ---------- ----------
1 DATA EXTERN 1022974 930226
2 FRA EXTERN 1013757 889953
3 OCR_VOTE_BCK EXTERN 9215
8852
4 OCR_VOTE EXTERN 11263
10867

You then check the status of the rebalance operation by checking the view V$ASM_
OPERATION:

======== REVISAR LAS OPERACIONES DE ASM

SQL> select group_number, operation, state, power, actual,


sofar, est_work, est_rate, est_minutes from v$asm_operation;

GROUP_NUMBER OPERA STAT POWER ACTUA SOFAR EST_WORK EST_RATE EST_MINUTES


------------ ----- ---- ----- ----- ----- -------- -------- -----------
1 REBAL RUN 1 1 3 964 60 16
===== AUMENTAR EL POWER DE REBALANCE

Because the estimate for completing the rebalance operation is 16 minutes, you
decide to allocate more resources to the rebalance operation and change the power
limit for this particular rebalance operation:

SQL> alter diskgroup data rebalance power 8;


Diskgroup altered.

====== VOLVER A REVISAR EL TRABAJO DE ASM

Checking the status of the rebalance operation confirms that the estimated time to
completion has been reduced to four minutes instead of 16:

SQL> select group_number, operation, state, power, actual,


2 sofar, est_work, est_rate, est_minutes from v$asm_operation;

GROUP_NUMBER OPERA STAT POWER ACTUA SOFAR EST_WORK EST_RATE EST_MINUTES


------------ ----- ---- ----- ----- ----- -------- -------- -----------
1 REBAL RUN 8 8 16 605 118 4

About four minutes later, you check the status once more:
SQL> /
no rows selected

==================CREAR UN TABLESPACE EN ASM

SQL> create tablespace users3 datafile '+DATA2';

start asmcmd and query the existing disk groups, along with the total disk space
used within all
disk groups:

====== COMANDOS DE ASM EN ASMCMD

[oracle@dw ~]$ asmcmd

ASMCMD> ls –l
State Type Rebal Unbal Name
MOUNTED NORMAL N N DATA/
MOUNTED HIGH N N DATA2/
MOUNTED NORMAL N N RECOV/

ASMCMD> du
Used_MB Mirror_used_MB
2143 4399

ASMCMD> pwd
+

ASMCMD>

asmcmd Command 11g Only Description


cd Change the
directory to the specified directory.
cp Y Copy files between
ASM disk groups, both in the same instance and in remote instances.
du Recursively
displays total disk space usage for the current directory and all subdirectories.
exit Terminate asmcmd and
return to the operating system shell prompt.
find Find all occurrences of
the name (using wildcards as well), starting with the specified directory.
help List the asmcmd
commands.
ls List the contents
of the current directory.
lsct Lists information about
current ASM client databases
lsdg Y Lists all disk groups
and their attributes.
lsdsk Y Lists all disks
visible to this ASM instance.
md_backup Y Create metadata backup
script for specified disk groups.
md_restore Restore disk groups from
a backup.
mkalias Creates an alias for
system-generated ASM filenames.
mkdir Create an ASM
directory.
pwd Display the current ASM
directory.
remap Y Repair a range of
corrupted or damaged physical blocks on a disk.
rm Remove ASM files or
directories.
rmalias Remove an ASM alias, but
not the target of the alias.

Anda mungkin juga menyukai