Oracle ASM on Linux with single Hard Drive

上一篇 / 下一篇  2008-03-01 16:39:35

Automatic Storage Management (ASM) is a feature in Oracle Database 10g that provides the database administrator with a simple storage management interface that is consistent across all server and storage platforms. As a vertically integrated file system and volume manager, purpose-built for Oracle database files, ASM provides the performance of async I/O with the easy management of a file system. ASM provides capability that saves the DBAs time and provides flexibility to manage a dynamic database environment with increased efficiency. For more Information on ASM visitOracle.


Its quite easy to create raw devices on unix/linux for testing out the ASM feature provided by oracle 10g, however it is not recommended for the production environment. It works fine for me and tested ASM feature in Fedora. The following processes I followd to create virtual raw device on hard device.

Create directory to store the files

# mkdir /asm

Useddcommand to create files full of zeros,ifspecifies the input path.ofspecifies the output path.bssets both input and output block sizes to n bytes, count copies only n input blocks.

# dd if=/dev/zero f=/asm/disk1 bs=1024 count=2097152
# dd if=/dev/zero f=/asm/disk2 bs=1024 count=2097152
# dd if=/dev/zero f=/asm/disk3 bs=1024 count=2097152

Here three files are created of Size 2GB each. Now change the ownership of the files on the /asm directory

# chown<oracle_uid>:<oracle_gid>:/asm/disk*

losetupis used to associate loop devices with regular files or block devices.

# losetup /dev/loop1 /asm/disk1
# losetup /dev/loop2 /asm/disk2
# losetup /dev/loop3 /asm/disk3

The final step is to associate the character block device with a raw block device. Use the raw command to make the association.

# raw /dev/raw/raw1 /dev/loop1
# raw /dev/raw/raw2 /dev/loop2
# raw /dev/raw/raw3 /dev/loop3
# chown oracle:dba /dev/raw/raw[1-3]

It always a best practice to zero out the first few megabytes of any raw partition to be used for Oracle ASM.

# dd if=/dev/zero f=/dev/loop1 bs=1024 count=10240
# dd if=/dev/zero f=/dev/loop2 bs=1024 count=10240
# dd if=/dev/zero f=/dev/loop3 bs=1024 count=10240

At this point, these are three (3) raw devices in the /dev directory, ready to be used by Oracle ASM.Note:All the loopback devices and association to raw devices are lost if the system is rebooted. If you want to make these persistent, place all of those above commands into /etc/rc.local.

For more information on ASM feature referoracle documentation.


TAG:

 

评分:0

我来说两句

显示全部

:loveliness: :handshake :victory: :funk: :time: :kiss: :call: :hug: :lol :'( :Q :L ;P :$ :P :o :@ :D :( :)

日历

« 2008-10-14  
   1234
567891011
12131415161718
19202122232425
262728293031 

数据统计

  • 访问量: 1002
  • 日志数: 26
  • 书签数: 15
  • 建立时间: 2007-12-31
  • 更新时间: 2008-09-15

RSS订阅

Open Toolbar