|
|
Re: Switch between disks in a diskgroup [message #521591 is a reply to message #521581] |
Wed, 31 August 2011 06:57 |
|
Mahesh Rajendran
Messages: 10708 Registered: March 2002 Location: oracleDocoVille
|
Senior Member Account Moderator |
|
|
Nothing exotic here.
You just add the new disk to FRA.
alter diskgroup FRA add ..
ASM will automatically "copy" the data to new disk (actually distributes across all available disks in diskgroup).
Check the status. Could take a while depending on rebalance power and load.
Beware that the "add /drop disk" will immediately return to prompt
but will continue to work in background.
Use ASM command
alter diskgroup FRA drop disk ...
wait, check status and You can drop the Old disk/LUN once the operation is completed.
[Updated on: Wed, 31 August 2011 07:22] Report message to a moderator
|
|
|
Re: Switch between disks in a diskgroup [message #521592 is a reply to message #521581] |
Wed, 31 August 2011 07:11 |
|
Mahesh Rajendran
Messages: 10708 Registered: March 2002 Location: oracleDocoVille
|
Senior Member Account Moderator |
|
|
Here is a sample session.
-- A simple sql to get the status of operations
-- and
-- list the presented disks.
-- the ones that are not used by asm are named CANDIDATE
--
SQL> get asm
1 set linesize 1000
2 SELECT group_number, operation, state, power, est_minutes FROM v$asm_operation;
3 col disk_group_name format a20
4 col disk_file_path format a60
5 col disk_file_name format a20
6 col disk_file_fail_group format a25
7 SELECT
8 NVL(a.name, '[CANDIDATE]') disk_group_name
9 , b.path disk_file_path
10 , b.name disk_file_name
11 , b.failgroup disk_file_fail_group
12 , b.total_mb
13 FROM
14 v$asm_diskgroup a RIGHT OUTER JOIN v$asm_disk b USING (group_number)
15 ORDER BY
16* a.name;
17
SQL> @asm
no rows selected
DISK_GROUP_NAME DISK_FILE_PATH DISK_FILE_NAME DISK_FILE_FAIL_GROUP TOTAL_MB
-------------------- ------------------------------------------------------------ -------------------- ------------------------- ----------
BAILOUT /dev/rdsk/c4t000B080010002578d0s1 BAILOUT_0000 BAILOUT_0000 99212
FRA /dev/rdsk/c4t000B080008002578d0s1 FRA_0000 FRA_0000 99212
[CANDIDATE] /dev/rdsk/c4t000B080006002578d0s1 0
[CANDIDATE] /dev/rdsk/c4t000B080012002578d0s1 0
[CANDIDATE] /dev/rdsk/c4t000B080007002578d0s1 0
[CANDIDATE] /dev/rdsk/c4t000B080009002578d0s1 0
[CANDIDATE] /dev/rdsk/c4t000B080011002578d0s1 0
7 rows selected.
-- No operations going on
-- add the disk
SQL> alter diskgroup FRA add disk '/dev/rdsk/c4t000B080006002578d0s1' rebalance power 11;
Diskgroup altered.
--
-- Check the status and wait. Do it until you see "no rows returned" for the operations.
--
SQL> @asm
GROUP_NUMBER OPERA STAT POWER EST_MINUTES
------------ ----- ---- ---------- -----------
1 REBAL RUN 11 0
DISK_GROUP_NAME DISK_FILE_PATH DISK_FILE_NAME DISK_FILE_FAIL_GROUP TOTAL_MB
-------------------- ------------------------------------------------------------ -------------------- ------------------------- ----------
BAILOUT /dev/rdsk/c4t000B080010002578d0s1 BAILOUT_0000 BAILOUT_0000 99212
FRA /dev/rdsk/c4t000B080006002578d0s1 FRA_0001 FRA_0001 49596
FRA /dev/rdsk/c4t000B080008002578d0s1 FRA_0000 FRA_0000 99212
[CANDIDATE] /dev/rdsk/c4t000B080011002578d0s1 0
[CANDIDATE] /dev/rdsk/c4t000B080007002578d0s1 0
[CANDIDATE] /dev/rdsk/c4t000B080009002578d0s1 0
[CANDIDATE] /dev/rdsk/c4t000B080012002578d0s1 0
7 rows selected.
SQL> @asm
GROUP_NUMBER OPERA STAT POWER EST_MINUTES
------------ ----- ---- ---------- -----------
1 REBAL RUN 11 0
DISK_GROUP_NAME DISK_FILE_PATH DISK_FILE_NAME DISK_FILE_FAIL_GROUP TOTAL_MB
-------------------- ------------------------------------------------------------ -------------------- ------------------------- ----------
BAILOUT /dev/rdsk/c4t000B080010002578d0s1 BAILOUT_0000 BAILOUT_0000 99212
FRA /dev/rdsk/c4t000B080006002578d0s1 FRA_0001 FRA_0001 49596
FRA /dev/rdsk/c4t000B080008002578d0s1 FRA_0000 FRA_0000 99212
[CANDIDATE] /dev/rdsk/c4t000B080011002578d0s1 0
[CANDIDATE] /dev/rdsk/c4t000B080007002578d0s1 0
[CANDIDATE] /dev/rdsk/c4t000B080009002578d0s1 0
[CANDIDATE] /dev/rdsk/c4t000B080012002578d0s1 0
7 rows selected.
SQL> @asm
no rows selected
DISK_GROUP_NAME DISK_FILE_PATH DISK_FILE_NAME DISK_FILE_FAIL_GROUP TOTAL_MB
-------------------- ------------------------------------------------------------ -------------------- ------------------------- ----------
BAILOUT /dev/rdsk/c4t000B080010002578d0s1 BAILOUT_0000 BAILOUT_0000 99212
FRA /dev/rdsk/c4t000B080006002578d0s1 FRA_0001 FRA_0001 49596
FRA /dev/rdsk/c4t000B080008002578d0s1 FRA_0000 FRA_0000 99212
[CANDIDATE] /dev/rdsk/c4t000B080011002578d0s1 0
[CANDIDATE] /dev/rdsk/c4t000B080007002578d0s1 0
[CANDIDATE] /dev/rdsk/c4t000B080009002578d0s1 0
[CANDIDATE] /dev/rdsk/c4t000B080012002578d0s1 0
7 rows selected.
--
-- Disk is been added. Status all set.
-- Now drop. Check satus and then unpresent the unwanted disk in OS.
--
SQL> alter diskgroup FRA drop disk FRA_0000 rebalance power 11;
Diskgroup altered.
SQL> @asm
no rows selected
DISK_GROUP_NAME DISK_FILE_PATH DISK_FILE_NAME DISK_FILE_FAIL_GROUP TOTAL_MB
-------------------- ------------------------------------------------------------ -------------------- ------------------------- ----------
BAILOUT /dev/rdsk/c4t000B080010002578d0s1 BAILOUT_0000 BAILOUT_0000 99212
FRA /dev/rdsk/c4t000B080006002578d0s1 FRA_0001 FRA_0001 49596
[CANDIDATE] /dev/rdsk/c4t000B080008002578d0s1 0
[CANDIDATE] /dev/rdsk/c4t000B080012002578d0s1 0
[CANDIDATE] /dev/rdsk/c4t000B080007002578d0s1 0
[CANDIDATE] /dev/rdsk/c4t000B080009002578d0s1 0
[CANDIDATE] /dev/rdsk/c4t000B080011002578d0s1 0
7 rows selected.
[Updated on: Wed, 31 August 2011 07:11] Report message to a moderator
|
|
|
|
|