Sei sulla pagina 1di 6

/usr/sbin/groupadd /usr/sbin/groupadd /usr/sbin/groupadd /usr/sbin/groupadd /usr/sbin/groupadd

-g -g -g -g -g

1000 1001 1002 1003 1004

oinstall asmadmin dba asmdba asmoper

-- users useradd -u 1100 -g oinstall -G asmadmin,asmdba,asmoper grid useradd -u 1101 -g oinstall -G asmdba,dba oracle mkdir chown chmod chown ls ls vi vi /u01/app/grid /u01/app/oracle -R grid:oinstall /u01/app 775 /u01/app oracle:oinstall /u01/app/oracle

-ltr /u01/app -ltr /u01 /etc/security/limits.conf /etc/udev/rules.d/99-oracleasm.rules status status status status resource -t resource ora.DATA.dg -v resource ora.DATA.dg -p|grep ACL asm

crsctl crsctl crsctl srvctl

/sbin/mkfs -t acfs /dev/asm/acvsvol-97 /sbin/acfsutil registry -a -f /dev/asm/acvsvol-97 /u01/app/acfsdemo /sbin/mount.acfs -o all /bin/umount -t acfs -a acfsload start -s acfsutil info fs acfsutil registry -l #/etc/fstab /dev/asm/acfs_db1-152 0 0 -- Display all ACFS file systems -- Display registry contents

/u01/app/oracle/acfsmounts/acfs_db1

acfs

defaults

acfsutil size 6G /u01/app/acfsdemo $ ASMCMD volcreate -d DATA -s 10G volume1 ; Create volume .volume1. # mkfs -t acfs -b 4k /dev/asm/volume1 ; Create acfs file system # mount -t acfs /dev/asm/volume1 /oracle/cluster1/myacfs ; Mount file system # acfsutil registry -a /dev/asm/volume1 /oracle/cluster1/myacfs ; Write to regis try Provision capacity to expand volume1 and myacfs by 5GB: $ ASMCMD volresize DATA volume1 -s 5G asmcmd lsop asmcmd lsdsk asmcmd iostat asmcmd lsdsk asmcmd lsdsk -t

asmcmd lsdsk -p asmcmd lsdsk -k $ /sbin/acfsutil registry -a -f \ /dev/asm/volume1-167 \ /u01/app/oracle/acfsdata/volume1 V$ASM_FILESYSTEM contains one row for every mounted file system. V$ASM_ACFSVOLUMES contains one row for every ACFS device file that is a member o f a mounted ACFS file system. ASMCMD volinfo -a provides similar volume information Includes unmounted file systems Does not include freespace or snapshot space usage ASMCMD acfsutil info fs <file system> gives detail information on each file syst em.

[root@rac1 grid]# cat CRS crsctl status resource -t crsctl status resource ora.DATA.dg -v crsctl status resource ora.DATA.dg -p|grep ACL srvctl status asm /sbin/mkfs -t acfs /dev/asm/acvsvol-97 /sbin/acfsutil registry -a -f /dev/asm/acvsvol-97 /u01/app/acfsdemo /sbin/mount.acfs -o all /bin/umount -t acfs -a acfsload start -s acfsutil info fs acfsutil registry -l #/etc/fstab /dev/asm/acfs_db1-152 0 0 -- Display all ACFS file systems -- Display registry contents

/u01/app/oracle/acfsmounts/acfs_db1

acfs

defaults

acfsutil size 6G /u01/app/acfsdemo $ ASMCMD volcreate -d DATA -s 10G volume1 ; Create volume .volume1. # mkfs -t acfs -b 4k /dev/asm/volume1 ; Create acfs file system # mount -t acfs /dev/asm/volume1 /oracle/cluster1/myacfs ; Mount file system # acfsutil registry -a /dev/asm/volume1 /oracle/cluster1/myacfs ; Write to regis try Provision capacity to expand volume1 and myacfs by 5GB: $ ASMCMD volresize DATA volume1 -s 5G asmcmd lsop asmcmd lsdsk asmcmd asmcmd asmcmd asmcmd asmcmd iostat lsdsk lsdsk -t lsdsk -p lsdsk -k $ /sbin/acfsutil registry -a -f \

/dev/asm/volume1-167 \ /u01/app/oracle/acfsdata/volume1 V$ASM_FILESYSTEM contains one row for every mounted file system. V$ASM_ACFSVOLUMES contains one row for every ACFS device file that is a member o f a mounted ACFS file system. ASMCMD volinfo -a provides similar volume information Includes unmounted file systems Does not include freespace or snapshot space usage ASMCMD acfsutil info fs <file system> gives detail information on each file syst em. [root@rac1 grid]# cat CRS1 $> asmca -silent -createDiskGroup -diskString '/dev/oracleasm/disks/*' -diskGroupName ACFS -diskList /dev/oracleasm/disks/ACFDISK1 /dev/oracleasm/disks/ACFDISK2, /dev/oracleasm/disks/ACFDISK3 -redundancy EXTERNAL -au_size 1 -sysAsmPassword oracle Likewise, you can create an EXT3 or OCFS2 file system based on the ASM volume o asmcmd lsdsk Path /dev/sdb1 /dev/sdc1 [grid@indylaptop ~]$ asmcmd lsdsk -t Create_Date Mount_Date Repair_Timer Path 08-FEB-11 08-FEB-11 0 /dev/sdb1 08-FEB-11 08-FEB-11 0 /dev/sdc1 [grid@indylaptop ~]$ asmcmd lsdsk -p Group_Num Disk_Num Incarn Mount_Stat Header_Stat h 1 0 3916146988 CACHED MEMBER v/sdb1 2 0 3916146995 CACHED MEMBER v/sdc1 [grid@indylaptop ~]$ asmcmd lsdsk -k Total_MB Free_MB OS_MB Name Failgroup Library edund Path 30718 19391 30718 DATA_0000 DATA_0000 System NKNOWN /dev/sdb1 20473 20422 20473 ACFS_0000 ACFS_0000 System NKNOWN /dev/sdc1

