查看: 585|回复: 0

[原创] Oracle VM sparc 3.4 config and solaris setup

[复制链接]
论坛徽章:
21
娜美
日期:2017-06-26 15:18:15火眼金睛
日期:2018-04-30 22:00:00目光如炬
日期:2018-07-29 22:00:00火眼金睛
日期:2018-08-31 22:00:00目光如炬
日期:2018-09-02 22:00:00目光如炬
日期:2018-09-16 22:00:01火眼金睛
日期:2018-09-30 22:00:00目光如炬
日期:2018-10-14 22:00:00火眼金睛
日期:2018-11-30 22:00:01目光如炬
日期:2018-04-29 22:00:00
发表于 2019-1-9 15:54 | 显示全部楼层 |阅读模式


       Oracle VM sparc 3.4 config  and  solaris setup  






作者简介:
----------------------------------------------------------------------
@ 孙显鹏,海天起点oracle技术专家,十年从业经验
@ 精通oracle内部原理,擅长调优和解决疑难问题
@ 致力于帮助客户解决生产中的问题,提高生产效率。
@ 爱好:书法,周易,中医。微信:sunyunyi_sun
@ 易曰:精义入神,以致用也!
@ 调优乃燮理阴阳何其难也!
----------------------------------------------------------------------



primary ctl config:

  ldm add-vcc port-range=5000-5100 primary-vcc0 primary
  ldm add-vds primary-vds0 primary
  ldm add-vsw net-dev=net0 primary-vsw0 primary
  ldm add-vsw net-dev=net1 primary-vsw1 primary
  ldm add-vsw net-dev=net2 primary-vsw2 primary
  ldm add-vsw net-dev=net3 primary-vsw3 primary
  svcs -a |grep ldom

  ldm list-netdev  primary

  ldm set-core 2 primary
  ldm set-memory 16G primary

  ldm remove-io pci_1 primary
  ldm remove-io pci_3 primary
  ldm set-io iov=on pci_4

  ldm create-vf -n 16 /SYS/MB/PCIE1/IOVFC.PF0
Created new vf: /SYS/MB/PCIE1/IOVFC.PF0.VF0
Created new vf: /SYS/MB/PCIE1/IOVFC.PF0.VF1
...
  ldm create-vf -n 16 /SYS/MB/PCIE1/IOVFC.PF1
Created new vf: /SYS/MB/PCIE1/IOVFC.PF1.VF0
Created new vf: /SYS/MB/PCIE1/IOVFC.PF1.VF1
...

  ldm add-spconfig initial
  ldm list-spconfig
factory-default
initial [current]

  svcs -a |grep vntsd
disabled       22:53:45 svc:/ldoms/vntsd:default

  svcadm enable  svc:/ldoms/vntsd:default

  svcs -a |grep vntsd
online         23:00:57 svc:/ldoms/vntsd:default

  ldm add-domain ldg1
  ldm add-domain ldg2
  ldm add-domain ldg3
  ldm add-domain ldg4
  ldm add-domain ldg5
  ldm add-domain ldg6
  ldm add-domain ldg7
  ldm add-domain ldg8


  ldm set-core 1 ldg1
  ldm set-core 6 ldg2
  ldm set-core 5 ldg3
  ldm set-core 5 ldg4
  ldm set-core 2 ldg5
  ldm set-core 2 ldg6
  ldm set-core 2 ldg7
  ldm set-core 2 ldg8

  ldm add-memory 8G ldg1
  ldm add-memory 64G ldg2
  ldm add-memory 64G ldg3
  ldm add-memory 64G ldg4
  ldm add-memory 48G ldg5
  ldm add-memory 48G ldg6
  ldm add-memory 48G ldg7
  ldm add-memory 48G ldg8

  ldm add-vnet vnet0 primary-vsw0 ldg1
  ldm add-vnet vnet1 primary-vsw1 ldg1
  ldm add-vnet vnet2 primary-vsw2 ldg1
  ldm add-vnet vnet3 primary-vsw3 ldg1

  ldm add-vnet vnet0 primary-vsw0 ldg2
  ldm add-vnet vnet1 primary-vsw1 ldg2
  ldm add-vnet vnet2 primary-vsw2 ldg2
  ldm add-vnet vnet3 primary-vsw3 ldg2
...


增加PCIe bus,使用SR-IOV 需要设置bus
  ldm add-io pci_1 ldg1
  ldm add-io pci_3 ldg2

增加PCIe SR-IOV  VF-----配置FC,这里不配置net和IB
  ldm add-io /SYS/MB/PCIE1/IOVFC.PF0.VF0 ldg3
  ldm add-io /SYS/MB/PCIE1/IOVFC.PF1.VF0 ldg4

  ldm add-spconfig domains
  ldm list-spconfig
factory-default
initial
domains [current]
  shutdown -y -i6 -g0  --重启primary-domain

svcs ilomconfig-interconnect
ilomconfig list interconnect
ldm list-spconfig


