[root@wallet03 ~]# yum install -y scsi-target-utils [root@wallet03 ~]# vi /etc/tgt/targets.conf <tar
[root@wallet03 ~]# yum install -y scsi-target-utils
[root@wallet03 ~]# vi /etc/tgt/targets.conf
<target iqn.2019-02.com.gscaifu:disk01>
bacwallet-store /dev/sdb
initiator-address 192.168.40.0/24
incominguser gscf gscf@1234
write-cache off
</target>
<target iqn.2019-02.com.gscaifu:disk02>
bacwallet-store /dev/sdc
initiator-address 192.168.40.0/24
incominguser gscf gscf@1234
write-cache off
</target>
<target iqn.2019-02.com.gscaifu:disk03>
bacwallet-store /dev/sdd
initiator-address 192.168.40.0/24
incominguser gscf gscf@1234
write-cache off
</target>
<target iqn.2019-02.com.gscaifu:disk04>
bacwallet-store /dev/sde
initiator-address 192.168.40.0/24
incominguser gscf gscf@1234
write-cache off
</target>
<target iqn.2019-02.com.gscaifu:disk05>
bacwallet-store /dev/sdf
initiator-address 192.168.40.0/24
incominguser gscf gscf@1234
write-cache off
</target>
<target iqn.2019-02.com.gscaifu:disk06>
bacwallet-store /dev/sdg
initiator-address 192.168.40.0/24
incominguser gscf gscf@1234
write-cache off
</target>
<target iqn.2019-02.com.gscaifu:disk07>
bacwallet-store /dev/sdh
initiator-address 192.168.40.0/24
incominguser gscf gscf@1234
write-cache off
</target>
<target iqn.2019-02.com.gscaifu:disk08>
bacwallet-store /dev/sdi
initiator-address 192.168.40.0/24
incominguser gscf gscf@1234
write-cache off
</target>
<target iqn.2019-02.com.gscaifu:disk09>
bacwallet-store /dev/sdj
initiator-address 192.168.40.0/24
incominguser gscf gscf@1234
write-cache off
</target>
<target iqn.2019-02.com.gscaifu:disk10>
bacwallet-store /dev/sdk
initiator-address 192.168.40.0/24
incominguser gscf gscf@1234
write-cache off
</target>
[root@wallet03 ~]# service tgtd start
Starting SCSI target daemon: [ OK ]
[root@wallet03 ~]# service tgtd status
tgtd (pid 1599 1598) is running...
[root@wallet03 ~]# netstat -tuNLP | grep tgtd
tcp 0 0 0.0.0.0:3260 0.0.0.0:* LISTEN 1879/tgtd
tcp 0 0 :::3260 :::* LISTEN 1879/tgtd
[root@wallet01 ~]# yum install -y iscsi-initiator-utils
[root@wallet01 ~]# vim /etc/iscsi/iscsid.conf
node.session.auth.authmethod = CHAP
node.session.auth.username = gscf
node.session.auth.passWord = gscf@1234
[root@wallet01 ~]# iscsiadm -m discovery -t sendtargets -p 192.168.40.36
Starting iscsid: [ OK ]
192.168.40.36:3260,1 iqn.2019-02.com.gscaifu:disk01
192.168.40.36:3260,1 iqn.2019-02.com.gscaifu:disk02
192.168.40.36:3260,1 iqn.2019-02.com.gscaifu:disk03
192.168.40.36:3260,1 iqn.2019-02.com.gscaifu:disk04
192.168.40.36:3260,1 iqn.2019-02.com.gscaifu:disk05
192.168.40.36:3260,1 iqn.2019-02.com.gscaifu:disk06
192.168.40.36:3260,1 iqn.2019-02.com.gscaifu:disk07
192.168.40.36:3260,1 iqn.2019-02.com.gscaifu:disk08
192.168.40.36:3260,1 iqn.2019-02.com.gscaifu:disk09
192.168.40.36:3260,1 iqn.2019-02.com.gscaifu:disk10
[root@wallet01 ~]# iscsiadm -m node -T iqn.2019-02.com.gscaifu:disk01 --login
Logging in to [iface: default, target: iqn.2019-02.com.gscaifu:disk01, portal: 192.168.40.36,3260] (multiple)
Login to [iface: default, target: iqn.2019-02.com.gscaifu:disk01, portal: 192.168.40.36,3260] successful.
[root@wallet01 ~]# iscsiadm -m node -T iqn.2019-02.com.gscaifu:disk02 --login
Logging in to [iface: default, target: iqn.2019-02.com.gscaifu:disk02, portal: 192.168.40.36,3260] (multiple)
Login to [iface: default, target: iqn.2019-02.com.gscaifu:disk02, portal: 192.168.40.36,3260] successful.
[root@wallet01 ~]# iscsiadm -m node -T iqn.2019-02.com.gscaifu:disk03 --login
Logging in to [iface: default, target: iqn.2019-02.com.gscaifu:disk03, portal: 192.168.40.36,3260] (multiple)
Login to [iface: default, target: iqn.2019-02.com.gscaifu:disk03, portal: 192.168.40.36,3260] successful.
[root@wallet01 ~]# iscsiadm -m node -T iqn.2019-02.com.gscaifu:disk04 --login
Logging in to [iface: default, target: iqn.2019-02.com.gscaifu:disk04, portal: 192.168.40.36,3260] (multiple)
Login to [iface: default, target: iqn.2019-02.com.gscaifu:disk04, portal: 192.168.40.36,3260] successful.
[root@wallet01 ~]# iscsiadm -m node -T iqn.2019-02.com.gscaifu:disk05 --login
Logging in to [iface: default, target: iqn.2019-02.com.gscaifu:disk05, portal: 192.168.40.36,3260] (multiple)
Login to [iface: default, target: iqn.2019-02.com.gscaifu:disk05, portal: 192.168.40.36,3260] successful.
[root@wallet01 ~]# iscsiadm -m node -T iqn.2019-02.com.gscaifu:disk06 --login
Logging in to [iface: default, target: iqn.2019-02.com.gscaifu:disk06, portal: 192.168.40.36,3260] (multiple)
Login to [iface: default, target: iqn.2019-02.com.gscaifu:disk06, portal: 192.168.40.36,3260] successful.
[root@wallet01 ~]# iscsiadm -m node -T iqn.2019-02.com.gscaifu:disk07 --login
Logging in to [iface: default, target: iqn.2019-02.com.gscaifu:disk07, portal: 192.168.40.36,3260] (multiple)
Login to [iface: default, target: iqn.2019-02.com.gscaifu:disk07, portal: 192.168.40.36,3260] successful.
[root@wallet01 ~]# iscsiadm -m node -T iqn.2019-02.com.gscaifu:disk08 --login
Logging in to [iface: default, target: iqn.2019-02.com.gscaifu:disk08, portal: 192.168.40.36,3260] (multiple)
Login to [iface: default, target: iqn.2019-02.com.gscaifu:disk08, portal: 192.168.40.36,3260] successful.
[root@wallet01 ~]# iscsiadm -m node -T iqn.2019-02.com.gscaifu:disk09 --login
Logging in to [iface: default, target: iqn.2019-02.com.gscaifu:disk09, portal: 192.168.40.36,3260] (multiple)
Login to [iface: default, target: iqn.2019-02.com.gscaifu:disk09, portal: 192.168.40.36,3260] successful.
[root@wallet01 ~]# iscsiadm -m node -T iqn.2019-02.com.gscaifu:disk10 --login
Logging in to [iface: default, target: iqn.2019-02.com.gscaifu:disk10, portal: 192.168.40.36,3260] (multiple)
Login to [iface: default, target: iqn.2019-02.com.gscaifu:disk10, portal: 192.168.40.36,3260] successful.
[root@wallet02 ~]# yum install -y iscsi-initiator-utils
[root@wallet02 ~]# vim /etc/iscsi/iscsid.conf
node.session.auth.authmethod = CHAP
node.session.auth.username = gscf
node.session.auth.password = gscf@1234
[root@wallet02 ~]# iscsiadm -m discovery -t sendtargets -p 192.168.40.36
Starting iscsid: [ OK ]
192.168.40.36:3260,1 iqn.2019-02.com.gscaifu:disk01
192.168.40.36:3260,1 iqn.2019-02.com.gscaifu:disk02
192.168.40.36:3260,1 iqn.2019-02.com.gscaifu:disk03
192.168.40.36:3260,1 iqn.2019-02.com.gscaifu:disk04
192.168.40.36:3260,1 iqn.2019-02.com.gscaifu:disk05
192.168.40.36:3260,1 iqn.2019-02.com.gscaifu:disk06
192.168.40.36:3260,1 iqn.2019-02.com.gscaifu:disk07
192.168.40.36:3260,1 iqn.2019-02.com.gscaifu:disk08
192.168.40.36:3260,1 iqn.2019-02.com.gscaifu:disk09
192.168.40.36:3260,1 iqn.2019-02.com.gscaifu:disk10
[root@wallet02 ~]# iscsiadm -m node -T iqn.2019-02.com.gscaifu:disk01 --login
Logging in to [iface: default, target: iqn.2019-02.com.gscaifu:disk01, portal: 192.168.40.36,3260] (multiple)
Login to [iface: default, target: iqn.2019-02.com.gscaifu:disk01, portal: 192.168.40.36,3260] successful.
[root@wallet02 ~]# iscsiadm -m node -T iqn.2019-02.com.gscaifu:disk02 --login
Logging in to [iface: default, target: iqn.2019-02.com.gscaifu:disk02, portal: 192.168.40.36,3260] (multiple)
Login to [iface: default, target: iqn.2019-02.com.gscaifu:disk02, portal: 192.168.40.36,3260] successful.
[root@wallet02 ~]# iscsiadm -m node -T iqn.2019-02.com.gscaifu:disk03 --login
Logging in to [iface: default, target: iqn.2019-02.com.gscaifu:disk03, portal: 192.168.40.36,3260] (multiple)
Login to [iface: default, target: iqn.2019-02.com.gscaifu:disk03, portal: 192.168.40.36,3260] successful.
[root@wallet02 ~]# iscsiadm -m node -T iqn.2019-02.com.gscaifu:disk04 --login
Logging in to [iface: default, target: iqn.2019-02.com.gscaifu:disk04, portal: 192.168.40.36,3260] (multiple)
Login to [iface: default, target: iqn.2019-02.com.gscaifu:disk04, portal: 192.168.40.36,3260] successful.
[root@wallet02 ~]# iscsiadm -m node -T iqn.2019-02.com.gscaifu:disk05 --login
Logging in to [iface: default, target: iqn.2019-02.com.gscaifu:disk05, portal: 192.168.40.36,3260] (multiple)
Login to [iface: default, target: iqn.2019-02.com.gscaifu:disk05, portal: 192.168.40.36,3260] successful.
[root@wallet02 ~]# iscsiadm -m node -T iqn.2019-02.com.gscaifu:disk06 --login
Logging in to [iface: default, target: iqn.2019-02.com.gscaifu:disk06, portal: 192.168.40.36,3260] (multiple)
Login to [iface: default, target: iqn.2019-02.com.gscaifu:disk06, portal: 192.168.40.36,3260] successful.
[root@wallet02 ~]# iscsiadm -m node -T iqn.2019-02.com.gscaifu:disk07 --login
Logging in to [iface: default, target: iqn.2019-02.com.gscaifu:disk07, portal: 192.168.40.36,3260] (multiple)
Login to [iface: default, target: iqn.2019-02.com.gscaifu:disk07, portal: 192.168.40.36,3260] successful.
[root@wallet02 ~]# iscsiadm -m node -T iqn.2019-02.com.gscaifu:disk08 --login
Logging in to [iface: default, target: iqn.2019-02.com.gscaifu:disk08, portal: 192.168.40.36,3260] (multiple)
Login to [iface: default, target: iqn.2019-02.com.gscaifu:disk08, portal: 192.168.40.36,3260] successful.
[root@wallet02 ~]# iscsiadm -m node -T iqn.2019-02.com.gscaifu:disk09 --login
Logging in to [iface: default, target: iqn.2019-02.com.gscaifu:disk09, portal: 192.168.40.36,3260] (multiple)
Login to [iface: default, target: iqn.2019-02.com.gscaifu:disk09, portal: 192.168.40.36,3260] successful.
[root@wallet02 ~]# iscsiadm -m node -T iqn.2019-02.com.gscaifu:disk10 --login
Logging in to [iface: default, target: iqn.2019-02.com.gscaifu:disk10, portal: 192.168.40.36,3260] (multiple)
Login to [iface: default, target: iqn.2019-02.com.gscaifu:disk10, portal: 192.168.40.36,3260] successful.
[root@wallet01 ~]# groupadd -g 1200 dba
[root@wallet01 ~]# groupadd -g 1201 oinstall
[root@wallet01 ~]# groupadd -g 1202 asmadmin
[root@wallet01 ~]# groupadd -g 1203 asmdba
[root@wallet01 ~]# useradd -u 1100 -g oinstall -G asmadmin,asmdba,dba grid
[root@wallet01 ~]# echo grid | passwd --stdin grid
Changing password for user grid.
passwd: all authentication tokens updated successfully.
[root@wallet01 ~]# id grid
uid=1100(grid) gid=1201(oinstall) groups=1201(oinstall),1200(dba),1202(asmadmin),1203(asmdba)
[root@wallet01 ~]# yum install -y kmod-oracleasm*
[root@wallet01 ~]# rpm -ivh oracleasmlib-2.0.4-1.el6.x86_64.rpm
[root@wallet01 ~]# rpm -ivh oracleasm-support-2.1.8-1.el6.x86_64.rpm
[root@wallet01 ~]# /usr/sbin/oracleasm configure -i
Configuring the Oracle ASM library driver.
This will configure the on-boot properties of the Oracle ASM library
driver. The following questions will determine whether the driver is
loaded on boot and what permissions it will have. The current values
will be shown in brackets ('[]'). Hitting <ENTER> without typing an
answer will keep that current value. Ctrl-C will abort.
Default user to own the driver interface []: grid
Default group to own the driver interface []: asmadmin
Start Oracle ASM library driver on boot (y/n) [n]: y
Scan for Oracle ASM disks on boot (y/n) [y]: y
Writing Oracle ASM library driver configuration: done
[root@wallet01 ~]# /usr/sbin/oracleasm init
Creating /dev/oracleasm mount point: /dev/oracleasm
Loading module "oracleasm": oracleasm
Configuring "oracleasm" to use device physical block size
Mounting ASMlib driver filesystem: /dev/oracleasm
[root@wallet01 ~]# /usr/sbin/oracleasm createdisk disk1 /dev/sdb1
Writing disk header: done
Instantiating disk: done
[root@wallet01 ~]# /usr/sbin/oracleasm createdisk disk2 /dev/sdc1
Writing disk header: done
Instantiating disk: done
[root@wallet01 ~]# /usr/sbin/oracleasm createdisk disk3 /dev/sdd1
Writing disk header: done
Instantiating disk: done
[root@wallet01 ~]# /usr/sbin/oracleasm createdisk disk4 /dev/sde1
Writing disk header: done
Instantiating disk: done
[root@wallet01 ~]# /usr/sbin/oracleasm createdisk disk5 /dev/sdf1
Writing disk header: done
Instantiating disk: done
[root@wallet01 ~]# /usr/sbin/oracleasm createdisk disk6 /dev/sdg1
Writing disk header: done
Instantiating disk: done
[root@wallet01 ~]# /usr/sbin/oracleasm createdisk disk7 /dev/sdh2
Writing disk header: done
Instantiating disk: done
[root@wallet01 ~]# /usr/sbin/oracleasm createdisk disk8 /dev/sdi1
Writing disk header: done
Instantiating disk: done
[root@wallet01 ~]# /usr/sbin/oracleasm createdisk disk9 /dev/sdj1
Writing disk header: done
Instantiating disk: done
[root@wallet01 ~]# /usr/sbin/oracleasm createdisk disk10 /dev/sdk1
Writing disk header: done
Instantiating disk: done
[root@wallet01 ~]# /usr/sbin/oracleasm scandisks
Reloading disk partitions: done
Cleaning any stale ASM disks...
Scanning system for ASM disks...
[root@wallet01 ~]# /usr/sbin/oracleasm listdisks
DISK1
DISK10
DISK2
DISK3
DISK4
DISK5
DISK6
DISK7
DISK8
DISK9
[root@wallet02 ~]# groupadd -g 1200 dba
[root@wallet02 ~]# groupadd -g 1201 oinstall
[root@wallet02 ~]# groupadd -g 1202 asmadmin
[root@wallet02 ~]# groupadd -g 1203 asmdba
[root@wallet02 ~]# useradd -u 1100 -g oinstall -G asmadmin,asmdba,dba grid
[root@wallet02 ~]# echo grid | passwd --stdin grid
Changing password for user grid.
passwd: all authentication tokens updated successfully.
[root@wallet02 ~]# id grid
uid=1100(grid) gid=1201(oinstall) groups=1201(oinstall),1200(dba),1202(asmadmin),1203(asmdba)
[root@wallet02 ~]# yum install -y kmod-oracleasm*
[root@wallet02 ~]# rpm -ivh oracleasmlib-2.0.4-1.el6.x86_64.rpm
[root@wallet02 ~]# rpm -ivh oracleasm-support-2.1.8-1.el6.x86_64.rpm
[root@wallet02 ~]# /usr/sbin/oracleasm configure -i
Configuring the Oracle ASM library driver.
This will configure the on-boot properties of the Oracle ASM library
driver. The following questions will determine whether the driver is
loaded on boot and what permissions it will have. The current values
will be shown in brackets ('[]'). Hitting <ENTER> without typing an
answer will keep that current value. Ctrl-C will abort.
Default user to own the driver interface []: grid
Default group to own the driver interface []: asmadmin
Start Oracle ASM library driver on boot (y/n) [n]: y
Scan for Oracle ASM disks on boot (y/n) [y]: y
Writing Oracle ASM library driver configuration: done
[root@wallet02 ~]# /usr/sbin/oracleasm init
Creating /dev/oracleasm mount point: /dev/oracleasm
Loading module "oracleasm": oracleasm
Configuring "oracleasm" to use device physical block size
Mounting ASMlib driver filesystem: /dev/oracleasm
[root@wallet02 ~]# /usr/sbin/oracleasm scandisks
Reloading disk partitions: done
Cleaning any stale ASM disks...
Scanning system for ASM disks...
Instantiating disk "DISK1"
Instantiating disk "DISK5"
Instantiating disk "DISK4"
Instantiating disk "DISK10"
Instantiating disk "DISK6"
Instantiating disk "DISK8"
Instantiating disk "DISK3"
Instantiating disk "DISK2"
Instantiating disk "DISK7"
Instantiating disk "DISK9"
[root@wallet02 ~]# /usr/sbin/oracleasm listdisks
DISK1
DISK10
DISK2
DISK3
DISK4
DISK5
DISK6
DISK7
DISK8
DISK9
--结束END--
本文标题: 【Oracle Database】Oracle RAC(一):共享存储
本文链接: https://lsjlt.com/news/39322.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
2024-10-23
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0