|
DEPRECATION OF RAW DEVICES IN LINUX 2.6 KERNELS -----------------------------------------------
Starting with the 2.6 Linux kernel, raw devices are being phased out in favor of O_DIRECT access directly to the block devices.
With Oracle RDBMS 10.2.0.2 and higher, block devices can be accessed via any of the following methods, and utilized by RDBMS:
- Directly to the block device - Via ASMLib mapped devices - OCFS2 devices (Note: OCFS2 is still Pending Certification) - LVM2 mapped devices if single-instance SCRIPT TO MIGRATE RAW TO BLOCK DEVICES --------------------------------------
Moving from RAW devices to O_DIRECT opened block devices is simple. Just link the raw device files which used to exist to their corresponding block device. For example, instead of running "raw /dev/raw/raw5 /dev/sdc1" the should do "ln -s /dev/sdc1 /dev/raw/raw5".
This can be automated from the /etc/sysconfig/rawdevices file via the following script:
#!/usr/bin/env perl /^s*#/ and next;
/^(S+)s+(d+)s+(d+)/ and do { my ($rawname, $major, $minor) = ($1, $2, $3); $syspath = qx!find /sys/block -name dev | xargs grep -l "^$major:$minor$" !; @pathelem = split '/', $syspath; print "ln -s /dev/$pathelem[$#pathelem-1] $rawname"; } or /^(S+)s+(S+)/ and print "ln -s $2 $1";
Save script as rawfinder.pl and run it with:
$ perl rawfinder.pl /etc/sysconfig/rawdevices
This will print out the list of symlinks to create.
REFERENCES ----------
Notes in /etc/sysconfig/rawdevices as follows, from a RHEL4 system:
# This file and interface are deprecated. # Applications needing raw device access should open regular # block devices with O_DIRECT. # raw device bindings # format: <rawdev> <major> <minor> # <rawdev> <blockdev> # example: /dev/raw/raw1 /dev/sda1 # /dev/raw/raw2 8 5
|