iso 文件:
# lofiadm -a /disk1/software/s11.3/SRU13.4.0/sol-11_3_13_4_0-text-sparc1.iso /dev/lofi/1

lofiadm -a /disk1/software/s11.3/SRU6.5.0/sol-11_3_6_5_0-text-sparc1.iso /dev/lofi/2
lofiadm -a /disk1/software/s11.3/SRU6.5.0/sol-11_3_6_5_0-text-sparc2.iso /dev/lofi/3
lofiadm -a /disk1/software/s11.3/SRU6.5.0/sol-11_3_6_5_0-text-sparc3.iso /dev/lofi/4
lofiadm -a /disk1/software/s11.3/SRU6.5.0/sol-11_3_6_5_0-text-sparc4.iso /dev/lofi/5
......

  ldm add-vdsdev /dev/lofi/1 iso_vol_ldg1@primary-vds0
  ldm add-vdsdev /dev/lofi/2 iso_vol_ldg2@primary-vds0
  ldm add-vdsdev /dev/lofi/3 iso_vol_ldg3@primary-vds0
  ldm add-vdsdev /dev/lofi/4 iso_vol_ldg4@primary-vds0
  ldm add-vdsdev /dev/lofi/5 iso_vol_ldg5@primary-vds0
  ldm add-vdsdev /dev/lofi/6 iso_vol_ldg6@primary-vds0
  ldm add-vdsdev /dev/lofi/7 iso_vol_ldg7@primary-vds0
  ldm add-vdsdev /dev/lofi/8 iso_vol_ldg8@primary-vds0


  ldm add-vdisk vdisk_iso iso_vol_ldg1@primary-vds0 ldg1
  ldm add-vdisk vdisk_iso iso_vol_ldg2@primary-vds0 ldg2
  ldm add-vdisk vdisk_iso iso_vol_ldg3@primary-vds0 ldg3
  ldm add-vdisk vdisk_iso iso_vol_ldg4@primary-vds0 ldg4
  ldm add-vdisk vdisk_iso iso_vol_ldg5@primary-vds0 ldg5
  ldm add-vdisk vdisk_iso iso_vol_ldg6@primary-vds0 ldg6
  ldm add-vdisk vdisk_iso iso_vol_ldg7@primary-vds0 ldg7
  ldm add-vdisk vdisk_iso iso_vol_ldg8@primary-vds0 ldg8


  ldm set-var auto-boot\?=false ldg1
  ldm set-var auto-boot\?=false ldg2
  ldm set-var auto-boot\?=false ldg3
  ldm set-var auto-boot\?=false ldg4
  ldm set-var auto-boot\?=false ldg5
  ldm set-var auto-boot\?=false ldg6
  ldm set-var auto-boot\?=false ldg7
  ldm set-var auto-boot\?=false ldg8


  ldm set-var boot-device=disk0 ldg1
  ldm set-var boot-device=disk0 ldg2
  ldm set-var boot-device=disk0 ldg3
  ldm set-var boot-device=disk0 ldg4
  ldm set-var boot-device=disk0 ldg5
  ldm set-var boot-device=disk0 ldg6
  ldm set-var boot-device=disk0 ldg7
  ldm set-var boot-device=disk0 ldg8


ldm list-services primary


setup solaris for ldomain:

  telnet localhost 5001
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Connecting to console "ldg1" in group "ldg1" ....
Press ~? for control options ..
{0} ok banner
SPARC S7-2, No Keyboard
Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved.
OpenBoot 4.40.3, 8.0000 GB memory installed, Serial #83401648.
Ethernet address 0:14:4f:f8:9b:b0, Host ID: 84f89bb0.

{0} ok devalias
disk1                    /virtual-devices@100/channel-devices@200/disk@2
disk0                    /virtual-devices@100/channel-devices@200/disk@1
vdisk_iso                /virtual-devices@100/channel-devices@200/disk@0
vnet3                    /virtual-devices@100/channel-devices@200/network@3
vnet2                    /virtual-devices@100/channel-devices@200/network@2
vnet1                    /virtual-devices@100/channel-devices@200/network@1
vnet0                    /virtual-devices@100/channel-devices@200/network@0
net                      /virtual-devices@100/channel-devices@200/network@0
disk                     /virtual-devices@100/channel-devices@200/disk@0
virtual-console          /virtual-devices/console@1
name                     aliases

{0} ok boot vdisk_iso:f
Boot device: /virtual-devices@100/channel-devices@200/disk@0:f  File and args:
-
WARNING: Can not verify signature on unsupported binary format

WARNING: Signature verification of boot-archive bootblk failed
SunOS Release 5.11 Version 11.3 64-bit
Copyright (c) 1983, 2016, Oracle and/or its affiliates. All rights reserved.
Remounting root read/write
Probing for device nodes ...
\



SPARC S7-1, No Keyboard
Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
OpenBoot 4.38.2, 128.0000 GB memory available, Serial #83429575.
Ethernet address 0:14:4f:f9:8:c7, Host ID: 84f908c7.

