Often, the Exadata arrives at the customer site with High redundancy disk groups when the customer wants to exploit as much of the disk space available on the Normal redundancy.   Here’s a simple script to convert the high redundancy disk group to a normal redundancy disk group:
 
cat gen_dg.sql
define DG=’&1′
set pages 0
set lines 200 trims on feed off  echo off echo off ver off
spool cr_&DG..sql
prompt CREATE DISKGROUP &DG NORMAL REDUNDANCY
 
 
set serveroutput on size unlimited
 
 
declare
v_failgroup v$asm_disk.failgroup%TYPE;
 
 
cursor c1 is
select chr(39)||path||chr(39) path, name
from v$asm_disk
where group_number = (select group_number from v$asm_diskgroup
                      where name=upper(‘&DG’))
and failgroup=v_failgroup
order by path;
 
 
cursor c2 is
select distinct failgroup
from v$asm_disk
order by failgroup;
 
 
cursor c3 is
select allocation_unit_size, compatibility, database_compatibility
from v$asm_diskgroup;
r3 c3%ROWTYPE;
 
 
begin
for r2 in c2 loop
v_failgroup := r2.failgroup;
dbms_output.put_line(‘FAILGROUP ‘||r2.failgroup||’ DISK’);
 
 
for r1 in c1 loop
if c1%rowcount = 1 then
   dbms_output.put_line(r1.path);
else
   dbms_output.put_line(‘,’||r1.path);
end if;
 
 
end loop;
 
 
end loop;
 
 
open c3; fetch c3 into r3;
dbms_output.put_line(‘ATTRIBUTE’);
dbms_output.put_line(chr(39)||’compatible.asm’||chr(39)||’=’||chr(39)||r3.compatibility||chr(39)||’,’);
dbms_output.put_line(chr(39)||’compatible.rdbms’||chr(39)||’=’||chr(39)||r3.database_compatibility||chr(39)||’,’);
dbms_output.put_line(chr(39)||’au_size’||chr(39)||’=’||chr(39)||r3.allocation_unit_size||chr(39)||’,’);
dbms_output.put_line(chr(39)||’cell.smart_scan_capable’||chr(39)||’=’||chr(39)||’TRUE’||chr(39)||’;’);
close c3;
 
 
end;
/

spool off