Monday, December 8, 2014

Getting Yesterdays or Tomorrows Day With Bash Shell Date Command

Getting Yesterdays or Tomorrows Day With Bash Shell Date Command


When invoked without arguments, the date command displays the current date and time. Depending on the options specified, date will set the date and time or print it in a user defined way. I've seen many sysadmin writing perl scripts for calculating relative date such as yesterdays or tomorrows day. You can use GNU date command, which is designed to handle relative date calculation such as:
  • 1 Year
  • 2 Days
  • 2 Days ago
  • 5 Years
The syntax is as follows:
 
date  --date="STRING"
date  --date="next Friday"
date  --date="2 days ago"
 
The --date=STRING is a human readable format such as "next Thursday" or "1 month ago". A date string may contain items indicating calendar date, time of day, time zone, day of week, relative time, relative date, and numbers.

Why Use Relative GNU/date Formats?

  • Ease of use
  • Write your own shell scripts
  • Automate task using cron (example run a job on last day of the month or Nth day of the month or 3rd Friday and so on)

Examples

First, to display today's date, enter:
$ date
Sample outputs:
Wed Jun 15 04:47:45 IST 2011
To display yesterday's date, enter:
$ date --date="1 days ago"
OR
$ date --date="1 day ago"
OR
$ date --date="yesterday"
OR
$ date --date="-1 day"

Adding Disks under Linux

Adding Disks under Linux

Once the disk has been physically connected, the system should detect it during the boot process. The dmesg command can be used to check the boot messages:

  Vendor: HP        Model: C3724S            Rev: 5173
  Type:   Direct-Access                      ANSI SCSI revision: 02
Detected scsi disk sdc at scsi0, id 3, lun 0

Device nodes

It may be necessary to create device nodes for the new disk. Under Linux, device nodes use the format /dev/[r]sdXN, where X is a letter specifying the drive number (with a being the lowest SCSI ID, bbeing the next highest, etc), and N is the partition number on that drive. The MAKEDEV command is used to create new device nodes. For example, to create a device node for the third SCSI disk:

# cd /dev; MAKEDEV sdc

It is important to note that disk ordering is done at boot time, so there is not a direct mapping between the letter used to identify the drive and the SCSI ID of that drive. If the SCSI ID of the new drive is lower than that of one of the existing drives, the naming scheme for all of the higher-numbered will be changed, possibly causing problems in the /etc/fstab configuration.

Partitioning

Partitioning and labeling a disk under Linux is done with the fdisk command. There is also a screen-oriented version called cfdisk, which has essentially the same commands.
For instructions on how to use fdisk to partition a drive, see the Linux Installation and Getting Started guide, particularly the section on Creating Linux partitions

Making new filesystems

To create a new filesystem on the disk, use the mkfs command:
# mkfs -t ext2 /dev/sdc1
This will create an ext2 type filesystem on the third SCSI disk, first partition.
To check the new filesystem for integrity, use fsck# fsck -f -y /dev/sdc1 The -f option forces fsck to check the new filesystem, even if it is considered to be clean. The -y option tells fsck to assume a "yes" answer to any questions normally posed to the user.

Adding Disks under Solaris

Adding Disks under Solaris

Once the disk has been physically installed, the system should recognize a new device on the SCSI bus. After powering up the system, hold down the Stop key (on some Suns, this is labeled L1), and hit the A key to enter the boot monitor.
At the boot monitor, probe-scsi can be used to list the SCSI devices the system recognizes:

Type 'go' to resume
Type help for more information
ok probe-scsi
   .
          .
Target 5
  Unit 0  Disk     HP        C37245       5153
          .
          .

Note: on some older Suns, it may be necessary to enter "n" at the boot monitor to enter the newer command mode before probing for disks.
After verifying that the new disk is recognized by the system, reboot the machine by issuing "boot -r" from the boot monitor. The -r option tells the system to reconfigure for the new device.
During the boot process, the new disk should be recognized and a message should be printed to the console. (On some Suns, it may not be printed to the screen, but will be written to the system log -- in this case, the dmesg command should be used to review the boot messages). The messages should be similar to this:

   sd5 at esp0: target 5 lun 0
   sd5 is /iommu@f,e0000000/sbus@f,e0001000/espdma@f,400000/esp@f,800000/sd@5,0
   WARNING: /iommu@f,e0000000/sbus@f,e0001000/espdma@f,400000/esp@f,800000/sd@5,0 (sd5):  
    corrupt label - wrong magic number
    Vendor 'HP', product 'C3724S', 2354660 512 byte blocks 

In this example, the disk is located on controller 0, SCSI ID 5. The "corrupt label" warning means that the disk doesn't have a Solaris label on it yet.

Device nodes

The correct device nodes for the disk are automatically added when a "boot -r" is issued. If the system hasn't been rebooted using the -r option, here is a script that will configure the system for the new disk.

Formatting, Partitioning and Labeling

The format utility is used to format, partition, and label disks. It is menu driven. The raw disk device is given as an argument; if no argument is given, format will print a list of available disks and ask the user to pick one.

# format /dev/rdsk/c0t5d0s2
selecting /dev/rdsk/c0t5d0s2
[disk formatted]
 
 
FORMAT MENU:
        disk       - select a disk
        type       - select (define) a disk type
        partition  - select (define) a partition table
        current    - describe the current disk
        format     - format and analyze the disk
        repair     - repair a defective sector
        label      - write label to the disk
        analyze    - surface analysis
        defect     - defect list management
        backup     - search for backup labels
        verify     - read and display labels
        save       - save new disk/partition definitions
        inquiry    - show vendor, product and revision
        volname    - set 8-character volume name
        quit

Typing format at the prompt will perform a low-level format on the disk. This is usually not necessary with a new disk, since they generally come pre-formatted, but may help to map out any additional defects the drive may have developed.
The next step is to partition the drive. Type partition at the prompt to switch to the partition menu:

format> partition

PARTITION MENU:
        0      - change `0' partition
        1      - change `1' partition
        2      - change `2' partition
        3      - change `3' partition
        4      - change `4' partition
        5      - change `5' partition
        6      - change `6' partition
        7      - change `7' partition
        select - select a predefined table
        modify - modify a predefined partition table
        name   - name the current table
        print  - display the current table
        label  - write partition map and label to the disk
        quit

Type in print to get a listing of the current partition table. Note that the second partition represents the entire disk:

partition> print
Current partition table (original):
Total disk cylinders available: 3361 + 2 (reserved cylinders)
 
Part      Tag    Flag     Cylinders        Size            Blocks
  0 unassigned    wm       0               0         (0/0/0)          0
  1 unassigned    wm       0               0         (0/0/0)          0
  2     backup    wu       0-3360          1.12GB    (3361/0/0) 2352700
  3 unassigned    wm       0               0         (0/0/0)          0
  4 unassigned    wm       0               0         (0/0/0)          0
  5 unassigned    wm       0               0         (0/0/0)          0
  6 unassigned    wm       0               0         (0/0/0)          0
  7 unassigned    wm       0               0         (0/0/0)          0
 

We will be splitting the disk up into two equal partitions, numbers 3 and 4. The first partition will span cylinders 0 through 1680, the second will span cylinders 1681 through 3360. The partition size can be specified in blocks, cylinders, or megabytes by using the bc, and mb suffixes when entering the size.

partition> 3
Part      Tag    Flag     Cylinders        Size            Blocks
  3 unassigned    wm       0               0         (0/0/0)          0
 
Enter partition id tag[unassigned]: 
Enter partition permission flags[wm]: 
Enter new starting cyl[0]: 0
Enter partition size[0b, 0c, 0.00mb]: 1680c
partition> 4
Enter partition id tag[unassigned]: 
Enter partition permission flags[wm]: 
Enter new starting cyl[0]: 1681
Enter partition size[0b, 0c, 0.00mb]: 1680c

Once the disk has been partitioned, the label should be written to the disk:

partition> label
Ready to label disk, continue? y

The new partition table can be printed from the format utility, or may be viewed using the prtvtoc command:

# prtvtoc /dev/rdsk/s0t5d0s2
* /dev/rdsk/c0t5d0s2 partition map
*
* Dimensions:
*     512 bytes/sector
*     140 sectors/track
*       5 tracks/cylinder
*     700 sectors/cylinder
*    3363 cylinders
*    3361 accessible cylinders
*
* Flags:
*   1: unmountable
*  10: read-only
*
* Unallocated space:
*       First     Sector    Last
*       Sector     Count    Sector 
*     1176000       700   1176699
*
*                          First     Sector    Last
* Partition  Tag  Flags    Sector     Count    Sector  Mount Directory
       2      5    01          0   2352700   2352699
       3      0    00          0   1176000   1175999
       4      0    00    1176700   1176000   2352699


