Linux platform: block devices, bare devices, asmlib, udev related relationships

Source: Internet
Author: User

There are two ways to access disk devices (bare partitions): 1. Character access (bare device); 2. Block mode access

Solaris platform : Under the Solaris platform, the system provides both character and block access to disk devices. Each disk has two device file names:

    1. One in the/dev/dsk directory, such as/DEV/DSK/C1T1D1S1, when the device name operation, is to block the way the disk operation;
    2. One in the/dev/rdsk directory, such as/DEV/RDSK/C1T1D1S1, when operating with this device name, is to operate the disk as a character (bare device mode R)

Linux platform : Under the Linux platform, the default is to provide only block device access to disk devices (such as/DEV/SDA1), without providing character access (bare device mode R). Manual configuration required for use of character access

Configure the character device (bare device) access mode

Applicable operating system version

The role of Udev

/etc/sysconfig/rawdevices +/etc/rc.local

Red Hat AS4

/etc/sysconfig/rawdevices +/etc/udev/permissions.d/50-udev.permissions

Red Hat AS4

Controlling access rights

60-raw.rules or 99-oracle-asmdevices.rules

Rhel5/oel5

Bind a block device to a bare device, a fixed device file name, and control access rights;

Linux under Platform: different ways that Oracle creates ASM in different versions :

    • Before version 11.2: ASM can use disks in two ways. One is the bare device mode, and the other is the Amslib method, which allows ASM to be created on the block device.

Note: (Oracle 11.1 official) You can run ASM using Asmlib, or run ASM using raw devices.

    • After version 11.2: ASM itself supports block devices directly.

Note: 11.2 Official did not find a clear explanation

    • prior to version 11.2, Udev was used to bind a block device to a bare device and to control access, essentially creating an asm;11.2 version on a bare device and then using Udev as a fixed drive letter, and controlling access, essentially creating an ASM on a block device. Comparison example:

Files read when using Udev

Udev file Contents

Before version 11.2

/etc/udev/rules.d/60-raw.rules

action== "Add", kernel== "/dev/sdb1", run+= "/bin/raw/dev/raw/raw1%N"
action== "Add", kernel== "Raw1", owner= "grid", group= "Asmadmin", mode= "0660"

Version 11.2 and later

/etc/udev/rules.d/99-oracle-asmdevices.rules

kernel== "Sd*1", bus== "scsi", program== "/sbin/scsi_id-g-u-s/block/$parent", result== "sata_vbox_harddisk_ Vbd306dbe0-df3367e3_ ", name=" Asm-disk1 ", owner=" Oracle ", group=" DBA ", mode=" 0660 "

Linux platform: block devices, bare devices, asmlib, udev related relationships

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.