Configure raw devices in SUSE Linux 10)

Source: Internet
Author: User


In SUSE Linux 10, raw devices bare devices are unformatted partitions or disks, which are also called raw partitions ), A special character device that is not read by Unix through a file system. It is read and written by the application. A device that is not directly managed by the operating system without being buffered by the file system. I/O efficiency is improved because I/O is managed across operating systems.
If Oracle 10g RAC is installed on SUSE Linux 10, Oracle 10g does not support storing ocr and votingdisk In the ASM disk. Therefore, you still need to use bare devices for it. The configurations of SUSE Linux bare devices are slightly different from those of other Linux systems. Www.2cto.com
[Python] 1. Partition the disk first. sdd is processed as follows # In the following example, sdc and sdd are used as bare devices, one for ocr, and the other for votingdisk www.2cto.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 will remain in memory only, until you decide to write them. after that, of course, the previous content won't be recoverable. warning: invalid flag 0x0000 of partition table 4 will be corrected by w (rite) Command (m for help): n Command action e extended p prima Ry 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.2cto.com Command (m for help): w The partition table has been altered! Calling ioctl () to re-read partition table. Syncing disks. 2. partition result bo2dbp :~ # Fdisk-l/dev/sdc Disk/dev/sdc: 209 MB, 209715200 bytes 64 heads, 32 sectors/track, 200 cylinders Units = cylinders of 2048*512 = 1048576 bytes Device Boot Start End Blocks Id System/dev/sdc1 1 200 204784 83 Linux bo2dbp :~ # Fdisk-l/dev/sdd Disk/dev/sdd: 209 MB, 209715200 bytes 64 heads, 32 sectors/track, 200 cylinders Units = cylinders of 2048*512 = 1048576 bytes Device Boot Start End Blocks Id System/dev/sdd1 1 200 204784 83 Linux www.2cto.com 3. Configure the bare Device bo2dbp :~ # Vi/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.2cto.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 start bo2dbp with the system :~ # Chkconfig raw on # modify the permission and owner of the bare device. Although this operation is modified, it will become invalid after restart. For Permanent modification, see bo2dbp :~ # Chown oracle: dba/dev/raw [1-2] bo2dbp :~ # Chmod 660/dev/raw [1-2] 6. Test the bare device bo2dbp :~ # Dd if =/dev/zero of =/dev/raw/raw1 bs = 1024 k count = 200 dd: writing '/dev/raw/raw1 ': no space left on device 200 + 0 records in 199 + 0 records out 209698816 bytes (210 MB) copied, 2.59567 seconds, 80.8 MB/s 7. Modify the permission and owner of the bare device after startup # Use the root user to modify/etc/udev/rules. d/50-udev-default.rules, ensure the raw device permission GROUP = "dba", MODE = "660 ", OWNER = "oracle" # change the records containing KENREL = "raw" to the following KERNEL = "raw [0-9] *", SUBSYSTEM = "raw ", NAME = "raw/% k", GROUP = "dba", MODE = "640", OWNER = "oracle" www.2cto.com 8, confirm the configuration is successful # The status bo2dbp after restart :~ # Ls-hltr/dev/raw total 0 crw-rw ---- 1 root disk 162, 0 Sep 19 rawctl crw-rw ---- 1 oracle dba 162, 1 Sep 19 raw1 crw-rw ---- 1 oracle dba 162, 2 Sep 19 raw2 bo2dbs :~ #/Usr/sbin/raw-qa/dev/raw/raw1: bound to major 8, minor 33/dev/raw/raw2: bound to major 8, minor 49

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.