分类: Oracle
2009-09-04 18:20:35
虚拟机里的设置 [rac2@root ~]# cat /etc/ietd.conf | grep -v "#" Target iqn.2009-06.rhgfs:storage Lun 0 Path=/dev/sdc1,Type=fileio [rac2@root ~]# [rac2@root ~]# /etc/init.d/iscsi-target start 客户端添加以下内容到 /etc/iscsi/iscsid.conf里即可 DiscoveryAddress = 192.168.228.149 Continuous = yes [root@max ~]# /etc/init.d/iscsid start |
[root@max ~]# fdisk -l Disk /dev/sda: 80.0 GB, 80026361856 bytes 255 heads, 63 sectors/track, 9729 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 * 1 2550 20482843+ 83 Linux /dev/sda2 2551 2681 1052257+ 82 Linux swap / Solaris /dev/sda3 2682 5721 24418800 83 Linux /dev/sda4 5722 9729 32194260 83 Linux Disk /dev/sdb: 2147 MB, 2147411968 bytes 67 heads, 62 sectors/track, 1009 cylinders Units = cylinders of 4154 * 512 = 2126848 bytes |
[root@max ~]# fdisk -l Disk /dev/sda: 80.0 GB, 80026361856 bytes 255 heads, 63 sectors/track, 9729 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 * 1 2550 20482843+ 83 Linux /dev/sda2 2551 2681 1052257+ 82 Linux swap / Solaris /dev/sda3 2682 5721 24418800 83 Linux /dev/sda4 5722 9729 32194260 83 Linux Disk /dev/sdb: 2147 MB, 2147411968 bytes 67 heads, 62 sectors/track, 1009 cylinders Units = cylinders of 4154 * 512 = 2126848 bytes Device Boot Start End Blocks Id System /dev/sdb1 1 6 12431 83 Linux /dev/sdb2 7 12 12462 83 Linux /dev/sdb3 13 18 12462 83 Linux /dev/sdb4 19 1009 2058307 5 Extended /dev/sdb5 19 43 51894 83 Linux /dev/sdb6 44 68 51894 83 Linux /dev/sdb7 69 93 51894 83 Linux /dev/sdb8 94 376 587760 83 Linux /dev/sdb9 377 518 294903 83 Linux /dev/sdb10 519 566 99665 83 Linux /dev/sdb11 567 572 12431 83 Linux /dev/sdb12 573 578 12431 83 Linux /dev/sdb13 579 1009 895156 83 Linux [root@max ~]# fdisk -l Disk /dev/sda: 80.0 GB, 80026361856 bytes 255 heads, 63 sectors/track, 9729 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 * 1 2550 20482843+ 83 Linux /dev/sda2 2551 2681 1052257+ 82 Linux swap / Solaris /dev/sda3 2682 5721 24418800 83 Linux /dev/sda4 5722 9729 32194260 83 Linux Disk /dev/sdb: 2147 MB, 2147411968 bytes 67 heads, 62 sectors/track, 1009 cylinders Units = cylinders of 4154 * 512 = 2126848 bytes Device Boot Start End Blocks Id System /dev/sdb1 1 6 12431 83 Linux /dev/sdb2 7 12 12462 83 Linux /dev/sdb3 13 18 12462 83 Linux /dev/sdb4 19 1009 2058307 5 Extended /dev/sdb5 19 43 51894 83 Linux /dev/sdb6 44 68 51894 83 Linux /dev/sdb7 69 93 51894 83 Linux /dev/sdb8 94 376 587760 83 Linux /dev/sdb9 377 518 294903 83 Linux /dev/sdb10 519 566 99665 83 Linux /dev/sdb11 567 572 12431 83 Linux /dev/sdb12 573 578 12431 83 Linux /dev/sdb13 579 1009 895156 83 Linux |
[root@max ~]# raw -qa /dev/raw/raw1: bound to major 8, minor 17 /dev/raw/raw2: bound to major 8, minor 18 /dev/raw/raw3: bound to major 8, minor 19 /dev/raw/raw4: bound to major 8, minor 20 /dev/raw/raw5: bound to major 8, minor 21 /dev/raw/raw6: bound to major 8, minor 22 /dev/raw/raw7: bound to major 8, minor 23 /dev/raw/raw8: bound to major 8, minor 24 /dev/raw/raw9: bound to major 8, minor 25 /dev/raw/raw10: bound to major 8, minor 26 /dev/raw/raw11: bound to major 8, minor 27 /dev/raw/raw12: bound to major 8, minor 28 /dev/raw/raw13: bound to major 8, minor 29 注意修改其权限 为 oracle 用户 dba 组 |
[root@max ~]# cat /tmp/raw.txt control1=/dev/raw/raw1 control2=/dev/raw/raw2 control3=/dev/raw/raw3 redo1_1=/dev/raw/raw5 redo2_1=/dev/raw/raw6 redo3_1=/dev/raw/raw7 system=/dev/raw/raw8 sysaux=/dev/raw/raw9 temp=/dev/raw/raw10 users=/dev/raw/raw11 undotbs1=/dev/raw/raw13 |
[root@max ~]# cd /opt/oracle/oradata/max [root@max max]# ls [root@max max]# ln -s /dev/raw/raw1 control1.ctl [root@max max]# ln -s /dev/raw/raw2 control1.ct2 [root@max max]# ln -s /dev/raw/raw3 control1.ct3 [root@max max]# ln -s /dev/raw/raw5 redo01.log [root@max max]# ln -s /dev/raw/raw6 redo02.log [root@max max]# ln -s /dev/raw/raw7 redo03.log [root@max max]# ln -s /dev/raw/raw8 system01.dbf [root@max max]# ln -s /dev/raw/raw9 sysaux01.dbf [root@max max]# ln -s /dev/raw/raw10 temp01.dbf [root@max max]# ln -s /dev/raw/raw11 users01.dbf [root@max max]# ln -s /dev/raw/raw13 undotbs01.dbf [root@max max]# ls control1.ct2 control1.ctl redo02.log sysaux01.dbf temp01.dbf users01.dbf control1.ct3 redo01.log redo03.log system01.dbf undotbs01.dbf [root@max max]# ll 总计 0 lrwxrwxrwx 1 root root 13 09-04 16:23 control1.ct2 -> /dev/raw/raw2 lrwxrwxrwx 1 root root 13 09-04 16:23 control1.ct3 -> /dev/raw/raw3 lrwxrwxrwx 1 root root 13 09-04 16:23 control1.ctl -> /dev/raw/raw1 lrwxrwxrwx 1 root root 13 09-04 16:24 redo01.log -> /dev/raw/raw5 lrwxrwxrwx 1 root root 13 09-04 16:24 redo02.log -> /dev/raw/raw6 lrwxrwxrwx 1 root root 13 09-04 16:24 redo03.log -> /dev/raw/raw7 lrwxrwxrwx 1 root root 13 09-04 16:25 sysaux01.dbf -> /dev/raw/raw9 lrwxrwxrwx 1 root root 13 09-04 16:24 system01.dbf -> /dev/raw/raw8 lrwxrwxrwx 1 root root 14 09-04 16:25 temp01.dbf -> /dev/raw/raw10 lrwxrwxrwx 1 root root 14 09-04 16:25 undotbs01.dbf -> /dev/raw/raw13 lrwxrwxrwx 1 root root 14 09-04 16:25 users01.dbf -> /dev/raw/raw11 |
SQL> select instance_name,host_name,status,logins from v$instance 2 ; INSTANCE_NAME HOST_NAME STATUS -------------------------------- -------------------------------------------------------------------------------------------------------------------------------- ------------------------ LOGINS -------------------- max max.com OPEN ALLOWED SQL> select file_name,tablespace_name,bytes/1024/1024 M from dba_data_files; FILE_NAME TABLESPACE_NAME M -------------------- -------------------- ---------- /dev/raw/raw11 USERS 5 /dev/raw/raw9 SYSAUX 230 /dev/raw/raw13 UNDOTBS1 25 /dev/raw/raw8 SYSTEM 480 SQL> select * from database_properties where property_name='DEFAULT_TEMP_TABLESPACE'; PROPERTY_NAME ------------------------------------------------------------ PROPERTY_VALUE -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- DESCRIPTION -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- DEFAULT_TEMP_TABLESPACE TEMP Name of default temporary tablespace |