Basic knowledge about bare Linux Devices

Source: Internet
Author: User

1. Bare device definition:
A hard disk without partitions is called a raw device)
Or a partition, but it is not formatted by ext3, ocfs, or other file systems. It is called raw partition)
Both are bare devices.

2. Binding bare Devices
Partitions with file systems are mounted to a mount point (directory)
A bare device cannot be mounted and can only be bound to a device name under/dev/raw /.
For example,/dev/raw/raw1

3. Bind bare Devices
There are two methods: one is introduced here, and the other can be searched by Google

Modify/etc/sysconfig/rawdevices and add the following content,
Here, sdd1 and sdd2 are the original partition name or the original device (hard disk) Name,
Raw1 and raw2 are the original device names in the/dev directory, ranging from raw1 to raw255, that is, up to 255 bare devices can be bound.
/Dev/raw/raw1/dev/sdd1
/Dev/raw/raw2/dev/sdd2

Modify the owner and access permissions of the bare device.
Chown ORACLE: DBA/dev/raw/raw1
Chown ORACLE: DBA/dev/raw/raw2
Chmod 660/dev/raw/raw1
Chmod 660/dev/raw/raw2

Finally, the bare device takes effect and is automatically loaded when the machine starts.

Run/etc/init. d/rawdevices restart to activate the bare device.

Execute/sbin/chkconfig rawdevices on to ensure that the bare device can be loaded when the machine starts. This step is very important.

4. read/write of bare Devices
You cannot use commands such as CP. You can use dd commands to write content. For more information, see

5. Clear bare Devices
It is equivalent to formatting. BS is a fast size, block size.
Count is a fast quantity, which is multiplied by more than the capacity of the bare device.
Dd If =/dev/Zero of =/dev/raw/raw1 BS = 8192 COUNT = 12800
Dd If =/dev/Zero of =/dev/raw/raw2 BS = 8192 COUNT = 12800
-------
In addition
RHEL4 uses udev to manage devices
Manual modification/dev/raw/raw1 cannot take effect permanently
To make the permission valid permanently
You need to modify line 113rd of the file/etc/udev/permissions. d/50-udev.permissions.
Raw/*: Root: Disk: 0660
Change
Raw/*: oracle: DBA: 0660
Restart the machine
If there is no/raw/directory under/dev/, You can manually create it

Http://defoliation.iblog.cn/post/3528/78361
Http: // www. *****. org/viewthread. php? Tid = 26708
The number * Here Is (C, N, O, U, and g)
 

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.