Skip to main content

Display OracleASM Headers

 So.... I am up at 3AM troubleshooting an "issue" that mysteriously appeared when our DBAs restart CRS/ASM/WTH earlier during some maintenance.  Apparently ASM was unable to find 3 devices.

In this example 0c32 is a known-good and 0c33 is a suspected-bad.

dd if=/dev/mpath/ITSHDS06_0c35p1 bs=8 skip=13 count=4 2>/dev/null|strings
TT6SMS_DATA01

[root@smsdba01 mapper]# dd if=/dev/mpath/ITSHDS06_0c32p1 bs=8 skip=13 count=6 2>/dev/null|strings
TT6SMS_DATA01
TT6SMS_DATAASM31
[root@smsdba01 mapper]# /etc/init.d/oracleasm querydisk /dev/mpath/ITSHDS06_0c32p1
Device "/dev/mpath/ITSHDS06_0c32p1" is marked an ASM disk with the label "TT6SMS_DATAASM31" 


 [root@ttgllpsmsdba01 mapper]# dd if=/dev/mpath/ITSHDS06_0c33p1 bs=8 skip=13 count=6 2>/dev/null|strings
TT6SMS_DATA01
TT6SMS_DATAASM32
[root@ttgllpsmsdba01 mapper]#  /etc/init.d/oracleasm querydisk /dev/mpath/ITSHDS06_0c33p1
Device "/dev/mpath/ITSHDS06_0c33p1" defines a device with no label



