Oracle ASM accidentally messed with my hdisk


 
Thread Tools Search this Thread
Operating Systems AIX Oracle ASM accidentally messed with my hdisk
# 1  
Old 05-25-2011
Oracle ASM accidentally messed with my hdisk

I have AIX 5.3 with oracle 10g ( test server). While trying to create RAW disk for Oracle ASM I have accidentally messed with rootvg (hdisk0 & hdisk1)

When I do
Code:
# lspv hdisk0 
0516-066 : Physical volume is not a volume group member. 
        Check the physical volume name specified. 
PHYSICAL VOLUME:    hdisk0                   VOLUME GROUP:     rootvg 
PV IDENTIFIER:      0005681601fcded1 VG IDENTIFIER     000568160000d7000000013001fcfe28 
PV STATE:           ??????? 
STALE PARTITIONS:   ???????                  ALLOCATABLE:      ??????? 
PP SIZE:            ???????                  LOGICAL VOLUMES:  ??????? 
TOTAL PPs:          ???????                  VG DESCRIPTORS:   ??????? 
FREE PPs:           ???????                  HOT SPARE:        ??????? 
USED PPs:           ???????                  MAX REQUEST:      256 kilobytes 
FREE DISTRIBUTION:  ??????? 
USED DISTRIBUTION:  ??????? 
 
# lquerypv -h /dev/hdisk0 
00000000   00820101 00000000 80000000 25D3BE94  |............%...| 
00000010   00000000 00000000 00000000 00000000  |................| 
00000020   4F52434C 4449534B 00000000 00000000  |ORCLDISK........| 
00000030   00000000 00000000 00000000 00000000  |................| 
00000040   0A100000 00000203 4449534B 4752505F  |........DISKGRP_| 
00000050   30303030 00000000 00000000 00000000  |0000............| 
00000060   00000000 00000000 4449534B 47525000  |........DISKGRP.| 
00000070   00000000 00000000 00000000 00000000  |................| 
00000080   00000000 00000000 434F4E54 524F4C4C  |........CONTROLL| 
00000090   45523100 00000000 00000000 00000000  |ER1.............| 
000000A0   00000000 00000000 00000000 00000000  |................| 
000000B0   00000000 00000000 00000000 00000000  |................| 
000000C0   00000000 00000000 01F6D713 C9D19400  |................| 
000000D0   01F6D713 C9D19400 02001000 00100000  |................| 
000000E0   0001BC80 00011176 00000002 00000001  |.......v........| 
000000F0   00000002 00000002 00000000 00000000  |................|

This case happened to me before but I want able to resolve it, cause I thought a restart would solve but I ended up reinstalling AIX again

Moderator's Comments:
Mod Comment Please use [code] and [/code] tags when posting code, data or logs etc. to preserve formatting and enhance readability, thanks.

Last edited by zaxxon; 05-25-2011 at 08:41 AM.. Reason: code tags
# 2  
Old 05-25-2011
Changes to LVM are written to the ODM and onto the disks. They are permanent and can't be resolved by a reboot. After a reboot your box will not come up again, since you destroyed it's rootvg. It is currently only working, because the programs are in memory.
If there is a mirror set up between hdisk0 and 1, the copy will most probably be destroyed as well.

I guess you have to reinstall or restore a backup of your rootvg.
You simply have to take care with what you do.

Last edited by zaxxon; 05-25-2011 at 09:14 AM.. Reason: removed assumption about raw LVs
# 3  
Old 05-27-2011
Hi,

as your system still seems to be up, try just a simple rm /dev/asm_diskx (on the device that has the same major/minor number as your hdisk0). If the disk is afterwards empty (what may happen as the asm header is using the same header as the volumegroup definition) than try to unmirror and reduce the 'missing' disk from rootvg like you would do it with a dead disk - you can run rmdev -Rdl hdisk0 as well ....

Just for my curiosity - how did you manage to do this in first instance - as volumegroups and asm devices exclude each other ... so we had destroyed our asm databases several times by doing the opposite - assigning asm devices mistakenly to volumegroups Smilie