Mode_Stat State ONLINE ONLINE

Pat

NORMAL /de NORMAL /de

Label UDID Product R U U

Registering an ACFS Volume You may register an ACFS volume. Registering the volume enables the cluster-read y services daemon to mount the volume automatically at startup. The .a option sa ys add this volume to the registry. The .f option is used with the add option to allow replacement of an existing registry entry. You may register the volume be fore or after you mount the volume.

As the grid owner, register the volume: $ /sbin/acfsutil registry -a -f \ /dev/asm/volume1-167 \ /u01/app/oracle/acfsdata/volume1 In cluster configuration, ACFS drivers are automatically reloaded after reboot. In stand-alone server configuration: Oracle Restart cannot load ACFS drivers Root or administrator must load drivers Available in SQL*Plus connected to the ASM instance V$ASM_FILESYSTEM contains one row for every mounted file system. V$ASM_ACFSVOLUMES contains one row for every ACFS device file that is a member o f a mounted ACFS file system. ASMCMD volinfo .a provides similar volume information Includes unmounted file systems Does not include freespace or snapshot space usage ASMCMD acfsutil info fs <file system> gives detail information on each file syst em. [oracle@jin1 ~]$ asmcmd volset -G data --usagestring 'To Store temporary reports ' VOL_RPTS [oracle@jin1 ~]$ asmcmd volset -G data --mountpath 'We should mount this volume as /data/reports' VOL_RPTS [oracle@jin1 ~]$ asmcmd volinfo -G data VOL_RPTS Diskgroup Name: DATA Volume Name: VOL_RPTS Volume Device: /dev/asm/vol_rpts-340 State: ENABLED Size (MB): 5120 Resize Unit (MB): 256 Redundancy: UNPROT Stripe Columns: 4 Stripe Width (K): 128 Usage: To Store temporary reports Mountpath: We should mount this volume as /data/reports :wq Creating an ACFS Snapshot. To confirm whether any snapshots already exist for th is Oracle database home, I.ll issue the the acfsutil info fs command: [root@11gR2Base ~]# /sbin/acfsutil info fs /u01/app/oracle/acfsmounts/acfs_db1 ACFS Version: 11.2.0.1.0.0 flags: MountPoint,Available mount time: Sun May 9 16:51:36 2010 volumes: 1 total size: 6442450944 total free: 1058045952 primary volume: /dev/asm/acfs_db1-152 label: flags: Primary,Available,ADVM on-disk version: 39.0 allocation unit: 4096 major, minor: 252, 77825 size: 6442450944 free: 1058045952 ADVM diskgroup ACFS

ADVM resize increment: ADVM redundancy: ADVM stripe columns: ADVM stripe width: number of snapshots: 0 snapshot space usage: 0

268435456 unprotected 4 131072

This confirms there are no existing snapshots for this ACFS file system, so I.ll create one via the acfsutil snap create command: [root@11gR2Base ~]# /sbin/acfsutil snap create orahome0 /u01/app/oracle/acfsmoun ts/acfs_db1 acfsutil snap create: Snapshot operation is complete. After only a few seconds the snapshot creation is completed, I.ll confirm that b y once again issuing the acfsutil info fs command against that same file system: [root@11gR2Base ~]# /sbin/acfsutil info fs /u01/app/oracle/acfsmounts/acfs_db1 ACFS Version: 11.2.0.1.0.0 flags: MountPoint,Available mount time: Sun May 9 16:51:36 2010 volumes: 1 total size: 6442450944 total free: 991715328 primary volume: /dev/asm/acfs_db1-152 label: flags: Primary,Available,ADVM on-disk version: 39.0 allocation unit: 4096 major, minor: 252, 77825 size: 6442450944 free: 991715328 ADVM diskgroup ACFS ADVM resize increment: 268435456 ADVM redundancy: unprotected ADVM stripe columns: 4 ADVM stripe width: 131072 number of snapshots: 1 snapshot space usage: 22056960 [grid@indylaptop ~]$ asmcmd volinfo -a -G data Diskgroup Name: DATA Volume Name: ACVSVOL Volume Device: /dev/asm/acvsvol-97 State: ENABLED Size (MB): 6144 Resize Unit (MB): 256 Redundancy: UNPROT Stripe Columns: 4 Stripe Width (K): 128 Usage: ACFS Mountpath: /u01/app/acfsdemo Volume Name: INDYVOL Volume Device: /dev/asm/indyvol-97 State: ENABLED Size (MB): 5120

Resize Unit (MB): 256 Redundancy: UNPROT Stripe Columns: 4 Stripe Width (K): 128 Usage: ACFS Mountpath: /u01/app/indydemo Volume Name: SMALLVOL Volume Device: /dev/asm/smallvol-97 State: ENABLED Size (MB): 256 Resize Unit (MB): 256 Redundancy: UNPROT Stripe Columns: 4 Stripe Width (K): 128 Usage: ACFS Mountpath: /u01/app/smallvol [grid@indylaptop ~]$ asmcmd voldelete -G data invalid volume name "/dev/asm/acvsvol-97" [grid@indylaptop ~]$ asmcmd voldelete -G DATA [grid@indylaptop ~]$ asmcmd voldelete -G DATA [grid@indylaptop ~]$ asmcmd voldelete -G DATA /dev/asm/acvsvol-97 ACVSVOL INDYVOL SMALLVOL

Potrebbero piacerti anche