[root@ttgllpsmsdba01 mapper]# for DEV in 32 33 34 35; do od -c /dev/mpath/ITSHDS06_0c${DEV}p1 | head -10; echo; done
0000000 001 202 001 001  \0  \0  \0  \0   (  \0  \0 200 370  \v   Q 312
0000020  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000040   O   R   C   L   D   I   S   K   T   T   6   S   M   S   _   D
0000060   A   T   A   A   S   M   3   1  \0  \0  \0  \0  \0  \0  \0  \0
0000100  \0  \0      \v   (  \0 001 003   T   T   6   S   M   S   _   D
0000120   A   T   A   A   S   M   3   1  \0  \0  \0  \0  \0  \0  \0  \0
0000140  \0  \0  \0  \0  \0  \0  \0  \0   T   T   6   S   M   S   _   D
0000160   A   T   A   0   1  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000200  \0  \0  \0  \0  \0  \0  \0  \0   T   T   6   S   M   S   _   D
0000220   A   T   A   A   S   M   3   1  \0  \0  \0  \0  \0  \0  \0  \0

0000000 001 202 001 001  \0  \0  \0  \0   ,  \0  \0 200 252 310 247   N
0000020  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000040   O   R   C   L   D   I   S   K  \0  \0  \0  \0  \0  \0  \0  \0
0000060  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000100  \0  \0      \v   ,  \0 001 003   T   T   6   S   M   S   _   D
0000120   A   T   A   A   S   M   3   2  \0  \0  \0  \0  \0  \0  \0  \0
0000140  \0  \0  \0  \0  \0  \0  \0  \0   T   T   6   S   M   S   _   D
0000160   A   T   A   0   1  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000200  \0  \0  \0  \0  \0  \0  \0  \0   T   T   6   S   M   S   _   D
0000220   A   T   A   A   S   M   3   2  \0  \0  \0  \0  \0  \0  \0  \0

[root@ttgllpsmsdba01 mapper]# /u02/app/oracle/product/11.2.0/bin/kfed read /dev/mapper/ITSHDS06_0c32p1 | head -25
kfbh.endian:                          1 ; 0x000: 0x01
kfbh.hard:                          130 ; 0x001: 0x82
kfbh.type:                            1 ; 0x002: KFBTYP_DISKHEAD
kfbh.datfmt:                          1 ; 0x003: 0x01
kfbh.block.blk:                       0 ; 0x004: blk=0
kfbh.block.obj:              2147483688 ; 0x008: disk=40
kfbh.check:                  3394309112 ; 0x00c: 0xca510bf8
kfbh.fcn.base:                        0 ; 0x010: 0x00000000
kfbh.fcn.wrap:                        0 ; 0x014: 0x00000000
kfbh.spare1:                          0 ; 0x018: 0x00000000
kfbh.spare2:                          0 ; 0x01c: 0x00000000
kfdhdb.driver.provstr:ORCLDISKTT6SMS_DATAASM31 ; 0x000: length=24
kfdhdb.driver.reserved[0]:   1396069460 ; 0x008: 0x53365454
kfdhdb.driver.reserved[1]:   1147097933 ; 0x00c: 0x445f534d
kfdhdb.driver.reserved[2]:   1094800449 ; 0x010: 0x41415441
kfdhdb.driver.reserved[3]:    825445715 ; 0x014: 0x31334d53
kfdhdb.driver.reserved[4]:            0 ; 0x018: 0x00000000
kfdhdb.driver.reserved[5]:            0 ; 0x01c: 0x00000000
kfdhdb.compat:                186646528 ; 0x020: 0x0b200000
kfdhdb.dsknum:                       40 ; 0x024: 0x0028
kfdhdb.grptyp:                        1 ; 0x026: KFDGTP_EXTERNAL
kfdhdb.hdrsts:                        3 ; 0x027: KFDHDR_MEMBER
kfdhdb.dskname:        TT6SMS_DATAASM31 ; 0x028: length=16
kfdhdb.grpname:           TT6SMS_DATA01 ; 0x048: length=13
kfdhdb.fgname:         TT6SMS_DATAASM31 ; 0x068: length=16
[root@ttgllpsmsdba01 mapper]# /u02/app/oracle/product/11.2.0/bin/kfed read /dev/mapper/ITSHDS06_0c33p1 | head -25
kfbh.endian:                          1 ; 0x000: 0x01
kfbh.hard:                          130 ; 0x001: 0x82
kfbh.type:                            1 ; 0x002: KFBTYP_DISKHEAD
kfbh.datfmt:                          1 ; 0x003: 0x01
kfbh.block.blk:                       0 ; 0x004: blk=0
kfbh.block.obj:              2147483692 ; 0x008: disk=44
kfbh.check:                  1319618730 ; 0x00c: 0x4ea7c8aa
kfbh.fcn.base:                        0 ; 0x010: 0x00000000
kfbh.fcn.wrap:                        0 ; 0x014: 0x00000000
kfbh.spare1:                          0 ; 0x018: 0x00000000
kfbh.spare2:                          0 ; 0x01c: 0x00000000
kfdhdb.driver.provstr:         ORCLDISK ; 0x000: length=8
kfdhdb.driver.reserved[0]:            0 ; 0x008: 0x00000000
kfdhdb.driver.reserved[1]:            0 ; 0x00c: 0x00000000
kfdhdb.driver.reserved[2]:            0 ; 0x010: 0x00000000
kfdhdb.driver.reserved[3]:            0 ; 0x014: 0x00000000
kfdhdb.driver.reserved[4]:            0 ; 0x018: 0x00000000
kfdhdb.driver.reserved[5]:            0 ; 0x01c: 0x00000000
kfdhdb.compat:                186646528 ; 0x020: 0x0b200000
kfdhdb.dsknum:                       44 ; 0x024: 0x002c
kfdhdb.grptyp:                        1 ; 0x026: KFDGTP_EXTERNAL
kfdhdb.hdrsts:                        3 ; 0x027: KFDHDR_MEMBER
kfdhdb.dskname:        TT6SMS_DATAASM32 ; 0x028: length=16
kfdhdb.grpname:           TT6SMS_DATA01 ; 0x048: length=13
kfdhdb.fgname:         TT6SMS_DATAASM32 ; 0x068: length=16


I believe the resolution for this particular issue is:
/etc/init.d/oracleasm force-renamedisk  /dev/mpath/ITSHDS06_0c33p1 TT6SMS_DATAASM32


Sure enough...
[root@ttgllpsmsdba01 mapper]# for DEV in 33 34 35; do dd if=/dev/mpath/ITSHDS06_0c${DEV}p1 of=/tmp/ITSHDS060c${DEV}p1.dd bs=1024 count=51200; done
51200+0 records in
51200+0 records out
52428800 bytes (52 MB) copied, 3.65476 seconds, 14.3 MB/s
51200+0 records in
51200+0 records out
52428800 bytes (52 MB) copied, 3.28705 seconds, 16.0 MB/s
51200+0 records in
51200+0 records out
52428800 bytes (52 MB) copied, 2.98838 seconds, 17.5 MB/s
[root@ttgllpsmsdba01 mapper]# /etc/init.d/oracleasm force-renamedisk  /dev/mpath/ITSHDS06_0c33p1
TT6SMS_DATAASM32
 Renaming disk "/dev/mpath/ITSHDS06_0c33p1" to "TT6SMS_DATAA[  OK  ]
[root@ttgllpsmsdba01 mapper]# /etc/init.d/oracleasm force-renamedisk  /dev/mpath/ITSHDS06_0c34p1 TT6SMS_DATAASM33
Renaming disk "/dev/mpath/ITSHDS06_0c34p1" to "TT6SMS_DATAA[  OK  ]
[root@ttgllpsmsdba01 mapper]# /etc/init.d/oracleasm force-renamedisk  /dev/mpath/ITSHDS06_0c35p1 TT6SMS_DATAASM34
Renaming disk "/dev/mpath/ITSHDS06_0c35p1" to "TT6SMS_DATAA[  OK  ]
[root@ttgllpsmsdba01 mapper]# /etc/init.d/oracleasm querydisk  /dev/mpath/ITSHDS06_0c33p1 Device "/dev/mpath/ITSHDS06_0c33p1" is marked an ASM disk with the label "TT6SMS_DATAASM32"

 

Comments

Popular posts from this blog

RHN Satellite Server (spacewalk) repomd.xml not found

"repomd.xml not found" If you add a channel, or if your RHN cache gets corrupted, and one of your guests complains that it cannot find repomd.xml for jb-ews-2-x86_64-server-5-rpm (for example) - you need to rebuild your repodata cache. Normally this is an automated job - which is exemplified by the fact that you have obviously built out your entire Satellite environment and never had to do any of the steps you are about to do. So - some prep work: Open 3 terminals to your Satellite Server and run: # Term 1 cd /var/cache/rhn watch "ls -l | wc -l" # Term 2 pwd cd /var/log/rhn tail -f rhn_taskomatic_daemon.log # Term 3 satellite-sync --channel=jb-ews-2-x86_64-server-5-rpm Once the satellite-sync has completed, you >should< see the count increment by one.  If you are unlucky (like me) you will not. You then need to login to the Satellite WebUI as the satellite admin user. Click on the Admin tab (at the top) Task Schedules (on the left) fin

Install RHEL 7 on old HP DL380 g5

Someone at work had been running RHEL on an HP DL380 G5 and blew it up.  After several attempts at doing an installation that made me conclude the hardware was actually bad... I kept digging for the answer. Attempt install and Anaconda could not find any disks - try a Drivers Disk (dd.img) both cciss and hpsa.   -- once we did that, when the system would reboot it would say it could not find a disk. hmmm. Boot from your installation media and interrupt the startup at grub. Add hpsa.hpsa_allow_any=1 hpsa.hpsa_simple_mode=1 to the line starting with linuxefi press CTRL-X to boot. Once the system restarts after the install, you need to once again interrupt the startup and add the line from above. After the system starts, edit /etc/default/grub and add those 2 parameters to the end of the line starting with GRUB_CMDLINE_LINUX (which likely has quiet at the end of the line currently). then run # cp /boot/grub2/grub.cfg /boot/grub2/grub.cfg.orig # grub2-mkconfig -o /boot/grub2

MOTD with colors! (also applies to shell profiles)

I'm not sure why I had never looked into this before, but this evening I became obsessed with discovering how to present different colored text in the /etc/motd. A person had suggested creating a shell script (rather than using special editing modes in vi, or something) and I agree that is the simplest way of getting this accomplished quickly. This most noteworthy portion of this script is the following: RESET="\033[0m" that puts the users shell back to the original color. I typically like a green text on black background. Also - a great reference for the different colors and font-type (underscore, etc...) https://wiki.archlinux.org/index.php/Color_Bash_Prompt I found this example on the web and I wish I could recall where so that I could provide credit to that person. #!/bin/bash #define the filename to use as output motd="/etc/motd" # Collect useful information about your system # $USER is automatically defined HOSTNAME=`uname -n` KERNEL=`un