Thursday, September 03, 2009

ASM Dynamic Volume Manager (DVM) & ACFS

The ASM Dynamic Volume Manager (DVM) is a kernel-loadable device driver that provides a standard device driver interface to clients (for example, ACFS).

after read about DVM & ACFS on 11gR2 Feature, that made my curious. so create testing... ACFS:
start to create Files using "dd":
$ dd if=/dev/zero of=/oracle/asmdisks/_file_disk5 bs=1k count=10000000
10000000+0 records in
10000000+0 records out
10240000000 bytes (10 GB) copied, 303.029 seconds, 33.8 MB/s
Associate Loop Device with the New File:
# losetup /dev/loop5 /oracle/asmdisks/_file_disk5
Create Disk on ASMLib:
# oracleasm createdisk VOL5 /dev/loop5
Create ASM Disk Group with ASM Compatibility "11.2" by "asmca":
$ asmca

create asm Disk Group "DISK03" and then create Volume "asm_vol1" from "DISK03" Disk Group:

and then create ASM Cluster File System(ACFS):

create directory for mount point ,check... and mount:
$ mkdir -p /oracle/product/acfsmounts/disk03_asm_vol1
# ls /dev/asm/asm_vol1*
/dev/asm/asm_vol1-15

# mount -t acfs /dev/asm/asm_vol1-15 /oracle/product/acfsmounts/disk03_asm_vol1
# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/asm/asm_vol1-15 5242880 47512 5195368 1% /oracle/product/acfsmounts/disk03_asm_vol1

# cd /oracle/product/acfsmounts/disk03_asm_vol1

# touch file.txt
ASMCMD> volstat
DISKGROUP NUMBER / NAME: 3 / DISK03
---------------------------------------
VOLUME_NAME
READS BYTES_READ READ_TIME READ_ERRS
WRITES BYTES_WRITTEN WRITE_TIME WRITE_ERRS
-------------------------------------------------------------
ASM_VOL1
274 271360 1 0
2936 11739136 263 0
ASMCMD> volinfo -G DISK03 ASM_VOL1
Diskgroup Name: DISK03

Volume Name: ASM_VOL1
Volume Device: /dev/asm/asm_vol1-15
State: ENABLED
Size (MB): 5120
Resize Unit (MB): 256
Redundancy: UNPROT
Stripe Columns: 4
Stripe Width (K): 128
Usage: ACFS
Mountpath: /oracle/product/acfsmounts/disk03_asm_vol1

2 comments:

Unknown said...

Ever thought about using LVM instead of dd'ing a file and mounting it loopback?

Surachart Opun said...

Thank You you response.

I see... I never thought like that too ;)
Just test ACFS, So... I need to create Files using "dd" + Associate Loop Device "losetup".

Idea on this... just create ACFS