SUSE Linux 10 configuration bare Device (raw devices)

Source: Internet
Author: User

SUSE Linux 10 configuration bare Device (raw devices)

A bare device is a special character device that is not formatted with a partition or disk, or is called a bare partition (the original partition) that is not read by UNIX through the file system. It is the responsibility of the application to read and write to it. A device that is not managed directly by the operating system without buffering the file system. I/O is more efficient due to cross-operating system management.

With the Oracle 10g RAC installed on SuSE Linux 10, it is still necessary to use the bare device mode because Oracle 10g does not support the storage of OCR and Votingdisk on ASM disks.  The configuration of the SUSE Linux bare device is slightly different from other Linux, as described below. Www.ahlinux.com

[Python]

1, first partition the disk, SDD as the following method of processing

#下面的示例中使用sdc和sdd来用作裸设备, one for OCR, one for Votingdisk

Www.ahlinux.com

bo2dbp:~ # FDISK/DEV/SDC

Device contains neither a valid DOS partition table, nor Sun, SGI or OSF Disklabel

Building a new DOS disklabel. Changes'll remain in memory only,

Until decide to write them. After that, of course, the previous

Content won ' t be recoverable.

Warning:invalid flag 0x0000 of partition Table 4 would be a corrected by W (rite)

Command (M for help): N

Command Action

E Extended

P primary partition (1-4)

P

Partition number (1-4):

Value out of range.

Partition number (1-4):

Value out of range.

Partition number (1-4): 1

First cylinder (1-200, default 1):

Using Default value 1

Last cylinder or +size or +sizem or +sizek (1-200, default 200):

Using Default Value 200

Www.ahlinux.com

Command (M for help): W

The partition table has been altered!

Calling IOCTL () to re-read partition table.

Syncing disks.

2. Results after partitioning

bo2dbp:~ # fdisk-l/DEV/SDC

disk/dev/sdc:209 MB, 209715200 bytes

Heads, Sectors/track, cylinders

Units = Cylinders of 2048 * 1048576 bytes

Device Boot Start End Blocks Id System

/DEV/SDC1 1 204784 Linux

bo2dbp:~ # fdisk-l/DEV/SDD

disk/dev/sdd:209 MB, 209715200 bytes

Heads, Sectors/track, cylinders

Units = Cylinders of 2048 * 1048576 bytes

Device Boot Start End Blocks Id System

/DEV/SDD1 1 204784 Linux

Www.ahlinux.com

3. Configure the bare device

bo2dbp:~ # Vi/etc/raw

#/etc/raw

#

# sample configuration to bind raw devices

# to block devices

#

# The format of this file is:

# raw<n>:<blockdev>

#

# example:

# ---------

# RAW1:HDB1

#

# this MEANS:BIND/DEV/RAW/RAW1 to/dev/hdb1

#

# ...

#Add New RAW Devices

Raw1:sdc1

Raw2:sdd1

Www.ahlinux.com

4. Start the bare device

bo2dbp:~ # Rcraw Start

Bind/dev/raw/raw1 TO/DEV/SDC1 ... done

Bind/dev/raw/raw2 to/dev/sdd1 ... done

5. Configure the bare device to boot with the system

bo2dbp:~ # Chkconfig Raw

Raw on

#修改裸设备的权限与所有者, although the operation is modified, it will expire after a reboot. Permanent modifications See 7th

bo2dbp:~ # chown Oracle:dba/dev/raw/raw[1-2]

bo2dbp:~ # chmod 660/dev/raw/raw[1-2]

6. Testing Bare Equipment

bo2dbp:~ # dd If=/dev/zero of=/dev/raw/raw1 bs=1024k count=200

Dd:writing '/DEV/RAW/RAW1 ': No space left on device

200+0 Records in

199+0 Records out

209698816 bytes (+ MB) copied, 2.59567 seconds, 80.8 MB/s

7, modify the bare device after the boot permissions and owners

#使用root用户修改/etc/udev/rules.d/50-udev-default.rules, ensure that the raw device's permissions group= "DBA", mode= "660", owner= "Oracle"

The records for #将其中包含KENREL = = "Raw" are modified to read as follows

kernel== "raw[0-9]*", subsystem== "raw", name= "Raw/%k", group= "DBA", mode= "640", owner= "Oracle"

Www.ahlinux.com

8. Confirm the configuration is successful

#重启之后的状态

bo2dbp:~ # Ls-hltr/dev/raw

Total 0

CRW-RW----1 root disk 162, 0 Sep 10:22 Rawctl

CRW-RW----1 Oracle DBA 162, 1 Sep 10:22 RAW1

CRW-RW----1 Oracle DBA 162, 2 Sep 10:22 raw2

bo2dbs:~ #/USR/SBIN/RAW-QA

/dev/raw/raw1:bound to Major 8, minor 33

/dev/raw/raw2:bound to Major 8, minor 49

      • This article is from: Linux Tutorial Network

SUSE Linux 10 configuration bare Device (raw devices)

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.