Re: How to create Raw Partition on vmware

From: Karl Arao <karlarao_at_gmail.com>
Date: Thu, 13 Aug 2009 19:10:01 +0800
Message-ID: <12ee65600908130410n1c34e0b7nc3f5f319db6d8870_at_mail.gmail.com>



Just create a pool of disk on the VMware server.. make them the same size.. then for RHEL4 on raw (on RHEL5 it's different you have to use UDEV)... I do the following:

RHEL4 / OEL4
  1. Make whole disk partitions

            Sample below....

	    [root_at_dg10g1 ~]# fdisk /dev/sdc
	    Device contains neither a valid DOS partition table, nor Sun, SGI
or OSF disklabel
	    Building a new DOS disklabel. Changes will remain in memory only,
	    until you decide to write them. After that, of course, the previous
	    content won't be recoverable.


	    The number of cylinders for this disk is set to 9529.
	    There is nothing wrong with that, but this is larger than 1024,
	    and could in certain setups cause problems with:
	    1) software that runs at boot time (e.g., old versions of LILO)
	    2) booting and partitioning software from other OSs
	      (e.g., DOS FDISK, OS/2 FDISK)
	    Warning: invalid flag 0x0000 of partition table 4 will be
corrected by w(rite)

            Command (m for help): p

	    Disk /dev/sdc: 78.3 GB, 78383153152 bytes
	    255 heads, 63 sectors/track, 9529 cylinders
	    Units = cylinders of 16065 * 512 = 8225280 bytes

	      Device Boot      Start         End      Blocks   Id  System

	    Command (m for help): n
	    Command action
	      e   extended
	      p   primary partition (1-4)
	    p
	    Partition number (1-4): 1
	    First cylinder (1-9529, default 1):
	    Using default value 1
	    Last cylinder or +size or +sizeM or +sizeK (1-9529, default 9529):
	    Using default value 9529

	    Command (m for help): p

	    Disk /dev/sdc: 78.3 GB, 78383153152 bytes
	    255 heads, 63 sectors/track, 9529 cylinders
	    Units = cylinders of 16065 * 512 = 8225280 bytes

	      Device Boot      Start         End      Blocks   Id  System
	    /dev/sdc1               1        9529    76541661   83  Linux

	    Command (m for help): w
	    The partition table has been altered!

	    Calling ioctl() to re-read partition table.
	    Syncing disks.


2) Add entry on /etc/sysconfig/rawdevices

      [root_at_dbrocaix01 ~]# cat /etc/sysconfig/rawdevices

# This file and interface are deprecated.
# Applications needing raw device access should open regular
# block devices with O_DIRECT.
# raw device bindings
# format: <rawdev> <major> <minor>
# <rawdev> <blockdev>
# example: /dev/raw/raw1 /dev/sda1
# /dev/raw/raw2 8 5
/dev/raw/raw1 /dev/sdc1 /dev/raw/raw2 /dev/sdd1 /dev/raw/raw3 /dev/sde1 /dev/raw/raw4 /dev/sdf1

3) Add entry on /etc/rc.local to change ownership of the disks upon startup

      [root_at_dbrocaix01 ~]# cat /etc/rc.local
      #!/bin/sh
      #

# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
touch /var/lock/subsys/local
# ASM DISKS CHOWN AND CHMOD
chown oracle:dba /dev/sdc1 chmod 660 /dev/sdc1 chown oracle:dba /dev/sdd1 chmod 660 /dev/sdd1 chown oracle:dba /dev/sde1 chmod 660 /dev/sde1 chown oracle:dba /dev/sdf1 chmod 660 /dev/sdf1

4) Create ASM instance and disk group

Received on Thu Aug 13 2009 - 06:10:01 CDT

Original text of this message