Create an oracle 10 Gb Database Based on bare devices in Linux

Source: Internet
Author: User

Recently I plan to study the Linux bare device, so I tested it in linux to create an Oracle 10g Database Based on the bare device. Follow these steps:

I. Partitioning

Partition steps are not mentioned. The hard disk is divided into the following areas:

[Root @ suk1 ~] # Fdisk-l/dev/sdb

Disk/dev/sdb: 4294 MB, 4294967296 bytes

255 heads, 63 sectors/track, 522 cylinders

Units = cylinders of 16065*512 = 8225280 bytes

Device Boot Start End Blocks Id System

/Dev/sdb1 1 44 353398 + 83 Linux

/Dev/sdb2 45 69 200812 + 83 Linux

/Dev/sdb3 70 88 152617 + 83 Linux

/Dev/sdb4 89 522 3486105 5 Extended

/Dev/sdb5 89 101 104391 83 Linux

/Dev/sdb6 102 114 104391 83 Linux

/Dev/sdb7 115 117 24066 83 Linux

/Dev/sdb8 118 120 24066 83 Linux

/Dev/sdb9 121 127 56196 83 Linux

/Dev/sdb10 128 134 56196 83 Linux

2. Bind a bare Device

There are two ways to bind a bare Device

1) bind with commands

[Root @ suk1 raw] # raw/dev/raw/raw1/dev/sdb1

/Dev/raw/raw1: bound to major 8, minor 17

[Root @ suk1 raw] # raw/dev/raw/raw2/dev/sdb2

/Dev/raw/raw2: bound to major 8, minor 18

[Root @ suk1 raw] # raw/dev/raw/raw3/dev/sdb3

/Dev/raw/raw3: bound to major 8, minor 19

[Root @ suk1 raw] # raw/dev/raw/raw5/dev/sdb5

/Dev/raw/raw5: bound to major 8, minor 21

[Root @ suk1 raw] # raw/dev/raw/raw6/dev/sdb6

/Dev/raw/raw6: bound to major 8, minor 22

[Root @ suk1 raw] # raw/dev/raw/raw7/dev/sdb7

/Dev/raw/raw7: bound to major 8, minor 23

[Root @ suk1 raw] # raw/dev/raw/raw8/dev/sdb8

/Dev/raw/raw8: bound to major 8, minor 24

[Root @ suk1 raw] # raw/dev/raw/raw9/dev/sdb9

/Dev/raw/raw9: bound to major 8, minor 25

[Root @ suk1 raw] # raw/dev/raw/raw10/dev/sdb10

/Dev/raw/raw10: bound to major 8, minor 26

[Root @ suk1 raw] # raw-qa

/Dev/raw/raw1: bound to major 8, minor 17

/Dev/raw/raw2: bound to major 8, minor 18

/Dev/raw/raw3: bound to major 8, minor 19

/Dev/raw/raw5: bound to major 8, minor 21

/Dev/raw/raw6: bound to major 8, minor 22

/Dev/raw/raw7: bound to major 8, minor 23

/Dev/raw/raw8: bound to major 8, minor 24

/Dev/raw/raw9: bound to major 8, minor 25

/Dev/raw/raw10: bound to major 8, minor 26

Note:

/Dev/sdb4 is an extended partition. do not bind the bare device to that partition.

The bare device bound in this way will become invalid after the OS is restarted. You can modify/etc/rc to make the device take effect after restart. local file, add the following content to/etc/rc. in the local file:

Raw/dev/raw/raw1/dev/sdb1

Raw/dev/raw/raw2/dev/sdb2

Raw/dev/raw/raw3/dev/sdb3

Raw/dev/raw/raw5/dev/sdb5

Raw/dev/raw/raw6/dev/sdb6

Raw/dev/raw/raw7/dev/sdb7

Raw/dev/raw/raw8/dev/sdb8

Raw/dev/raw/raw9/dev/sdb9

Raw/dev/raw/raw10/dev/sdb10

This method is actually bound by executing the raw command in the/etc/rc. local file at startup.

2) bind a service

Modify the/etc/sysconfig/rawdevices file as follows to automatically load the bare device upon startup.

/Dev/raw/raw1/dev/sdb1

/Dev/raw/raw2/dev/sdb2

/Dev/raw/raw3/dev/sdb3

/Dev/raw/raw5/dev/sdb5

/Dev/raw/raw6/dev/sdb6

/Dev/raw/raw7/dev/sdb7

/Dev/raw/raw8/dev/sdb8

/Dev/raw/raw9/dev/sdb9

/Dev/raw/raw10/dev/sdb10

Then start the service:

[Root @ suk1 raw] # service rawdevices start

[Root @ suk1 raw] # service rawdevices start

Assigning devices:

/Dev/raw/raw1 -->/dev/sdb1

/Dev/raw/raw1: bound to major 8, minor 17

/Dev/raw/raw2 -->/dev/sdb2

/Dev/raw/raw2: bound to major 8, minor 18

/Dev/raw/raw3 -->/dev/sdb3

/Dev/raw/raw3: bound to major 8, minor 19

/Dev/raw/raw5 -->/dev/sdb5

/Dev/raw/raw5: bound to major 8, minor 21

/Dev/raw/raw6 -->/dev/sdb6

/Dev/raw/raw6: bound to major 8, minor 22

/Dev/raw/raw7 -->/dev/sdb7

/Dev/raw/raw7: bound to major 8, minor 23

/Dev/raw/raw8 -->/dev/sdb8

/Dev/raw/raw8: bound to major 8, minor 24

/Dev/raw/raw9 -->/dev/sdb9

/Dev/raw/raw9: bound to major 8, minor 25

/Dev/raw/raw10 -->/dev/sdb10

The bare device bound in this way takes effect after the OS is restarted.

3. Modify the owner of a bare Device

You can modify the owner of a bare device in either of the following ways:

1) command Modification

The command modification is simple:

[Root @ suk1 raw] # chown oracle: oinstall/dev/raw/raw1

[Root @ suk1 raw] # chown oracle: oinstall/dev/raw/raw2

[Root @ suk1 raw] # chown oracle: oinstall/dev/raw/raw3

[Root @ suk1 raw] # chown oracle: oinstall/dev/raw/raw4

[Root @ suk1 raw] # chown oracle: oinstall/dev/raw/raw5

[Root @ suk1 raw] # chown oracle: oinstall/dev/raw/raw6

[Root @ suk1 raw] # chown oracle: oinstall/dev/raw/raw7

[Root @ suk1 raw] # chown oracle: oinstall/dev/raw/raw8

[Root @ suk1 raw] # chown oracle: oinstall/dev/raw/raw9

[Root @ suk1 raw] # chown oracle: oinstall/dev/raw/raw10

  • 1
  • 2
  • Next Page

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.