Creating new filesystems

Finally, new filesystems can be created on the disk using the newfs command, and each filesystem is checked for integrity using fsck:

# newfs /dev/rdsk/c0t5d0s3
newfs: construct a new file system /dev/rdsk/c0t5d0s3: (y/n)? y
/dev/rdsk/c0t5d0s3:     1176000 sectors in 1680 cylinders of 5 tracks, 140 sectors
        574.2MB in 105 cyl groups (16 c/g, 5.47MB/g, 2624 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
 32, 11376, 22720, 34064, 45408, 56752, 68096, 79440, 89632, 100976, 112320,
 123664, 135008, 146352, 157696, 169040, 179232, 190576, 201920, 213264,
 224608, 235952, 247296, 258640, 268832, 280176, 291520, 302864, 314208,
 325552, 336896, 348240, 358432, 369776, 381120, 392464, 403808, 415152,
 426496, 437840, 448032, 459376, 470720, 482064, 493408, 504752, 516096,
 527440, 537632, 548976, 560320, 571664, 583008, 594352, 605696, 617040,
 627232, 638576, 649920, 661264, 672608, 683952, 695296, 706640, 716832,
 728176, 739520, 750864, 762208, 773552, 784896, 796240, 806432, 817776,
 829120, 840464, 851808, 863152, 874496, 885840, 896032, 907376, 918720,
 930064, 941408, 952752, 964096, 975440, 985632, 996976, 1008320, 1019664,
 1031008, 1042352, 1053696, 1065040, 1075232, 1086576, 1097920, 1109264,
 1120608, 1131952, 1143296, 1154640, 1164832,
# fsck -y /dev/rdsk/c0t5d0s3
** /dev/rdsk/c0t5d0s3
** Last Mounted on 
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
2 files, 9 used, 551853 free (13 frags, 68980 blocks, 0.0% fragmentation)

Adding Disks with HP-UX

Adding Disks with HP-UX

Once the disk has been physically installed, the system should detect the device that a new device is available on the SCSI bus. After the power to the system has been restored, press the Esc key to get to the Boot PROM prompt where Boot_Admin> is offered. At the Boot_Admin> prompt, type search:

Boot_Admin> search [return]

This will return the list of scsi devices:

Device Path             Device Type
----------------        -----------------
scsi.6.0                HP C2247
scsi.2.0                TOSHIBA CD-ROM XM-340ITA

After verifying the disk drive is detected by the Boot PROM, continue the initialization sequence by entering boot. When the boot process has completed, ensure that the drive was detected by the kernel by reviewing the kernel messages in /var/adm/syslog/syslog.log. They should look somewhat similar to the following:
Mar 19 15:21:47 bud vmunix: 2/0/1.0 tgt
Mar 19 15:21:47 bud vmunix: 2/0/1.0.0 sdisk
Mar 19 15:21:47 bud vmunix: 2/0/1.1 tgt
Mar 19 15:21:47 bud vmunix: 2/0/1.1.0 sdisk
Mar 19 15:21:47 bud vmunix: 2/0/1.6 tgt
Mar 19 15:21:47 bud vmunix: 2/0/1.6.0 sdisk
This system located three disk drives on controller 0 located at the controller device address 1 and at SCSI IDs 0, 1 and 6. Additionally, the command /usr/sbin/ioscan may be run to show further information about the disk drives detected.
# /usr/sbin/ioscan -C disk
H/W Path   Class                Description
===========================================
2/0/1.0.0               disk    HP      C2247
2/0/1.1.0               disk    HP      C2247
2/0/1.6.0               disk    SEAGATE ST31200N
If the disk device is not found, determine if the device driver needed for the disk and interface are available. If any necessary device driver is absent from the kernel, the kernel will need to be rebuilt incorperating the new driver.
Here is a brief overview of the steps to rebuild a kernel.
  • Go to the build directory and from there, run the script, system_prep. This script will extract the system file from the current kernel.
    # cd /stand/build                          
    # /usr/lbin/sysadm/system_prep -v -s system
    
  • Modify the /stand/build/system file, adding the driver. Rebuild the kernel with the command:
    # /usr/sbin/mk_kernel -s system 
    
    The new kernel /stand/build/vmunix_test is created
  • Save the copy of the old kernel and move the new one in its place and reboot the system.
    # mv /stand/system /stand/system.old
    # mv /stand/vmunix /stand/vmunix.old
    # mv /stand/build/system /stand/system     
    # mv /stand/build/vmunix_test /stand/vmunix
    

Device nodes

During HP-UX boot-up, /sbin/insf is executed to create the character and block device special /dev files that allow communication with the disk. HP-UX uses a somewhat standard SVR4 device file naming system. For each disk device, the following special files are created:
  • Block device file:
    /dev/dsk/ccardttargetddevice
  • Charater device file:
    /dev/rdsk/ccardttargetddevice
Where card is the (SCSI) controller number, target is the SCSI ID number, and device is the logical unit number, or lun. The lun is 0 for the majority of devices. An example for a disk at controller 0, target 6, lun 0, is /dev/dsk/c0t6d0.
A disk is usually divided into file systems, areas that can hold files, or raw data areas such as swap. File systems are created in disk partitions or logical volumes. To view the size of the drive to be configured use the command, diskinfo.
# /usr/sbin/diskinfo /dev/rdsk/c0t6d0
SCSI describe of /dev/rdsk/c0t6d0:
             vendor: HP      
         product id: C3324A          
               type: direct access
               size: 1025730 Kbytes
   bytes per sector: 512
Though HP-UX does support standard (BSD) style filesystems, it is recommended that the logical volume manager (LVM) be used because of the following reasons.
  • They offer greater flexiblity for disk partitioning.
  • The size of logical volumes can be modified according to need.
  • Logical volumes can span disks.
More recommended reading about LVM is availbable in the Logical Volume White paper.

Creating traditional filesystems

To initialize the disk and check the disk for bad blocks the command, mediainit can be used. This is usually not necessary with HP-UX 10.x.
# mediainit /dev/rdsk/c0t1d0
The newfs command has been updated, from the 9.x version, to prompt for disk specific information, thereby overriding the information directives found in the, now obsolete, /etc/disktab file.
# newfs -F hfs /dev/rdsk/c0t5d0
mkfs (hfs): Warning - 121 sector(s) in the last cylinder are not allocated.
mkfs (hfs): /dev/rdsk/c0t5d0 - 990071 sectors in 2947 cylinders of 12 tracks, 28 sectors
1013.8Mb in 185 cyl groups (16 c/g, 5.51Mb/g, 832 i/g)
Super block backups (for fsck -b) at:
    16,   5424,  10832,  16240,  21648,  27056,  .....

Creating logical volume filesystems

The system administration tool, sam, can be used to perform most of the tasks involved with adding a new disk. Optionally, the commands to activate this disk can be given from the command line, which is demonstrated here. The physical disk drive should be added to either and an existing volume group or to a newly created volume group. These tasks are done with the commands/usr/sbin/vgextend and /usr/sbin/vgcreate respectively.
In either case pvcreate needs to run to initializes the device (a raw disk device) for use as a physical volume in a volume group.
# pvcreate /dev/rdsk/c0t5d0
Physical volume "/dev/rdsk/c0t5d0" has been successfully created.
Then to create a new volume group, the directory /dev/vg01 with the character special file called group, execute vgcreate.
#mkdir /dev/vg01
#mknod /dev/vg01/group c 64 0x010000
# vgcreate /dev/vg01 /dev/dsk/c0t5d0
Volume group "/dev/vg01" has been successfully created.
Volume Group configuration for /dev/vg01 has been saved in /etc/lvmconf/vg01.conf
Note that the last argument to the mknod command must be unique for each volume group that exists on the system.
Otherwise, to add or extend an existing volume group, executed vgextend.
# vgextend /dev/vg00 /dev/dsk/c0t5d0
Volume group "/dev/vg00" has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
Utililizing the increased disk space in the volume group, create a single or multiple logical volumes that will contain filesystems. In this example a single logical volume and file system of 1 gigabyte is created.
# lvcreate -L 1000 /dev/vg00      
Logical volume "/dev/vg00/lvol9" has been successfully created with
character device "/dev/vg00/rlvol9".
Logical volume "/dev/vg00/lvol9" has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf

# newfs -F hfs /dev/vg00/rlvol9
mkfs (hfs): Warning - 608 sector(s) in the last cylinder are not allocated.
mkfs (hfs): /dev/vg00/rlvol9 - 1024000 sectors in 1642 cylinders of 16 tracks, 39 sectors
1048.6Mb in 103 cyl groups (16 c/g, 10.22Mb/g, 1600 i/g)
Super block backups (for fsck -b) at:
    16,  10040,  20064,  30088,  40112,  ....

Mounting the new filesystem

Add this filesystem to the ones that are automatically mounted by system initialization, by updating the file /etc/fstab with the following entry. It specifies the device and the mount point for the filesystem.
/dev/vg00/lvol9 /usr/local hfs defaults 0 2

Mount the filesystem using the command /usr/sbin/mount -a. Check the mount table to ensure the partition was mounted and check the filesystem size with the /usr/bin/bdf command.
# mount -a
# mount
/ on /dev/vg00/lvol1 defaults on Thu May 23 08:10:01 1996
/var on /dev/vg00/lvol8 defaults on Thu May 23 08:10:14 1996
/usr on /dev/vg00/lvol7 defaults on Thu May 23 08:10:15 1996
/tmp on /dev/vg00/lvol6 defaults on Thu May 23 08:10:15 1996
/opt on /dev/vg00/lvol5 defaults on Thu May 23 08:10:15 1996
/home on /dev/vg00/lvol4 defaults on Thu May 23 08:10:15 1996
/usr/local on /dev/vg00/lvol9 defaults on Thu May 23 08:37:17 1996
# bdf /usr/local
Filesystem          kbytes    used   avail %used Mounted on
/dev/vg00/lvol9    1001729       9  901547    0% /usr/local

Thursday, November 6, 2014

常見的裝置與其在Linux當中的檔名

常見的裝置與其在Linux當中的檔名


裝置裝置在Linux內的檔名
IDE硬碟機/dev/hd[a-d]
SCSI/SATA/USB硬碟機/dev/sd[a-p]
USB快閃碟/dev/sd[a-p](與SATA相同)
軟碟機/dev/fd[0-1]
印表機25針: /dev/lp[0-2]
USB: /dev/usb/lp[0-15]
滑鼠USB: /dev/usb/mouse[0-15]
PS2: /dev/psaux
當前CDROM/DVDROM/dev/cdrom
當前的滑鼠/dev/mouse
磁帶機IDE: /dev/ht0
SCSI: /dev/st0

Wednesday, October 29, 2014

OVM server after upgraded, virtual machine ASM diskgroup couldn't mount


OVM server after upgraded, virtual machine ASM diskgroup couldn't mpuntd


Knowledge Review completed



Hello Bin-Bin,

It seem to me that the reason why ALPHAPROD_DATA can not be mounted is due to the following error.

--
alert_+ASM.log Sun Jun 29 15:45:30 2014 ORA-15085: ASM disk "" has inconsistent sector size.
alert_+ASM.log Sun Jun 29 16:12:00 2014 ORA-15085: ASM disk "" has inconsistent sector size.
alert_+ASM.log Sun Jun 29 16:19:28 2014 ORA-15085: ASM disk "" has inconsistent sector size.
--

This indicates that the sector size for the underlying device mapped to /dev/oracleasm/disks/MFGBLOB_DATA has changed to 4096 which may have been 512 byte before.

Action Plan
------------------
1. Can you try to mount ALPHAPROD_DATA in the following way ?
$ sqlplus / as sysasm
SQL> alter system set asm_diskstring='/dev/oracleasm/disks/*' ;
SQL> alter diskgroup ALPHAPROD_DATA mount ;

<<< If ALPHAPROD_DATA can be mounted in this way, you can startup the databases running on this server.

2. But you will need to find out why the secor size has been changed for the underlying device mapped to /dev/oracleasm/disks/MFGBLOB_DATA.
Show us the following information

$ cat /proc/partitions
$ ls -l /sys/block/*

Regards,
Eun Heo 

Oracle Support- 3+ months ago[ODM Proposed Solution Justif]
Hello Bin-Bin,

It seem to me that the reason why ALPHAPROD_DATA can not be mounted is due to the following error.

--
alert_+ASM.log Sun Jun 29 15:45:30 2014 ORA-15085: ASM disk "" has inconsistent sector size.
alert_+ASM.log Sun Jun 29 16:12:00 2014 ORA-15085: ASM disk "" has inconsistent sector size.
alert_+ASM.log Sun Jun 29 16:19:28 2014 ORA-15085: ASM disk "" has inconsistent sector size.
--

This indicates that the sector size for the underlying device mapped to /dev/oracleasm/disks/MFGBLOB_DATA has changed to 4096 which may have been 512 byte before.

Action Plan
------------------
1. Can you try to mount ALPHAPROD_DATA in the following way ?
$ sqlplus / as sysasm
SQL> alter system set asm_diskstring='/dev/oracleasm/disks/*' ;
SQL> alter diskgroup ALPHAPROD_DATA mount ;

<<< If ALPHAPROD_DATA can be mounted in this way, you can startup the databases running on this server.

2. But you will need to find out why the secor size has been changed for the underlying device mapped to /dev/oracleasm/disks/MFGBLOB_DATA.
Show us the following information

$ cat /proc/partitions
$ ls -l /sys/block/*

Regards,
Eun Heo 

BLIU@KEIHIN-NA.COM- 3+ months ago[Update from Customer]
Everything is good. I am going to close this SR.
Thank you for all your help.

Bin-Bin

Oracle Support- 3+ months ago[Information]
lowering to SEV2 per customer update and waiting for update 

Oracle Support- 4+ months ago[Information]
Hi Bin-Bin,

Sure.
Do you want me to lower this SR to a SEV2?
Then you can update on Monday, is that ok?

Thanks
George

Working Hours: Mon-Fri
09:00am to 5:30 PM Mountain Time Zone 

BLIU@KEIHIN-NA.COM- 4+ months ago[Update from Customer]
i am going to lower severity level. we are shutdown until next Monday(7/7/2014).
I'd like to keep this SR until next Monday. They are production system.
Can I do that?

Bin-Bin

Oracle Support- 4+ months ago[Information]
Hi Bin-Bin,

It appears so.
How would you like to proceed with this SR?

Thanks
George

Working Hours: Mon-Fri
09:00am to 5:30 PM Mountain Time Zone 

BLIU@KEIHIN-NA.COM- 4+ months ago[Update from Customer]
i can mount diskgroup, and no error. so i am good, right?

Thanks!

Bin-Bin

Oracle Support- 4+ months ago[Information]
Hi Bin-Bin,

Are you able to mount the diskgroups?
Any errors in the ASM alert.log?
If not, then it would seem ok.

Thanks
George

Working Hours: Mon-Fri
09:00am to 5:30 PM Mountain Time Zone 

Oracle Support- 4+ months ago[Information]
Hi Bin-Bin,

I have been assigned this SR and I am currently reviewing.
I will provide an update as soon as possible.

Thanks
George

Working Hours: Mon-Fri
09:00am to 5:30 PM Mountain Time Zone 

BLIU@KEIHIN-NA.COM- 4+ months ago[Update from Customer]
i upgraded the second without problem. i set ORACLEASM_USE_LOGICAL_BLOCK_SIZE to true.

the first server which i had problem yesterday, i changed ORACLEASM_USE_LOGICAL_BLOCK_SIZE to true.
but i cannot change asm_diskstring to MFGBLOB_DATA. sm_diskstring is still '/dev/oracleasm/disks/* '.
do you think is it ok? i don't have any problem after rebooted.

Bin-Bin

Oracle Support- 4+ months ago[Information]
Hello Bin-Bin,

Changing ORACLEASM_USE_LOGICAL_BLOCK_SIZE to true before reboot won't do any harm in your env, so you can change it before system reboot ( or upgrade ).

There is no way of assinging the sr to a particular analyst on creating a sr as assigning procedure is all automatic.

I will keep this sr in my queue as Sev1 for the time being. If you have a similar issue for another server and update this sr , the sr will get transferred to the next available analyst if I am not working.

This way, you can get a help from other analysts .

Thanks for your kind words, anyway.


Regards,
Eun Heo 

BLIU@KEIHIN-NA.COM- 4+ months ago[Update from Customer]
if i have issue in the future, can i assign my SR to you? if it is not severity 1, can i do that?
if i can, how to do it?

Bin-Bin

BLIU@KEIHIN-NA.COM- 4+ months ago[Update from Customer]
can i change "ORACLEASM_USE_LOGICAL_BLOCK_SIZE" to true before i reboot, even i din't know i will have problem or not?

Bin-Bin

Oracle Support- 4+ months ago[Information]
Hello Bin-Bin,

I am actually based in Sydney - Australia. Please find my working hours below and start working 2PM in PST timezone.
Working Hours: Monday – Friday 07:00-15:30 AEST / 21:00-05:30 GMT / 14:00-22:30 PST

Please check ASM alert.log for the following error if you see the same issue.
- alert_+ASM.log Sun Jun 29 15:45:30 2014 ORA-15085: ASM disk "" has inconsistent sector size.

If this is the case for another server, you can do one of the solution provided.
1] Change asm_diskstring to /dev/oracleasm/disks/*

OR
2] Reboot the server after changing the following parameter in /etc/sysconfig/oracleasm file.
ORACLEASM_USE_LOGICAL_BLOCK_SIZE=true


Regards,
Eun 

BLIU@KEIHIN-NA.COM- 4+ months ago[Update from Customer]
i am in EST time. what's yours?

BLIU@KEIHIN-NA.COM- 4+ months ago[Update from Customer]
that is great, so this server is ready.
i am going to upgrade another server tomorrow. i am going to do the same work like this one tomorrow.
if you can keep it open until i done the upgrade tomorrow.
it will be the best. my time is 10:23PM, how about yours?
you are very helpful, if it is possible, i want you be my contact.

Thanks!

Bin-Bin

Oracle Support- 4+ months ago[Information]
Hello Bin-Bin,

Our previous posting seemed to be crossing.

Yes, "/dev/oracleasm/disks/*" value is ok for your env as ASMlib is not mandatory for using ASM.

If you really want to go back to "ORCL:MFGBLOB_DATA" for asm_diskstring, please implement the solution described in note 1500460.1 , i.e ORACLEASM_USE_LOGICAL_BLOCK_SIZE=true and restart everything ( reboot is better ).

Please advise if you need further clarification on this issue.

Regards,
Eun Heo 

Oracle Support- 4+ months ago[Information]
Hello Bin-Bin,

Thanks for all the information.

I don't see any issue for your current env.

With the current configuration - i.e asm_diskstring=/dev/oracleasm/disks/*, you don't need to change ORACLEASM_USE_LOGICAL_BLOCK_SIZE to true.

I think your current issue is understood by Oracle and I have provided reasonable reason for that.

I wonder if you still need this SR to be worked around the clock 24x7 ? If not, I can hold this SR in my queue, to be worked as a Sev1 non-24x7 during my normal working hours

Regards
Eun Heo
Global Product Support
Working Hours: Monday – Friday 07:00-15:30 AEST / 21:00-05:30 GMT / 14:00-22:30 PST 

BLIU@KEIHIN-NA.COM- 4+ months ago[Update from Customer]
asm_diskstring was "ORCL:MFGBLOB_DATA".
it is "/dev/oracleasm/disks/*" right now.
is it ok?

Bin-Bin

BLIU@KEIHIN-NA.COM- 4+ months ago[Update from Customer]
so you think i should change ORACLEASM_USE_LOGICAL_BLOCK_SIZE from false to true?
if i don't change it, will cause any problem?

Bin-Bin

BLIU@KEIHIN-NA.COM- 4+ months ago[Update from Customer]
[oracle@alpha ~]$ asmcmd lsdg
State Type Rebal Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name
MOUNTED EXTERN N 512 4096 1048576 953673 167982 0 167982 0 N ALPHAPROD_DATA/
[oracle@alpha ~]$

SQL> show parameter asm

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
asm_diskgroups string ALPHAPROD_DATA
asm_diskstring string /dev/oracleasm/disks/*
asm_power_limit integer 1
asm_preferred_read_failure_groups string
SQL>

[root@alpha ~]# cd /sys/devices/vbd-51744/block/xvdc/queue
[root@alpha queue]# cat *
1
0
0
0
0
512
cat: iosched: Is a directory
1
512
128
0
128
32
4096
4096
0
128
0
4096
128
0
1
0
noop [deadline] cfq
0
[root@alpha queue]#

Oracle Support- 4+ months ago[Information]
Hello Bin-Bin,

If you could startup the running databases on this server in conjunction with ASM, you will be fine.

At the moment, ASMlib has been bypassed with asm_diskstring=/dev/oracleasm/disks/*' if this values is still set in ASM side.

Actually, the following parameter in /etc/sysconfig/oracleasm should be set to "true" to use logical sector size ( 512 ) instead of physical ( 4096 )
--
ORACLEASM_USE_LOGICAL_BLOCK_SIZE=true
--

Can you show me the following output ?

1. asmcmd lsdg
2. Connect to ASM
SQL> show parameter asm

3. $ cd /sys/devices/vbd-51744/block/xvdc/queue
$ cat *

Regards,
Eun Heo 

BLIU@KEIHIN-NA.COM- 4+ months ago[Update from Customer]
You know what, after i mounted ALPHAPROD_DATA, i rebooted server, and there is no problem at all.
and, my oracleasm-support is the one on document. the ORACLEASM_USE_LOGICAL_BLOCK_SIZE=false is default.
do you think i am fine now?

Bin-Bin

[root@alpha ~]# yum list installed | grep oracleasm-support
oracleasm-support.x86_64 2.1.8-1.el6 @public_ol6_latest
[root@alpha ~]#


# ORACLEASM_USE_LOGICAL_BLOCK_SIZE: 'true' means use the logical block size
# reported by the underlying disk instead of the physical. The default
# is 'false'
ORACLEASM_USE_LOGICAL_BLOCK_SIZE=false 

BLIU@KEIHIN-NA.COM- 4+ months ago[Update from Customer]
there is no SAN device on this machine.

BLIU@KEIHIN-NA.COM- 4+ months ago[Update from Customer]
please keep this SR open until i upgrade ASMlib.

thanks!

Bin-Bin

Oracle Support- 4+ months ago[Information]
Hello Bin-Bin,

The main reason for the current issue is because the sector size for the underlying device mapped to MFGBLOB_DATA has been changed from 512 to 4096 on OS level as part of VM upgrade.

From kfed_DH.out, ALPHAPROD_DATA was created with sector size - 512 byte but I saw secor size - 4096 from the previous asm_info_html after VM upgrade.

1] kfed_DH.out
--------------------
/dev/oracleasm/disks/MFGBLOB_DATA
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: 2147483648 ; 0x008: disk=0
kfbh.check: 3262415636 ; 0x00c: 0xc2748314
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:ORCLDISKMFGBLOB_DATA ; 0x000: length=20
kfdhdb.driver.reserved[0]: 1111967309 ; 0x008: 0x4247464d
kfdhdb.driver.reserved[1]: 1598181196 ; 0x00c: 0x5f424f4c
kfdhdb.driver.reserved[2]: 1096040772 ; 0x010: 0x41544144
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: 0 ; 0x024: 0x0000
kfdhdb.grptyp: 1 ; 0x026: KFDGTP_EXTERNAL
kfdhdb.hdrsts: 3 ; 0x027: KFDHDR_MEMBER
kfdhdb.dskname: MFGBLOB_DATA ; 0x028: length=12 <<<<<<<<<<<--------------- Disk name
kfdhdb.grpname: ALPHAPROD_DATA ; 0x048: length=14 <<<<<<<<<<<<-------------- Diskgroup name
kfdhdb.fgname: MFGBLOB_DATA ; 0x068: length=12
..
kfdhdb.secsize: 512 ; 0x0b8: 0x0200 <<<<<<<<<<<<-------------- Sector size
kfdhdb.blksize: 4096 ; 0x0ba: 0x1000
..
--------------------------------------------------------------------------------------------------------------------------------

You have 2 choices here.

1. Use asm_diskstring=/dev/oracleasm/disks/* in which case ASM will pick up logical sector size ( 512 ) instead of physical size ( 4096 ).

2. Or please download the latest ASMlib and configure ASMlib to use logical sector size described in the following note .
- Alert: After SAN Firmware Upgrade, ASM Diskgroups ( Using ASMLIB) Cannot Be Mounted Due To ORA-15085: ASM disk "" has inconsistent sector size. ( Doc ID 1500460.1 )


I think your current issue is understood and I have provided reasonable reason and solution for that.

I wonder if you still need this SR to be worked around the clock 24x7 ? If not, I can hold this SR in my queue, to be worked as a Sev1 non-24x7 during my normal working hours

Regards
Eun Heo
Global Product Support
Working Hours: Monday – Friday 07:00-15:30 AEST / 21:00-05:30 GMT / 14:00-22:30 PST 

BLIU@KEIHIN-NA.COM- 4+ months ago[Update from Customer]
[root@alpha sys]# cd block
[root@alpha block]# ls -l
total 0
lrwxrwxrwx 1 root root 0 Jun 29 18:30 dm-0 -> ../devices/virtual/block/dm-0
lrwxrwxrwx 1 root root 0 Jun 29 18:30 dm-1 -> ../devices/virtual/block/dm-1
lrwxrwxrwx 1 root root 0 Jun 29 14:03 dm-2 -> ../devices/virtual/block/dm-2
lrwxrwxrwx 1 root root 0 Jun 29 14:03 dm-3 -> ../devices/virtual/block/dm-3
lrwxrwxrwx 1 root root 0 Jun 29 14:03 dm-4 -> ../devices/virtual/block/dm-4
lrwxrwxrwx 1 root root 0 Jun 29 14:03 dm-5 -> ../devices/virtual/block/dm-5
lrwxrwxrwx 1 root root 0 Jun 29 14:03 dm-6 -> ../devices/virtual/block/dm-6
lrwxrwxrwx 1 root root 0 Jun 29 14:03 loop0 -> ../devices/virtual/block/loop0
lrwxrwxrwx 1 root root 0 Jun 29 14:03 loop1 -> ../devices/virtual/block/loop1
lrwxrwxrwx 1 root root 0 Jun 29 14:03 loop2 -> ../devices/virtual/block/loop2
lrwxrwxrwx 1 root root 0 Jun 29 14:03 loop3 -> ../devices/virtual/block/loop3
lrwxrwxrwx 1 root root 0 Jun 29 14:03 loop4 -> ../devices/virtual/block/loop4
lrwxrwxrwx 1 root root 0 Jun 29 14:03 loop5 -> ../devices/virtual/block/loop5
lrwxrwxrwx 1 root root 0 Jun 29 14:03 loop6 -> ../devices/virtual/block/loop6
lrwxrwxrwx 1 root root 0 Jun 29 14:03 loop7 -> ../devices/virtual/block/loop7
lrwxrwxrwx 1 root root 0 Jun 29 18:30 ram0 -> ../devices/virtual/block/ram0
lrwxrwxrwx 1 root root 0 Jun 29 18:30 ram1 -> ../devices/virtual/block/ram1
lrwxrwxrwx 1 root root 0 Jun 29 18:30 ram10 -> ../devices/virtual/block/ram10
lrwxrwxrwx 1 root root 0 Jun 29 18:30 ram11 -> ../devices/virtual/block/ram11
lrwxrwxrwx 1 root root 0 Jun 29 18:30 ram12 -> ../devices/virtual/block/ram12
lrwxrwxrwx 1 root root 0 Jun 29 18:30 ram13 -> ../devices/virtual/block/ram13
lrwxrwxrwx 1 root root 0 Jun 29 18:30 ram14 -> ../devices/virtual/block/ram14
lrwxrwxrwx 1 root root 0 Jun 29 18:30 ram15 -> ../devices/virtual/block/ram15
lrwxrwxrwx 1 root root 0 Jun 29 18:30 ram2 -> ../devices/virtual/block/ram2
lrwxrwxrwx 1 root root 0 Jun 29 18:30 ram3 -> ../devices/virtual/block/ram3
lrwxrwxrwx 1 root root 0 Jun 29 18:30 ram4 -> ../devices/virtual/block/ram4
lrwxrwxrwx 1 root root 0 Jun 29 18:30 ram5 -> ../devices/virtual/block/ram5
lrwxrwxrwx 1 root root 0 Jun 29 18:30 ram6 -> ../devices/virtual/block/ram6
lrwxrwxrwx 1 root root 0 Jun 29 18:30 ram7 -> ../devices/virtual/block/ram7
lrwxrwxrwx 1 root root 0 Jun 29 18:30 ram8 -> ../devices/virtual/block/ram8
lrwxrwxrwx 1 root root 0 Jun 29 18:30 ram9 -> ../devices/virtual/block/ram9
lrwxrwxrwx 1 root root 0 Jun 29 18:30 xvda -> ../devices/vbd-51712/block/xvda
lrwxrwxrwx 1 root root 0 Jun 29 18:30 xvdc -> ../devices/vbd-51744/block/xvdc
lrwxrwxrwx 1 root root 0 Jun 29 18:30 xvdd -> ../devices/vbd-51760/block/xvdd
lrwxrwxrwx 1 root root 0 Jun 29 14:03 zram0 -> ../devices/virtual/block/zram0
[root@alpha block]# cd ../devices/vbd-51744/block/xvdc
[root@alpha xvdc]# ls -l
total 0
-r--r--r-- 1 root root 4096 Jun 29 18:45 alignment_offset
lrwxrwxrwx 1 root root 0 Jun 29 18:45 bdi -> ../../../virtual/bdi/202:32
-r--r--r-- 1 root root 4096 Jun 29 18:45 capability
-r--r--r-- 1 root root 4096 Jun 29 18:45 dev
lrwxrwxrwx 1 root root 0 Jun 29 18:45 device -> ../../../vbd-51744
-r--r--r-- 1 root root 4096 Jun 29 18:45 discard_alignment
-r--r--r-- 1 root root 4096 Jun 29 18:45 ext_range
drwxr-xr-x 2 root root 0 Jun 29 18:45 holders
-r--r--r-- 1 root root 4096 Jun 29 18:45 inflight
drwxr-xr-x 2 root root 0 Jun 29 18:45 power
drwxr-xr-x 3 root root 0 Jun 29 14:03 queue
-r--r--r-- 1 root root 4096 Jun 29 18:45 range
-r--r--r-- 1 root root 4096 Jun 29 18:45 removable
-r--r--r-- 1 root root 4096 Jun 29 18:45 ro
-r--r--r-- 1 root root 4096 Jun 29 18:45 size
drwxr-xr-x 2 root root 0 Jun 29 18:45 slaves
-r--r--r-- 1 root root 4096 Jun 29 18:45 stat
lrwxrwxrwx 1 root root 0 Jun 29 18:45 subsystem -> ../../../../class/block
drwxr-xr-x 2 root root 0 Jun 29 18:45 trace
-rw-r--r-- 1 root root 4096 Jun 29 18:45 uevent
drwxr-xr-x 5 root root 0 Jun 29 16:34 xvdc1
[root@alpha xvdc]# pwd
/sys/devices/vbd-51744/block/xvdc
[root@alpha xvdc]# cat *
0
cat: bdi: Is a directory
10
202:32
cat: device: Is a director

Oracle Support- 4+ months ago[Information]
Hello Bin-Bin,

I don't see any trace of mfgblob_data diskgroup from the uploaded ASM alert.log which traced back to 25-Dec-2013 as below.
Maybe mfgblob_data diskgroup has never existed on the server, even though the disk name is MFGBLOB_DATA.
------------
alert_+ASM.log Wed Dec 25 09:55:36 2013 SUCCESS: diskgroup ALPHAPROD_DATA was mounted
alert_+ASM.log Wed Dec 25 09:55:48 2013 SUCCESS: diskgroup ALPHAPROD_DATA was dismounted
alert_+ASM.log Wed Dec 25 09:55:51 2013 SUCCESS: diskgroup ALPHAPROD_DATA was mounted
alert_+ASM.log Sat Dec 28 09:59:19 2013 SUCCESS: diskgroup ALPHAPROD_DATA was dismounted
alert_+ASM.log Sat Dec 28 11:29:26 2013 SUCCESS: diskgroup ALPHAPROD_DATA was mounted
alert_+ASM.log Sat Dec 28 11:33:20 2013 SUCCESS: diskgroup ALPHAPROD_DATA was dismounted
alert_+ASM.log Sat Dec 28 11:35:24 2013 SUCCESS: diskgroup ALPHAPROD_DATA was mounted
alert_+ASM.log Sun Feb 09 09:15:10 2014 SUCCESS: diskgroup ALPHAPROD_DATA was dismounted
alert_+ASM.log Sun Feb 09 10:22:12 2014 SUCCESS: diskgroup ALPHAPROD_DATA was mounted
alert_+ASM.log Mon Jun 16 16:47:30 2014 SUCCESS: diskgroup ALPHAPROD_DATA was dismounted
alert_+ASM.log Mon Jun 16 16:54:54 2014 SUCCESS: diskgroup ALPHAPROD_DATA was mounted
alert_+ASM.log Sun Jun 29 09:06:42 2014 SUCCESS: diskgroup ALPHAPROD_DATA was dismounted
----------------


I wonder if you could startup all databases running on the server after mounting ALPHAPROD_DATA diskgroup.

Can you also upload the following information ?

1. /dev/oracleasm/disks/MFGBLOB_DATA is mapped to /dev/xvdc.

$ cd /sys/block/xvdc
$ ls -l
$ cat *

2. Another fresh asm_info.html after mounting ALPHAPROD_DATA

Provide the following sql output (asm_info.html) after connecting to ASM instance.
==================================================================
spool asm_info.html
set pagesize 1000
set linesize 220
set feedback off
col bytes format 999,999,999,999
col space format 999,999,999,999
col gn format 999
col name format a25
col au format 99999999
col state format a12
col type format a12
col total_mb format 999,999,999
col free_mb format 999,999,999
col od format 999
col compatibility format a12
col dn format 999
col mount_status format a12
col header_status format a12
col mode_status format a12
col mode format a12
col failgroup format a25
col label format a20
col path format a50
col path1 format a40
col path2 format a40
col path3 format a40
col bytes_read format 999,999,999,999,999
col bytes_written format 999,999,999,999,999
col cold_bytes_read format 999,999,999,999,999
col cold_bytes_written format 999,999,999,999,999

alter session set nls_date_format='DD-MON-YYYY HH24:MI:SS' ;

select to_char(sysdate, 'DD-MON-YYYY HH24:MI:SS' ) current_time from dual;
select group_number gn, name, allocation_unit_size au, state, type, total_mb, free_mb, offline_disks od, compatibility from v$asm_diskgroup;
select group_number gn,disk_number dn, mount_status, header_status,mode_status,state, total_mb, free_mb,name, failgroup, label, path from v$asm_disk order by group_number, disk_number;
select inst_id, power_kfgmg, sofar_kfgmg, work_kfgmg, rate_kfgmg, time_kfgmg, file_kfgmg from x$kfgmg;

break on g_n skip 1
break on failgroup skip 1
compute sum of t_mb f_mb on failgroup
compute count of failgroup on failgroup

select g.group_number g_n,g.disk_number d_n,g.name , g.path , g.total_mb t_mb,g.free_mb f_mb,g.failgroup from v$asm_disk g order by g_n, failgroup, d_n;
select inst_id, power_kfgmg, sofar_kfgmg, work_kfgmg, rate_kfgmg, time_kfgmg, file_kfgmg from x$kfgmg;

SET MARKUP HTML ON
set echo on


select 'THIS ASM REPORT WAS GENERATED AT: ==)> ' , sysdate " " from dual;


select 'HOSTNAME ASSOCIATED WITH THIS ASM INSTANCE: ==)> ' , MACHINE " " from v$session where program like '%SMON%';

select * from v$asm_diskgroup;

SELECT * FROM V$ASM_DISK ORDER BY GROUP_NUMBER,DISK_NUMBER;
select inst_id, power_kfgmg, sofar_kfgmg, work_kfgmg, rate_kfgmg, time_kfgmg, file_kfgmg from x$kfgmg;
SELECT * FROM V$ASM_CLIENT;

select * from V$ASM_ATTRIBUTE;

select * from v$asm_operation;

select * from v$version;

show parameter

show sga

spool off

exit

==================================================================



Regards,
Eun Heo 

BLIU@KEIHIN-NA.COM- 4+ months ago[Update from Customer]
Upload to TDS successful for the file kfed_FS.out.

BLIU@KEIHIN-NA.COM- 4+ months ago[Update from Customer]
Upload to TDS successful for the file kfed_DH.out.

BLIU@KEIHIN-NA.COM- 4+ months ago[Update from Customer]
Upload to TDS successful for the file kfed_BK.out.

BLIU@KEIHIN-NA.COM- 4+ months ago[Update from Customer]
Upload to TDS successful for the file kfed_4MBK.out.

BLIU@KEIHIN-NA.COM- 4+ months ago[Update from Customer]
are you saying the diskgroup should be alphaprod_data, not mfgblob_data?

[oracle@alpha ~]$ cat /proc/partitions
major minor #blocks name

202 0 492830720 xvda
202 1 512000 xvda1
202 2 492317696 xvda2
202 32 1169304832 xvdc
202 33 976561152 xvdc1
202 48 584960000 xvdd
202 49 581053440 xvdd1
252 0 52428800 dm-0
252 1 27885568 dm-1
252 2 883859456 dm-2
252 3 26214400 dm-3
252 4 10485760 dm-4
252 5 41943040 dm-5
252 6 26214400 dm-6
[oracle@alpha ~]$ ls -l /sys/block/*
lrwxrwxrwx 1 root root 0 Jun 29 14:03 /sys/block/dm-0 -> ../devices/virtual/block/dm-0
lrwxrwxrwx 1 root root 0 Jun 29 14:03 /sys/block/dm-1 -> ../devices/virtual/block/dm-1
lrwxrwxrwx 1 root root 0 Jun 29 14:03 /sys/block/dm-2 -> ../devices/virtual/block/dm-2
lrwxrwxrwx 1 root root 0 Jun 29 14:03 /sys/block/dm-3 -> ../devices/virtual/block/dm-3
lrwxrwxrwx 1 root root 0 Jun 29 14:03 /sys/block/dm-4 -> ../devices/virtual/block/dm-4
lrwxrwxrwx 1 root root 0 Jun 29 14:03 /sys/block/dm-5 -> ../devices/virtual/block/dm-5
lrwxrwxrwx 1 root root 0 Jun 29 14:03 /sys/block/dm-6 -> ../devices/virtual/block/dm-6
lrwxrwxrwx 1 root root 0 Jun 29 14:03 /sys/block/loop0 -> ../devices/virtual/block/loop0
lrwxrwxrwx 1 root root 0 Jun 29 14:03 /sys/block/loop1 -> ../devices/virtual/block/loop1
lrwxrwxrwx 1 root root 0 Jun 29 14:03 /sys/block/loop2 -> ../devices/virtual/block/loop2
lrwxrwxrwx 1 root root 0 Jun 29 14:03 /sys/block/loop3 -> ../devices/virtual/block/loop3
lrwxrwxrwx 1 root root 0 Jun 29 14:03 /sys/block/loop4 -> ../devices/virtual/block/loop4
lrwxrwxrwx 1 root root 0 Jun 29 14:03 /sys/block/loop5 -> ../devices/virtual/block/loop5
lrwxrwxrwx 1 root root 0 Jun 29 14:03 /sys/block/loop6 -> ../devices/virtual/block/loop6
lrwxrwxrwx 1 root root 0 Jun 29 14:03 /sys/block/loop7 -> ../devices/virtual/block/loop7
lrwxrwxrwx 1 root root 0 Jun 29 14:03 /sys/block/ram0 -> ../devices/virtual/block/ram0
lrwxrwxrwx 1 root root 0 Jun 29 14:03 /sys/block/ram1 -> ../devices/virtual/block/ram1
lrwxrwxrwx 1 root root 0 Jun 29 14:03 /sys/block/ram10 -> ../devices/virtual/block/ram10
lrwxrwxrwx 1 root root 0 Jun 29 14:03 /sys/block/ram11 -> ../devices/virtual/block/ram11
lrwxrwxrwx 1 root root 0 Jun 29 14:03 /sys/block/ram12 -> ../devices/virtual/block/ram12
lrwxrwxrwx 1 root root 0 Jun 29 14:03 /sys/block/ram13 -> ../devices/virtual/block/ram13
lrwxrwxrwx 1 root root 0 Jun 29 14:03 /sys/block/ram14 -> ../devices/virtual/block/ram14
lrwxrwxrwx 1 root root 0 Jun 29 14:03 /sys/block/ram15 -> ../devices/virtual/block/ram15
lrwxrwxrwx 1 root root 0 Jun 29 14:03 /sys/block/ram2 -> ../devices/virtual/block/ram2
lrwxrwxrwx 1 root root 0 Jun 29 14:03 /sys/block/ram3 -> ../devices/virtual/block/ram3
lrwxrwxrwx 1 root root 0 Jun 29 14:03 /sys/block/ram4 -> ../devices/virtual/block/ram4
lrwxrwxrwx 1 root root 0 Jun 29 14:03 /sys/block/ram5 -> ../devices/virtual/block/ram5
lrwxrwxrwx 1 root root 0 Jun 29 14:03 /sys/block/ram6 -> ../devices/virtual/block/ram6
lrwxrwxrwx 1 root root 0 Jun 29 14:03 /sys/block/ram7 -> ../devices/virtual/block/ram7
lrwxrwxrwx 1 root root 0 Jun 29 14:03 /sys/block/ram8 -> ../devices/virtual/block/ram8
lrwxrwxrwx 1 root root 0 Jun 29 14:03 /sys/block/ram9 -> ../devices/virtual/block/ram9
lrwxrwxrwx 1 root root 0 Jun 29 14:03 /sys/block/xvda -> ../devices/vbd-51712/block/xvda
lrwxrwxrwx 1 root root 0 Jun 29 14:03 /sys/block/xvdc -> ../devices/vbd-51744/block/xvdc
lrwxrwxrwx 1 root root 0 Jun 29 14:03 /sys/block/xvdd -> ../devices/vbd-51760/block/xvdd
lrwxrwxrwx 1 root root 0 Jun 29 14:03 /sys/block/zram0 -> ../devices/virtual/block/zram0
[oracle@alpha ~]$ 

BLIU@KEIHIN-NA.COM- 4+ months ago[Update from Customer]
i can mount alphaprod_data. how about mfgblob_data
do the same thing?

thanks!

Bin-Bin

Oracle Support- 4+ months ago[ODM Proposed Solution(s)]
Hello Bin-Bin,

It seem to me that the reason why ALPHAPROD_DATA can not be mounted is due to the following error.

--
alert_+ASM.log Sun Jun 29 15:45:30 2014 ORA-15085: ASM disk "" has inconsistent sector size.
alert_+ASM.log Sun Jun 29 16:12:00 2014 ORA-15085: ASM disk "" has inconsistent sector size.
alert_+ASM.log Sun Jun 29 16:19:28 2014 ORA-15085: ASM disk "" has inconsistent sector size.
--

This indicates that the sector size for the underlying device mapped to /dev/oracleasm/disks/MFGBLOB_DATA has changed to 4096 which may have been 512 byte before.

Action Plan
------------------
1. Can you try to mount ALPHAPROD_DATA in the following way ?
$ sqlplus / as sysasm
SQL> alter system set asm_diskstring='/dev/oracleasm/disks/*' ;
SQL> alter diskgroup ALPHAPROD_DATA mount ;

<<< If ALPHAPROD_DATA can be mounted in this way, you can startup the databases running on this server.

2. But you will need to find out why the secor size has been changed for the underlying device mapped to /dev/oracleasm/disks/MFGBLOB_DATA.
Show us the following information

$ cat /proc/partitions
$ ls -l /sys/block/*

Regards,
Eun Heo 

Oracle Support- 4+ months ago[ODM Cause Justification]
alert_+ASM.log Sun Jun 29 15:45:30 2014 ORA-15085: ASM disk "" has inconsistent sector size.
alert_+ASM.log Sun Jun 29 16:12:00 2014 ORA-15085: ASM disk "" has inconsistent sector size.
alert_+ASM.log Sun Jun 29 16:19:28 2014 ORA-15085: ASM disk "" has inconsistent sector size. 

Oracle Support- 4+ months ago[ODM Cause Determination]
o It seem that sector size has been changed to 4096 from 512 

BLIU@KEIHIN-NA.COM- 4+ months ago[Update from Customer]
Upload to TDS successful for the file asm_info.html.

BLIU@KEIHIN-NA.COM- 4+ months ago[Update from Customer]
Upload to TDS successful for the file sosreport-bliu.3-9255522561-20140629173734-6f24.tar.xz.

BLIU@KEIHIN-NA.COM- 4+ months ago[Update from Customer]
yes, i see one.

[oracle@alpha disks]$ ls -l
total 0
brw-rw---- 1 oracle oinstall 202, 33 Jun 29 15:42 MFGBLOB_DATA
[oracle@alpha disks]$ pwd
/dev/oracleasm/disks
[oracle@alpha disks]$ 

BLIU@KEIHIN-NA.COM- 4+ months ago[Update from Customer]
i will send you another sosreport, and the output of your sql script.
please check the early message, it is about ALPHAPROD_DATA diskgroup.
someone changed the asm_diskgroups, i will changed it back.

SQL> show parameter asm

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
asm_diskgroups string ALPHAPROD_DATA
asm_diskstring string ORCL:MFGBLOB_DATA
asm_power_limit integer 1
asm_preferred_read_failure_groups string


Bin-Bin

Oracle Support- 4+ months ago[Information]
Hello Bin-Bin,

The following error from ASMalert.log indicates that Oracle ASM can not discover ASM disks in /dev/oracleasm/disks/* .

1] alert_+ASM.log
-----------------------
asm_diskstring = "ORCL:MFGBLOB_DATA"
asm_diskgroups = "MFGBLOB_DATA"
..
Sun Jun 29 16:35:43 2014
ASM Health Checker found 1 new failures
GMON dismounting group 1 at 4 for pid 17, osid 11746
ERROR: diskgroup MFGBLOB_DATA was not mounted
ORA-15032: not all alterations performed
ORA-15017: diskgroup "MFGBLOB_DATA" cannot be mounted
ORA-15063: ASM discovered an insufficient number of disks for diskgroup "MFGBLOB_DATA"
--------------------------------------------

Question - Do you see any of ASM disks in /dev/oracleasm/disks/* directory ?


And I'd like to see the following information to investigate the current issue further

Action Plan
-------------------
1. Provide the following sql output (asm_info.html) after connecting to ASM instance.
==================================================================
spool asm_info.html
set pagesize 1000
set linesize 220
set feedback off
col bytes format 999,999,999,999
col space format 999,999,999,999
col gn format 999
col name format a25
col au format 99999999
col state format a12
col type format a12
col total_mb format 999,999,999
col free_mb format 999,999,999
col od format 999
col compatibility format a12
col dn format 999
col mount_status format a12
col header_status format a12
col mode_status format a12
col mode format a12
col failgroup format a25
col label format a20
col path format a50
col path1 format a40
col path2 format a40
col path3 format a40
col bytes_read format 999,999,999,999,999
col bytes_written format 999,999,999,999,999
col cold_bytes_read format 999,999,999,999,999
col cold_bytes_written format 999,999,999,999,999

alter session set nls_date_format='DD-MON-YYYY HH24:MI:SS' ;

select to_char(sysdate, 'DD-MON-YYYY HH24:MI:SS' ) current_time from dual;
select group_number gn, name, allocation_unit_size au, state, type, total_mb, free_mb, offline_disks od, compatibility from v$asm_diskgroup;
select group_number gn,disk_number dn, mount_status, header_status,mode_status,state, total_mb, free_mb,name, failgroup, label, path from v$asm_disk order by group_number, disk_number;
select inst_id, power_kfgmg, sofar_kfgmg, work_kfgmg, rate_kfgmg, time_kfgmg, file_kfgmg from x$kfgmg;

break on g_n skip 1
break on failgroup skip 1
compute sum of t_mb f_mb on failgroup
compute count of failgroup on failgroup

select g.group_number g_n,g.disk_number d_n,g.name , g.path , g.total_mb t_mb,g.free_mb f_mb,g.failgroup from v$asm_disk g order by g_n, failgroup, d_n;
select inst_id, power_kfgmg, sofar_kfgmg, work_kfgmg, rate_kfgmg, time_kfgmg, file_kfgmg from x$kfgmg;

SET MARKUP HTML ON
set echo on


select 'THIS ASM REPORT WAS GENERATED AT: ==)> ' , sysdate " " from dual;


select 'HOSTNAME ASSOCIATED WITH THIS ASM INSTANCE: ==)> ' , MACHINE " " from v$session where program like '%SMON%';

select * from v$asm_diskgroup;

SELECT * FROM V$ASM_DISK ORDER BY GROUP_NUMBER,DISK_NUMBER;
select inst_id, power_kfgmg, sofar_kfgmg, work_kfgmg, rate_kfgmg, time_kfgmg, file_kfgmg from x$kfgmg;
SELECT * FROM V$ASM_CLIENT;

select * from V$ASM_ATTRIBUTE;

select * from v$asm_operation;

select * from v$version;

show parameter

show sga

spool off

exit

==================================================================



2. Upload ASM device information on the server in the following way below.

Download ASMCHECK zip file ( including AsmCheck.sh and AsmCheck.sql ) from note 1346190.1 and place them in any directory where grid OS user can read & write and run it in the following way.

As root OS user,
# chmod 755 AsmCheck.sh
# export ORACLE_HOME=<GRID_HOME> <<< Specify GRID_HOME from your env.
# export ORACLE_SID=<ASM#> <<< Specify ASM instance number from your env.
# ./AsmCheck.sh 'GRID_OS_USER' > `hostname`
Example> If GRID_OS User on the serveris grid, # ./AsmCheck.sh grid > `hostname`

NOTE 1: Some errors will be on the screen if the specified OS command and or directory does not exist, please ignore them.
NOTE 2: The following shell script can be run regardless of whether ASMlib is being used on the server.
NOTE 3: The following shell script can be run without running ASM instance on the server.
NOTE 4: Copy and paste the output of AsmCheck.sh on the sr
NOTE 5: Upload the following files after running AsmCheck.sh
**********************************************************************************
1] file generated with `hostname` in the directory where AsmCheck.sh runs.
2] kfed_DH.out/kfed_FS.out/kfed_BK.out/kfed_4MBK.out
*********************************************************************************



Regards,
Eun Heo 

Oracle Support- 4+ months ago[ODM Issue Verification]
1] alert_+ASM.log
-----------------------
asm_diskstring = "ORCL:MFGBLOB_DATA"
asm_diskgroups = "MFGBLOB_DATA"
..
Sun Jun 29 16:35:43 2014
ASM Health Checker found 1 new failures
GMON dismounting group 1 at 4 for pid 17, osid 11746
ERROR: diskgroup MFGBLOB_DATA was not mounted
ORA-15032: not all alterations performed
ORA-15017: diskgroup "MFGBLOB_DATA" cannot be mounted
ORA-15063: ASM discovered an insufficient number of disks for diskgroup "MFGBLOB_DATA"
-------------------------------------------- 

Oracle Support- 4+ months ago[ODM Issue Clarification]
o MFGBLOB_DATA diskgroup can not be mounted due to the following error
-----------
ORA-15017: diskgroup "MFGBLOB_DATA" cannot be mounted
ORA-15063: ASM discovered an insufficient number of disks for diskgroup "MFGBLOB_DATA"
------------- 

Oracle Support- 4+ months ago[First Contact]
First Phone Contact Comments
--------------------------------------------------------
Hello Bin-Bin,


This SR has been transferred to Oracle ASM team, My name is Eun Heo. I have been assigned this new Sev 1 SR and am reviewing the SR and any attachments.

By default, this SR was created as 24x7. Do you need this SR to be worked around the clock 24x7?

If not, I can hold this SR in my queue, to be worked as a Sev1 non-24x7 during my normal working hours.

Regards
Eun Heo
Global Product Support
Working Hours: Monday – Friday 07:00-15:30 AEST / 21:00-05:30 GMT / 14:00-22:30 PST 

BLIU@KEIHIN-NA.COM- 4+ months ago[Update from Customer]
Upload to TDS successful for the file sosreport-bliu.3-9255522561-20140629170915-382d.tar.xz.

BLIU@KEIHIN-NA.COM- 4+ months ago[Update from Customer]
Upload to TDS successful for the file virtual_machine.rar.

BLIU@KEIHIN-NA.COM- 4+ months ago[Customer Problem Description]
Severity 1 Contact Information
---------------------------------------------------
** Customer's Management 24x7 contact name: Bin-Bin Liu
** Customer's Management 24x7 contact number: +1.317.471.7002
** Customer's Management E-mail Address: bliu@keihin-na.com

** Primary Customer 24x7 contact name: Bin-Bin Liu
** Primary Customer 24x7 contact number: +1.317.471.7002
** Primary Customer E-mail Address: bliu@keihin-na.com
** Primary Customer Contact Method: Phone

** Secondary Customer 24x7 contact name: Bin-Bin Liu
** Secondary Customer 24x7 contact number: +1.317-471-7002
** Alternate 24x7 Contact Number: +1.317-471-7002
** Secondary Customer E-mail Address: bliu@keihin-na.com

Customer Problem Description
---------------------------------------------------

Problem Summary
---------------------------------------------------
OVM server after upgraded, virtual machine ASM diskgroup couldn't mpuntd

Problem Description
---------------------------------------------------
this is emergency. this is my production system.
i followed the oracle menu upgraded my VM server to 3.2.8, there was no problem on VM server.
when i start my virtual machine, i got the following messages.
I'll attach all information to you.

Bin-Bin

Wed Dec 25 09:55:36 2013
SQL> ALTER DISKGROUP ALL MOUNT /* asm agent call crs *//* {0:0:95} */
SQL> ALTER DISKGROUP ALL ENABLE VOLUME ALL /* asm agent *//* {0:0:95} */
Wed Dec 25 09:55:36 2013
ALTER SYSTEM SET local_listener='(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.18.1.126)(PORT=1521))))' SCOPE=MEMORY SID='+ASM';
NOTE: Loaded library: /opt/oracle/extapi/64/asm/orcl/1/libasm.so
Wed Dec 25 09:55:36 2013
SQL> CREATE DISKGROUP ALPHAPROD_DATA EXTERNAL REDUNDANCY DISK 'ORCL:MFGBLOB_DATA' ATTRIBUTE 'compatible.asm'='11.2.0.0.0' /* ASMCA */
NOTE: Assigning number (1,0) to disk (ORCL:MFGBLOB_DATA)
NOTE: initializing header on grp 1 disk MFGBLOB_DATA
NOTE: initiating PST update: grp = 1
GMON updating group 1 at 1 for pid 18, osid 6891
NOTE: group ALPHAPROD_DATA: initial PST location: disk 0000 (PST copy 0)
NOTE: PST update grp = 1 completed successfully
NOTE: cache registered group ALPHAPROD_DATA number=1 incarn=0x2c6de211
NOTE: cache began mount (first) of group ALPHAPROD_DATA number=1 incarn=0x2c6de211
NOTE: cache opening disk 0 of grp 1: MFGBLOB_DATA label:MFGBLOB_DATA
NOTE: cache creating group 1/0x2C6DE211 (ALPHAPROD_DATA)
NOTE: cache mounting group 1/0x2C6DE211 (ALPHAPROD_DATA) succeeded
NOTE: allocating F1X0 on grp 1 disk MFGBLOB_DATA
NOTE: Created Used Space Directory for 1 threads
NOTE: diskgroup must now be re-mounted prior to first use
NOTE: cache dismounting (clean) group 1/0x2C6DE211 (ALPHAPROD_DATA)
NOTE: messaging CKPT to quiesce pins Unix process pid: 6891, image: oracle@knaalpha.kna.local (TNS V1-V3)
NOTE: lgwr not being msg'd to dismount
NOTE: cache dismounted group 1/0x2C6DE211 (ALPHAPROD_DATA)
GMON dismounting group 1 at 2 for pid 18, osid 6891
GMON dismount

Error Codes
---------------------------------------------------


Problem Category/Subcategory
---------------------------------------------------
Database Storage (ASM, ACFS, DNFS, Compression, Corruption, Partitioning, LOBS, Tablespaces, Files)/ASM_ACFS: Generic problems

Uploaded Files
---------------------------------------------------


Template Question Responses
---------------------------------------------------
1) ### RECENT CHANGES ###


2) ### SHARING ORACLE_HOME ###


3) ### DATABASE ORACLE_HOME ###


4) ### MULTIPATHING INFORMATION ###


5) ### STORAGE CONFIGURATION ###


6) Describe how this problem is impacting your business. Include relevant information such as critical events (i.e., upgrade or project milestones), dates (i.e., go live dates), number of users affected, financial impact, etc.

  DAILY CHECKLIST Oracle Database instance is running or not select name,open_mode from V$database; Note: Check the Oracle databases are ru...