Boot device: disk0  File and args:
SunOS Release 5.10 Version Generic_147147-26 64-bit
Copyright (c) 1983, 2013, Oracle and/or its affiliates. All rights reserved.
Hostname: s72-200201-ldg1
Configuring devices.
Loading smf(5) service descriptions: 187/187
s72-200201-ldg1 console login:

依据界面提示安装solaris 11

配置solaris:

多路径:
bash-3.2# stmsboot -e

Do you wish to continue? [y/n] (default: y)
WARNING: This operation will require a reboot.
Do you want to continue ? [y/n] (default: y)
The changes will come into effect after rebooting the system.
Reboot the system now ? [y/n] (default: y)


remote ssh login:
vi /etc/default/login
#CONSOLE=/dev/console

vi /etc/ssh/sshd_config
100+
PermitRootLogin yes

svcadm restart ssh

ldm set-var auto-boot\?=true m7801-ldg9
ldm set-var auto-boot\?=true m7802-ldg9


示例配置M7801-LDG9:

add cpu and mem:
ldm set-core 6 m7801-ldg9
ldm set-memory 80G m7801-ldg9

add net:
ldm add-vnet vnet0 primary-vsw0 m7801-ldg9
ldm add-vnet vnet1 primary-vsw1 m7801-ldg9
ldm add-vnet vnet2 primary-vsw2 m7801-ldg9
ldm add-vnet vnet3 primary-vsw3 m7801-ldg9

add SR-IOF:
ldm add-io /SYS/CMIOU0/PCIE1/IOVFC.PF0.VF9 m7801-ldg9
ldm add-io /SYS/CMIOU0/PCIE1/IOVFC.PF1.VF9 m7801-ldg9
ldm add-io /SYS/CMIOU1/PCIE3/IOVFC.PF0.VF9 m7801-ldg9
ldm add-io /SYS/CMIOU1/PCIE3/IOVFC.PF1.VF9 m7801-ldg9
ldm add-io /SYS/CMIOU1/PCIE1/IOVFC.PF0.VF9 m7801-ldg9
ldm add-io /SYS/CMIOU1/PCIE1/IOVFC.PF1.VF9 m7801-ldg9
ldm add-io /SYS/CMIOU2/PCIE3/IOVFC.PF0.VF9 m7801-ldg9
ldm add-io /SYS/CMIOU2/PCIE3/IOVFC.PF1.VF9 m7801-ldg9


ldm bind m7801-ldg9
ldm start m7801-ldg9
ldm stop -f m7801-ldg9

ldm stop help

ldm list
ldm list-io
ldm list-io -l
fcinfo hba-port


ipadm delete-ip net0
ipadm delete-ip net1
ipadm delete-ip net2
ipadm delete-ip net3

ipadm delete-ipmp ipmp0

ipadm create-ip net1
ipadm create-ip net2
ipadm create-ip net3
ipadm create-ip net4

ipadm create-ipmp ipmp0
ipadm add-ipmp -i net0 -i net1 ipmp0
ipadm create-addr -T static -a local=IP/21 ipmp0/v4
ipadm show-addr ipmp0/v4

route -p add default Ip

ZFS 配置:
ZFS 文件系统是基于事务的文件系统,可以说是目前最优的文件系统,如果你对oracle事务非常了解,那么你就会明白ZFS文件的优点!

zfs list
zfs set volsize=32G rpool/swap
swap -l -h


删除ldomain:

root@hsedwd01:~# ldm stop-domain -a
root@hsedwd01:~# ldm unbind-domain ldg1
root@hsedwd01:~# ldm unbind-domain ldg2
root@hsedwd01:~# ldm unbind-domain ldg3
root@hsedwd01:~# ldm unbind-domain ldg4
root@hsedwd01:~# ldm unbind-domain ldg5
root@hsedwd01:~# ldm unbind-domain ldg6
root@hsedwd01:~# ldm unbind-domain ldg7
root@hsedwd01:~# ldm unbind-domain ldg8

root@hsedwd01:~# ldm remove-domain –a



孙显鹏





您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

TOP技术积分榜 社区积分榜 徽章 团队 统计 知识索引树 积分竞拍 文本模式 帮助
  ITPUB首页 | ITPUB论坛 | 数据库技术 | 企业信息化 | 开发技术 | 微软技术 | 软件工程与项目管理 | IBM技术园地 | 行业纵向讨论 | IT招聘 | IT文档
  ChinaUnix | ChinaUnix博客 | ChinaUnix论坛
CopyRight 1999-2011 itpub.net All Right Reserved. 北京盛拓优讯信息技术有限公司版权所有 联系我们 
京ICP备09055130号-4  北京市公安局海淀分局网监中心备案编号:11010802021510 广播电视节目制作经营许可证:编号(京)字第1149号
  
快速回复 返回顶部 返回列表