Create,register,and mount an ACFS filesystem.

Create,register,and mount an ACFS filesystem.
1.Check if the ACFS drivers are loaded.
[root@host02 ~]# lsmod | grep ora
oracleacfs            787588  4
oracleadvm            177792  8
oracleoks             226784  2 oracleacfs,oracleadvm
oracleasm              46356  1
2.Create a volumne.
[root@host02 ~]# su - grid
[grid@host02 ~]$ . oraenv
ORACLE_SID = [+ASM1] ?
The Oracle base for ORACLE_HOME=/u01/app/11.2.0/grid is /u01/app/grid
[grid@host02 ~]$ asmcmd
  ASMCMD> lsdg
State    Type    Rebal  Sector  Block       AU  Total_MB  Free_MB  Req_mir_free_MB  Usable_file_MB  Offline_disks  Voting_files  Name
MOUNTED  EXTERN  N         512   4096  1048576      9788      152                0             152              0             N  ACFS/
MOUNTED  NORMAL  N         512   4096  1048576      9788     3582             1560            1011              0             N  DATA/
MOUNTED  EXTERN  N         512   4096  1048576      4894     4487                0            4487              0             N  FRA/
ASMCMD> volcreate -G FRA -s 1G VOLTEST
3.Get the device name.
ASMCMD> volinfo -G FRA -a
Diskgroup Name: FRA

         Volume Name: VOLTEST
         Volume Device: /dev/asm/voltest-14
         State: ENABLED
         Size (MB): 1024
         Resize Unit (MB): 256
         Redundancy: UNPROT
         Stripe Columns: 4
         Stripe Width (K): 128
         Usage:
         Mountpath:
4.Create the filesystem.
ASMCMD> exit
[grid@host02 ~]$ su - root
Password:
[root@host02 ~]# mkfs
Usage: mkfs [-V] [-t fstype] [fs-options] device [size]
[root@host02 ~]# mkfs -t acfs /dev/asm/voltest-14
mkfs.acfs: version                   = 11.2.0.1.0.0
mkfs.acfs: on-disk version           = 39.0
mkfs.acfs: volume                    = /dev/asm/voltest-14
mkfs.acfs: volume size               = 1073741824
mkfs.acfs: Format complete.
5.Mount the filesystem.
[root@host02 ~]# mkdir -p /voltest
[root@host02 ~]# mount -t acfs /dev/asm/voltest-14 /voltest
[root@host02 ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/xvda3            5.8G  2.9G  2.6G  53% /
/dev/xvda1             99M   13M   82M  14% /boot
tmpfs                 1.1G  482M  639M  44% /dev/shm
/dev/xvdb1            2.0G   47M  1.9G   3% /home
/dev/xvdc1             15G  4.3G  9.9G  31% /u01
/dev/xvdd1            5.5G  5.4G     0 100% /stage
/dev/asm/dbhome_1-388
                      6.0G  4.8G  1.3G  80% /u01/app/oracle/acfsmount/11.2.0/sharedhome
/dev/asm/test-388     3.0G  173M  2.9G   6% /test
/dev/asm/images-388   256M  173M   84M  68% /u01/app/oracle/acfsmount/images
/dev/asm/voltest-14   1.0G   39M  986M   4% /voltest
[root@host02 ~]# cd /voltest
[root@host02 voltest]# ls
lost+found
[root@host02 voltest]# > test.txt
[root@host02 voltest]# ls -lrth
total 64K
drwx------ 2 root root 64K Nov  4 12:57 lost+found
-rw-r--r-- 1 root root   0 Nov  4 12:58 test.txt

Of course you can mount it from the other node and see the files under the filesystem.
[root@host02 voltest]# ssh host01
root@host01's password:
Last login: Wed Nov  2 17:46:21 2011 from 192.0.2.1
[root@host01 ~]# mkdir /voltest
[root@host01 ~]# mount -t acfs /dev/asm/voltest-14 /voltest
[root@host01 ~]# cd /voltest/
[root@host01 voltest]# ls
lost+found  test.txt
 6. Register the volume and mount point.
[root@host02 voltest]# acfsutil registry -a /dev/asm/voltest-14 /voltest/
acfsutil registry: mount point /voltest successfully added to Oracle Registry
[root@host02 voltest]# acfsutil registry -l
Device : /dev/asm/test-388 : Mount Point : /test : Options : none : Nodes : all : Disk Group : ACFS : Volume : TEST
Device : /dev/asm/images-388 : Mount Point : /u01/app/oracle/acfsmount/images : Options : none : Nodes : all : Disk Group : ACFS : Volume : IMAGES
Device : /dev/asm/voltest-14 : Mount Point : /voltest : Options : none : Nodes : all : Disk Group : FRA : Volume : VOLTEST
7. Extend the volume.
[root@host02 voltest]# acfsutil size +256M /voltest/
acfsutil size: new file system size: 1342177280 (1280MB)
[root@host02 voltest]#
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值