RE: How to rename ASM disk?

  • From: Luca Canali <Luca.Canali@xxxxxxx>
  • To: "Mark.Bobak@xxxxxxxxxxxx" <Mark.Bobak@xxxxxxxxxxxx>
  • Date: Fri, 18 Apr 2014 15:55:42 +0000

Hi Mark,

I believe that if you update the disk header and the file directory (file N.2) 
with kfed it should work. I have briefly tested this and it worked for me. 
However I am not sure I would want to do that in production :)
Here below some notes from my test (on 11.2.0.3 for Linux):

1) Identify all the mirror extents of ASM file N.2 for the relevant diskgroup 
(i.e. the disk directory). Example:
select disk_kffxp,au_kffxp, path from x$kffxp x,v$asm_disk_stat v
where x.group_kffxp=2 and number_kffxp=2
      and x.group_kffxp=v.group_number and x. disk_kffxp=v.disk_number
order by x.pxn_kffxp;

2) dismount the diskgroup

3) Read the first copy of the disk header and update it with the new disk name 
and length. Example:

kfed read /dev/mapper/disk1name_p1 aunum=0 blknum=0 text=disk1name_p1_au0blk0

make a backup copy of the file disk1name_p1_au0blk0
vi disk1name_1p1_au0blk0

update -> kfddde[0].dskname:              NEWNAME ; 0x038: length=7

kfed write /dev/mapper/disk1name_p1 aunum=0 blknum=0 text=disk1name_1p1_au0blk0

Note: it does not seem to be necessary to update the other copies of the disk 
header, ASM seems to take care of that when we will mount the diskgroup.

4) Use kfed to read, modify and then write the new disk name in the relevant 
entry of the directory. 
This is similar to point N.3 with the notable minor differences that: 

- From step (1) above we know in which aunum and disk we will find the 
directory but not necessarily in which blknum. It's just a matter of trying 
blknum=0, then blknum=1, etc. It won't take long.

- For diskgroups in normal or high redundancy it's advisable to update all the 
mirror copies.

5) mount the diskgroup, monitor the ASM alert log and hope for the best :)

6) Some tips to recover from errors: 
- dismount the diskgroup
- copy back the previous values of the modified blocks with using from the 
backup files
- mount the diskgroup
- the affected disks will probably be offline, online them back.

-----------

An additional comment is that you seem to have a case for upgrading ASM (CRS) 
to version 12c. We have a few systems with CRS/ASM 12.1 and RDBMS 11.2 and this 
seems to work OK for us for far.

Best regards,
Luca


From: oracle-l-bounce@xxxxxxxxxxxxx [mailto:oracle-l-bounce@xxxxxxxxxxxxx] On 
Behalf Of Mark Bobak
Sent: 17 April 2014 23:53
To: oracle-l@xxxxxxxxxxxxx
Subject: How to rename ASM disk?

Hi all,

Another day, another question.  I'm trying to figure out if it's possible 
(before 12c) to rename an ASM disk.  Note that I know how to rename an ASM disk 
group, and how to rename an ASMLib  label.  But, from what I can see, changing 
the ASM disk name, I.e. V$ASM_DISK.NAME is not possible?

I tried using kfed, which I know worked in 10g to rename a disk group, in the 
days before it was supported.  (In 11g, renaming ASM disk group is supported.)  
But, my attempt to use kfed to rename the ASM disk name, using similar 
procedure to what was used for renaming disk group, failed.

Does anyone know if it's possible to rename an ASM disk?

Background:
We have just moved our eBS environment to ASM.  We want to be able to clone 
ebsprd, with a disk name like 'EBSPRD_DATA_0001', to say, ebsuat.  When we do 
that, I can rename the disk group name and the ASMLib label, no problem.  But 
the disk name (V$ASM_DISK.NAME) and fail group (V$ASM_DISK.FAILGROUP) remain 
'EBSPRD_DATA_0001'.  This would be fine, but what happens when I clone ebsprd 
again, to this same server, but this time to create, for example, ebsuat2?  
Now, the disk name and fail group will collide.  Help!

Thanks,

-Mark

PS  Yes, it seems that it's possible in 12c, with 'alter disk group <dg_name> 
rename disk <disk_name> to <new_disk_name>;', but, I'm not ready to go to 12c 
just yet.
--
//www.freelists.org/webpage/oracle-l


Other related posts: