利用UDEV服务解决RAC ASM存储设备名

<Why ASMLIB and why not?>我们介绍了使用ASMLIB作为一种专门为Oracle Automatic Storage Management特性设计的内核支持库(kernel support library)的优缺点,同时建议使用成熟的UDEV方案来替代ASMLIB。

这里我们就给出配置UDEV的具体步骤,还是比较简单的:

1.确认在所有RAC节点上已经安装了必要的UDEV包

[root@rh2 ~]# rpm -qa|grep udev
udev-095-14.21.el5

2.通过scsi_id获取设备的块设备的唯一标识名,假设系统上已有LUN sdc-sdp

for i in c d e f g h i j k l m n o p ;
do
echo "sd$i" "`scsi_id -g -u -s /block/sd$i` ";
done

sdc 1IET_00010001
sdd 1IET_00010002
sde 1IET_00010003
sdf 1IET_00010004
sdg 1IET_00010005
sdh 1IET_00010006
sdi 1IET_00010007
sdj 1IET_00010008
sdk 1IET_00010009
sdl 1IET_0001000a
sdm 1IET_0001000b
sdn 1IET_0001000c
sdo 1IET_0001000d
sdp 1IET_0001000e 

以上列出于块设备名对应的唯一标识名

3.创建必要的UDEV配置文件,

首先切换到配置文件目录

[root@rh2 ~]# cd /etc/udev/rules.d

定义必要的规则配置文件

[root@rh2 rules.d]# touch 99-oracle-asmdevices.rules 

[root@rh2 rules.d]# cat 99-oracle-asmdevices.rules
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -s %p", RESULT=="1IET_00010001", NAME="ocr1", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -s %p", RESULT=="1IET_00010002", NAME="ocr2", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -s %p", RESULT=="1IET_00010003", NAME="asm-disk1",  OWNER="grid",  GROUP="asmadmin", MODE="0660"
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -s %p", RESULT=="1IET_00010004", NAME="asm-disk2",  OWNER="grid",  GROUP="asmadmin", MODE="0660"
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -s %p", RESULT=="1IET_00010005", NAME="asm-disk3",  OWNER="grid",  GROUP="asmadmin", MODE="0660"
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -s %p", RESULT=="1IET_00010006", NAME="asm-disk4",  OWNER="grid",  GROUP="asmadmin", MODE="0660"
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -s %p", RESULT=="1IET_00010007", NAME="asm-disk5",  OWNER="grid",  GROUP="asmadmin", MODE="0660"
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -s %p", RESULT=="1IET_00010008", NAME="asm-disk6",  OWNER="grid",  GROUP="asmadmin", MODE="0660"
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -s %p", RESULT=="1IET_00010009", NAME="asm-disk7",  OWNER="grid",  GROUP="asmadmin", MODE="0660"
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -s %p", RESULT=="1IET_0001000a", NAME="asm-disk8",  OWNER="grid",  GROUP="asmadmin", MODE="0660"
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -s %p", RESULT=="1IET_0001000b", NAME="asm-disk9",  OWNER="grid",  GROUP="asmadmin", MODE="0660"
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -s %p", RESULT=="1IET_0001000c", NAME="asm-disk10", OWNER="grid",  GROUP="asmadmin", MODE="0660"
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -s %p", RESULT=="1IET_0001000d", NAME="asm-disk11", OWNER="grid",  GROUP="asmadmin", MODE="0660"
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -s %p", RESULT=="1IET_0001000e", NAME="asm-disk12", OWNER="grid",  GROUP="asmadmin", MODE="0660"

Result 为/sbin/scsi_id -g -u -s %p的输出--Match the returned string of the last PROGRAM call. This key may be
used in any following rule after a PROGRAM call.
按顺序填入刚才获取的唯一标识名即可

OWNER为安装Grid Infrastructure的用户,在11gr2中一般为grid,GROUP为asmadmin
MODE采用0660即可

NAME为UDEV映射后的设备名,
建议为OCR和VOTE DISK创建独立的DISKGROUP,为了容易区分将该DISKGROUP专用的设备命名为ocr1..ocrn的形式
其余磁盘可以根据其实际用途或磁盘组名来命名

4.将该规则文件拷贝到其他节点上
[root@rh2 rules.d]# scp 99-oracle-asmdevices.rules Other_node:/etc/udev/rules.d

5.在所有节点上启动udev服务,或者重启服务器即可

[root@rh2 rules.d]# /sbin/udevcontrol reload_rules
[root@rh2 rules.d]# /sbin/start_udev
Starting udev:                                            [  OK  ]

6.检查设备是否到位

[root@rh2 rules.d]# cd /dev
[root@rh2 dev]# ls -l ocr*
brw-rw---- 1 grid asmadmin 8, 32 Jul 10 17:31 ocr1
brw-rw---- 1 grid asmadmin 8, 48 Jul 10 17:31 ocr2

[root@rh2 dev]# ls -l asm-disk*
brw-rw---- 1 grid asmadmin 8,  64 Jul 10 17:31 asm-disk1
brw-rw---- 1 grid asmadmin 8, 208 Jul 10 17:31 asm-disk10
brw-rw---- 1 grid asmadmin 8, 224 Jul 10 17:31 asm-disk11
brw-rw---- 1 grid asmadmin 8, 240 Jul 10 17:31 asm-disk12
brw-rw---- 1 grid asmadmin 8,  80 Jul 10 17:31 asm-disk2
brw-rw---- 1 grid asmadmin 8,  96 Jul 10 17:31 asm-disk3
brw-rw---- 1 grid asmadmin 8, 112 Jul 10 17:31 asm-disk4
brw-rw---- 1 grid asmadmin 8, 128 Jul 10 17:31 asm-disk5
brw-rw---- 1 grid asmadmin 8, 144 Jul 10 17:31 asm-disk6
brw-rw---- 1 grid asmadmin 8, 160 Jul 10 17:31 asm-disk7
brw-rw---- 1 grid asmadmin 8, 176 Jul 10 17:31 asm-disk8
brw-rw---- 1 grid asmadmin 8, 192 Jul 10 17:31 asm-disk9

Comparation between ASM note [ID 373242.1] and note [ID 452924.1]

Question:
Oracle Support on the note “Lun Size And Performance Impact With Asm [ID 373242.1]” and on the note “How to Prepare Storage for ASM [ID 452924.1]” say that in other things:

– Maximize the number of disks in a disk group for maximum data distribution and higher I/O bandwidth
– Size alone should not affect the performance of a LUN. The underlying hardware is what counts.
There is no magic number for the LUN size
– For larger LUNs it is recommended using a large ALLOCATION UNIT.

The provieder of the Storage EMC-Vmax say that the LUNS size can be 200 GB for database OLTP.

We believe that the premise or EMC_Vmax contradicts to ORACLE so instead of maximize the disks they pretend minimize the disks
of the DISK GROUP.

You believe that this is to be true for Storage EMC-Vmax.

Answer:
As mentioned in the document 373242.1.LUN size alone should not affect the performance.

Size alone should not affect the performance of a LUN. The underlying hardware is what counts. There is no magic number for the LUN size. Seek the advice of the storage vendor to recommend the best configuration from a raid 1 or 5 perspective for performance and availability since this may vary between vendors. Given a database size and storage hardware you have available, our best practice recommends creating larger LUNs (if possible to reduce LUN management for the sys admins) and create LUNs from separate set of storage arrays (drives) so that LUNs are not sharing drives if possible.

For larger LUNs it is recommended using a large ALLOCATION UNIT.

Storage Portfolio:Oracle is a Storage Company

Not all data is created equal. As data ages it is not utilized as often and so it makes pure financial sense to offload less accessed data to cheaper storage media and it can improve performance of the overall system when your primary systems are not weighted down by stale data. The alignment of different categories of data to different types of storage media directly reduces cost and effectively manages large volumes of data.
To meet those intensive data demands, tiered storage is a critical approach for storage success. Tiered storage aligns the value of your data assets with the most appropriate storage media in order to reduce cost and effectively manage data throughout it’s lifecycle.
Software…

PRIMARY
High-performance apps.
Mission-critical databases
Consolidation
Flash Storage
Disk Storage
Hybrid Storage
Analytics

SECONDARY
Fixed Content Serving
E-mail and Collaboration
Business Continuity

NEAR-LINE
STORAGE
Video, Medical, Legal
Deep Archives
Tape Libraries
Tape Drives/Media
Disaster Recovery