Regards
zxmaus
# 4  
Old 05-30-2011
it seems that i will have to re-install AIX again.
the problem is that im not an aix expert im just a DBA so i had to go by myself in this part and there was not enough documents about how to create raw disks for Oracle ASM, what we have is hdisk0 hdisk1 for rootvg (mirrored) hdisk2 oracle vg and the new rawdisk hdisk3 and i thought that every rhdisk is a raw device so in oracle i added rhdisk0 1 2 3 which turrned out to be linked to the other hdisks thats it, but i feel good that i have done this now so i could learn it the hard way and i wont be forgetting this lesson again Smilie

thanks everyone for ur help
# 5  
Old 05-30-2011
adm devices need to be configured before you can use them

for this you need to know the major minor numbers of the disks you are intending to use

lets assume you want to use hdisk3 and this has major number 36 and minor number 3 than you should run mknod /dev/asm_disk01 c 36 3 and than in oracle you would use this asm_disk01
using hdisk names themselves is really really bad practice before oracle asm 11.2 as the alias names are the only means for the SA to determine if a disk is in use by asm or really free

regards
zxmaus
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Solaris

Oracle ASM on Solaris 11.3

Hi Folks, I've just built a Solaris 11.3 server with a number of LDOM's, all good and well and not any serious issues so far. On our older Solaris 10 systems we ran Oracle 11g using ASM disks, these disks were the raw device meta disks and came in very nicely as "/dev/md/rdsk/dnn" all worked... (4 Replies)
Discussion started by: gull04
4 Replies

2. UNIX for Advanced & Expert Users

Script to automate add/resize datafile in Oracle ASM Storage

Hi all, Could anyone please share ideas or logic on how to automate add/resize datafile in Oracle ASM Storage for Oracle RAC/Single Node databases when any tablespace space alert is trigerred by OEM? Thanks for your help and time on it! Thanks&regards, a1_win Please DON'T use CODE tags... (0 Replies)
Discussion started by: a1_win
0 Replies

3. Solaris

Can we add Oracle ASM in sun cluster3.3 or 4.0 in failover mode

Hi I am new to this forum & oracle DBA also, I would like to know that can we add Oracle ASM in failover mode in sun cluster 3.3 or 4.0 means that if suppose oracle is running along with ASM on node1 & this node went down due to hardware issue then both oracle along with ASM must move to... (1 Reply)
Discussion started by: hb00
1 Replies

4. Shell Programming and Scripting

Use perl to connect to Oracle ASM as sysdba

I am novice to perl. Can someone guide me on the below query. We have an existing perl script which connects to database to check the disk group status which i wanted to retieve directly from ASM rather than database. This is because, a cluster has more than 4 databases running and a check on... (1 Reply)
Discussion started by: sai_rsk
1 Replies

5. Programming

Help on a perl script to connect to oracle ASM as sysdba

I am novice to perl. Can someone guide me on the below query. We have an existing perl script which connects to database to check the disk group status which i wanted to retieve directly from ASM rather than database. This is because, a cluster has more than 4 databases running and a check on... (0 Replies)
Discussion started by: sai_rsk
0 Replies

6. Solaris

Command to format Oracle ASM raw disk

Hi, Can any one please provide the command to format an Oracle Raw Disk in Solaris 10. I have been used the following commands: dd if=/dev/zero of=<raw disk path> Thanks ---------- Post updated at 12:20 PM ---------- Previous update was at 10:11 AM ---------- Well this didn't give... (0 Replies)
Discussion started by: Mack1982
0 Replies

7. Red Hat

ORACLE RAC ASM disk question

Perhaps someone here has some experience with this. machine os RHE 4 6 oracle 10g RAC disk is SAN attached clariion. I have presented new disks to the host, so the machine sees all needed LUNS. powermt shows them, they are labeled and i have fdisk'd them. They are visible across all RAC... (5 Replies)
Discussion started by: Eronysis
5 Replies

8. Solaris

asm vs disksuite for oracle

I'm running solaris, with solstice disksuite. With other systems, i run veritas volume manager. My dba want to implement ASM with oracle 10g. Is it possible to create volumes with disksuite for ASM. Oracle want a volume name ex: vol1 My question is, what is the best STANDARD solution. ... (5 Replies)
Discussion started by: simquest
5 Replies
Login or Register to Ask a Question