- SQL> alter diskgroup data add volume acfsvol size 1G;
- Diskgroup altered.
- [root@rac1 ~]# mkdir /sharedisk
- [root@rac2 ~]# mkdir /sharedisk
- [root@rac1 ~]# /sbin/mkfs -t acfs -n ACFSVOL1 /dev/asm/acfsvol-53
- mkfs.acfs: version = 11.2.0.3.0
- mkfs.acfs: on-disk version = 39.0
- mkfs.acfs: volume = /dev/asm/acfsvol-53
- mkfs.acfs: volume size = 1073741824
- mkfs.acfs: Format complete.
- [root@rac1 ~]# /sbin/acfsutil registry -a -f /dev/asm/acfsvol-53 /sharedisk/
- acfsutil registry: mount point /sharedisk successfully added to Oracle Registry
- [root@rac1 ~]# mount.acfs -o all
- [root@rac1 ~]# df -h
- Filesystem Size Used Avail Use% Mounted on
- /dev/mapper/VolGroup00-LogVol00
- 93G 19G 70G 21% /
- /dev/sda1 190M 17M 165M 9% /boot
- tmpfs 2.0G 1.2G 807M 60% /dev/shm
- /dev/asm/acfsvol-53 1.0G 39M 986M 4% /sharedisk
- [root@rac2 ~]# mount.acfs -o all
- [root@rac2 ~]# df -h
- Filesystem Size Used Avail Use% Mounted on
- /dev/mapper/VolGroup00-LogVol00
- 93G 12G 77G 14% /
- /dev/sda1 99M 17M 78M 18% /boot
- tmpfs 2.0G 1.2G 807M 60% /dev/shm
- /dev/asm/acfsvol-53 1.0G 73M 952M 8% /sharedisk
- [root@rac1 ~]# /sbin/acfsutil info fs
- /sharedisk
- ACFS Version: 11.2.0.3.0
- flags: MountPoint,Available
- mount time: Wed Feb 20 12:11:52 2013
- volumes: 1
- total size: 1073741824
- total free: 998002688
- primary volume: /dev/asm/acfsvol-53
- label: ACFSVOL1
- flags: Primary,Available,ADVM
- on-disk version: 39.0
- allocation unit: 4096
- major, minor: 252, 27137
- size: 1073741824
- free: 998002688
- ADVM diskgroup DATA
- ADVM resize increment: 33554432
- ADVM redundancy: unprotected
- ADVM stripe columns: 4
- ADVM stripe width: 131072
- number of snapshots: 0
- snapshot space usage: 0
- replication status: DISABLED
ASMCMD:
- [grid@rac1 ~]$ echo $ORACLE_SID
- +ASM1
- [grid@rac1 ~]$ asmcmd
- ASMCMD> ls
- ACFS/
- CRS/
- DATA/
- FRA/
- ASMCMD> volcreate //查看帮助命令
- usage: volcreate -G diskgroup -s size [ --column number ] [ --width stripe_width ] [--redundancy {high|mirror|unprotected} ]
- [--primary {hot|cold}] [--secondary {hot|cold}] volume
- help: help volcreate
- ASMCMD> volcreate -G ACFS -s 5G vol2 //如果空间不足就会报这个错误
- ORA-15032: not all alterations performed
- ORA-15041: diskgroup "ACFS" space exhausted (DBD ERROR: OCIStmtExecute)
- ASMCMD> volcreate -G ACFS -s 4G vol2
- ASMCMD> volinfo -G ACFS vol2
- Diskgroup Name: ACFS
- Volume Name: VOL2
- Volume Device: /dev/asm/vol2-330
- State: ENABLED
- Size (MB): 4096
- Resize Unit (MB): 32
- Redundancy: UNPROT
- Stripe Columns: 4
- Stripe Width (K): 128
- Usage:
- Mountpath:
- ASMCMD> volinfo -G ACFS vol1
- Diskgroup Name: ACFS
- Volume Name: VOL1
- Volume Device: /dev/asm/vol1-330
- State: ENABLED
- Size (MB): 5120
- Resize Unit (MB): 32
- Redundancy: UNPROT
- Stripe Columns: 4
- Stripe Width (K): 128
- Usage: ACFS
- Mountpath: /u01/app/grid/acfsmounts/acfs_vol1
- [root@rac1 ~]# mkdir /vol2 (节点2创建相同的挂载点)
- [root@rac1 ~]# mkfs.acfs /dev/asm/vol2-330
- mkfs.acfs: version = 11.2.0.3.0
- mkfs.acfs: on-disk version = 39.0
- mkfs.acfs: volume = /dev/asm/vol2-330
- mkfs.acfs: volume size = 4294967296
- mkfs.acfs: Format complete.
- [root@rac1 ~]# mount -t acfs /dev/asm/vol2-330 /vol2/
- [root@rac1 ~]# df -h /vol2
- Filesystem Size Used Avail Use% Mounted on
- /dev/asm/vol2-330 4.0G 45M 4.0G 2% /vol2
- [root@rac1 ~]# acfsutil registry -a /dev/asm/vol2-330 /vol2/(注册后,节点2会自动挂载)
- acfsutil registry: mount point /vol2 successfully added to Oracle Registry