Flash Storage World’s fastest, most efficient Flash Array
Sun F5100 Flash Array
Over 1 million IOPS in 1RU (1.75 inches) Equivalent of 3000 FC Disk drives in 1RU
Up to 1.92TB of flash storage capacity, uses only 300 watts of power
Accelerate database performance by 2x, while reducing energy consumption by up to 100x

Unified Storage: 7000 series Best Storage Efficiency
Only Storage Appliance with Hybrid Storage Pools (HSPs)
Data is intelligently and automatically migrated between DRAM, Flash and Disk
Continuously optimizes storage system performance and efficiency
Simplifies management, transparently managed as a single storage pool

”…Hybrid Storage Pools provide quite a lot of cache-speed (or near cache-speed) access to our Oracle data…HSPs were very important in our decision to go forward with the purchase of those machines.”
– David Robillard, UNIX team leader & Oracle DBA, Notarius

Unified Storage: 7000 series Best Analytics
Only Storage Appliance with DTrace Analytics
Automatic real-time visualization of application and storage related workloads
Simple yet sophisticated instrumentation provides real-time comprehensive analysis
Supports multiple simultaneous application and workload analysis in real-time
Analysis can be saved, exported and replayed for further analysis

FC Arrays: 6000 series Target these customer business benefits
Improve Productivity – Drive Top-Line Growth
Real-world performance drives faster applications for improved productivity
More performance per drive = less cost for power, cooling, acquisition, service and management
On-the-fly reconfigurations with data protection and a HA architecture maximize business opportunities
Scale without Sacrifice
Efficient disk IOPS that scale linearly
Balanced performance excels in mixed workloads (IOPS and MB/s)
Best-in-Class Investment Protection
Deploy with Confidence
Field proven, battle hardened – 7th Generation Architecture
Oracle Certified, Tested and Supported
Deployed by over 10,000 enterprises globally

Oracle Tape Value Proposition
Best TCO and Investment Protection
Seamless, automated tiered architecture with VSM and SAM lowers storage costs
Best consolidation capabilities with the only true mixed media support – Any Cartridge, Any Slot
Only vendor with up to 4 generations of media re-use
Highest Scalability
Modular architecture with unprecedented performance and capacity (5X IBM)
Best Reliability and Availability
Only vendor with hot-replaceable robotics and electronics
Ranked #1 in Quality & Reliability by Storage Magazine

Best TCO Oracle’s Multi-tiered Solution Delivers >50% Better TCO
“Our return on investment is instant, because it would have cost us $14 million to make videotape copies. The Sun solution is saving us $6 million. We plan to completely replace and recycle existing tapes every three years, and even doing that, this solution is far less expensive than any other.”
– Sam Gustman, CTO, USC SHOAH Foundation

Highest Scalability Oracle StorageTek Libraries Scale 5X the Competition
“The SL8500 that we have today is the maximum in a single frame, but the SL8500 works where you can stack them side by side and the (tape) can actually go from one frame to another,” State of Tennessee’s Max Arnold said. “So it’s hugely scalable.”
– Storage Magazine, Sep. ’09

So, instead of keeping your growing database on a single tier of storage, Oracle is able to move the data to the most appropriate storage tier and we have both the software and hardware capabilities to bring you the entire solution from a single vendor. And because the tools you use are inherent to the database today you can do it all non-disruptively.

Using Oracle ILM with partitioniong, Oracle DB will run faster with much lower cost. Cost savings are not just on storage hardware but energy and space savings in the data center

Solution: Customer Reference North American Energy and Utility Company
Business need
Economical means to support Oracle Database BU&R using RMAN
Business results
By leveraging Data Services included with S7210 as target in D2D environment, immediately saved $250K by not having pay for software license renewals
Leveraged Storage Analytics insights to improve management efficiency
Overall: Reduced TCO costs; increased utility, performance and usable capacity
Customer reaction
“NetApp heard about this deal and came to me and said they would 1) lower the price, 2) give free installation, 3) and free training. I said, ‘you don’t get it,’ with this box I don’t need any installation help or training for me or the extended team.”
“…as soon as the storage arrived onsite a couple weeks ago we racked it – installed the latest software – and moved it to our DR site all configured. We have already migrated a bunch of data…and backups are already running to it from production. From installation to implementation – very smooth with no current issues.”

沪ICP备14014813号-2

沪公网安备 31010802001379号