ITPub博客

首页 > Linux操作系统 > Linux操作系统 > solaris11配置ldom全过程

solaris11配置ldom全过程

Linux操作系统 作者:petrel_peng 时间:2013-12-17 16:55:21 0 删除 编辑

       随着oracle对sun的整合,sun的小型机又开始杀回来了!目前t4系列的cpu主频已经达到3.0,而线程数,每个core为8个进程。t5系列的cpu主频达到了3.6,进程达到16。经过几年的发展,其性价比得到了非常充分的体现。solaris11,其针对oracle进行了优化,其性能得到了相当大的提升,大有打破ibm一家垄断的局面。ldom,也是虚拟化的一种,相当于lpar,从硬件层面对小机进行分区。下面就分区的过程分享给大家

t4小机划分ldom过程

本操作从小机加电开始操作,所有过程都是一步一步的贴出来!

1、配置管理口IP地址
set /SP/network/ pendingipaddress=192.168.23.11
set /SP/network/ pendingipdiscovery=static
set /SP/network/ pendingipnetmask=255.255.255.0
set /SP/network/ pendingipgateway=192.168.23.254
set /SP/network/ commitpending=true
set /SP/network/ state=enabled
set /HOST/bootmode script="setenv auto-boot? false"

2、配置硬raid1+0,将里面的6块盘做成1+0分区模式,用于各ldom分区共享!
说明:也可以考虑将盘进行分组,每个分区独享磁盘,我这里是为了方便!
--查看各个磁盘情况
{0} ok select scsi

{0} ok show-children

FCode Version 1.00.63, MPT Version 2.00, Firmware Version 9.05.00.00

Target 9
  Unit 0   Disk   HITACHI  H109060SESUN600G A31A    1172123568 Blocks, 600 GB
  SASDeviceName 5000cca016d91330  SASAddress 5000cca016d91331  PhyNum 0
Target a
  Unit 0   Removable Read Only device   TEAC     DV-W28SS-W       1.0A
  SATA device  PhyNum 7
Target b
  Unit 0   Disk   HITACHI  H109060SESUN600G A31A    1172123568 Blocks, 600 GB
  SASDeviceName 5000cca016dd17ec  SASAddress 5000cca016dd17ed  PhyNum 1
Target c
  Unit 0   Disk   HITACHI  H109060SESUN600G A31A    1172123568 Blocks, 600 GB
  SASDeviceName 5000cca016dd92c8  SASAddress 5000cca016dd92c9  PhyNum 2
Target d
  Unit 0   Disk   HITACHI  H109060SESUN600G A31A    1172123568 Blocks, 600 GB
  SASDeviceName 5000cca016dcaa2c  SASAddress 5000cca016dcaa2d  PhyNum 3
Target e
  Unit 0   Disk   HITACHI  H109060SESUN600G A31A    1172123568 Blocks, 600 GB
  SASDeviceName 5000cca016dec2f4  SASAddress 5000cca016dec2f5  PhyNum 4
Target f
  Unit 0   Disk   HITACHI  H109060SESUN600G A31A    1172123568 Blocks, 600 GB
  SASDeviceName 5000cca016dcd3f8  SASAddress 5000cca016dcd3f9  PhyNum 5
 
{0} ok show-volumes

No volumes to show

--将6块盘做成r1+0的模式

{0} ok 9 b c d e f create-raid1e-volume

Target 9 size is 1169920000 Blocks, 598 GB
Target b size is 1169920000 Blocks, 598 GB
Target c size is 1169920000 Blocks, 598 GB
Target d size is 1169920000 Blocks, 598 GB
Target e size is 1169920000 Blocks, 598 GB
Target f size is 1169920000 Blocks, 598 GB
The volume can be any size from 1 MB to 1713750 MB
What size do you want?  [1713750]
Volume size will be 3509760000 Blocks, 1796 GB
Enter a volume name:  [0 to 15 characters]
Volume has been created
在这里,可以看到r10的模式已经建好!

再次查看,验证创建情况
{0} ok show-children

FCode Version 1.00.63, MPT Version 2.00, Firmware Version 9.05.00.00

Target a
  Unit 0   Removable Read Only device   TEAC     DV-W28SS-W       1.0A
  SATA device  PhyNum 7
Target 381 Volume 0
  Unit 0   Disk   LSI      Logical Volume   3000    3509760000 Blocks, 1796 GB
  VolumeDeviceName 3cc9c69bec333347  VolumeWWID 0cc9c69bec333347
 
{0} ok show-volumes

Volume 0 Target 381  Type RAID1E (Mirroring Extended)
  WWID 0cc9c69bec333347
  Optimal  Enabled  Background Init In Progress
  6 Members                                         3509760000 Blocks, 1796 GB
  Disk 0
    Member 0  Optimal
    Target 9      HITACHI  H109060SESUN600G A31A   PhyNum 0
  Disk 1
    Member 1  Optimal
    Target b      HITACHI  H109060SESUN600G A31A   PhyNum 1
  Disk 2
    Member 2  Optimal
    Target c      HITACHI  H109060SESUN600G A31A   PhyNum 2
  Disk 3
    Member 3  Optimal
    Target d      HITACHI  H109060SESUN600G A31A   PhyNum 3
  Disk 4
    Member 4  Optimal
    Target e      HITACHI  H109060SESUN600G A31A   PhyNum 4
  Disk 5
    Member 5  Optimal
    Target f      HITACHI  H109060SESUN600G A31A   PhyNum 5
   
3、开始安装Solaris11.1的操作系统
从光盘启动,t4是带光驱的,所以这点比较方便

{0} ok boot rcdrom - install
Boot device: /pci@400/pci@1/pci@0/pci@b/pci@0/usb@0,2/hub@2/hub@3/storage@2/disk@0  File and args: - install
SunOS Release 5.11 Version 11.1 64-bit
Copyright (c) 1983, 2012, Oracle and/or its affiliates. All rights reserved.
Remounting root read/write
Probing for device nodes ...
Preparing image for use
Done mounting image
USB keyboard
 1. Arabic                        15. Korean                       
 2. Belgian                       16. Latin-American               
 3. Brazilian                     17. Norwegian                    
 4. Canadian-Bilingual            18. Portuguese                   
 5. Canadian-French               19. Russian                      
 6. Danish                        20. Spanish                      
 7. Dutch                         21. Swedish                      
 8. Dvorak                        22. Swiss-French                 
 9. Finnish                       23. Swiss-German                 
10. French                        24. Traditional-Chinese          
11. German                        25. TurkishQ                     
12. Italian                       26. UK-English                   
13. Japanese-type6                27. US-English                   
14. Japanese                     
To select the keyboard layout, enter a number [default 27]:

 1. Chinese - Simplified         
 2. Chinese - Traditional        
 3. English                      
 4. French                       
 5. German                       
 6. Italian                      
 7. Japanese                     
 8. Korean                       
 9. Portuguese - Brazil          
10. Spanish                      
To select the language you wish to use, enter a number [default is 3]:
User selected: English
Configuring devices.
Hostname: solaris
Welcome to the Oracle Solaris installation menu

        1  Install Oracle Solaris
        2  Install Additional Drivers
        3  Shell
        4  Terminal type (currently xterm)
        5  Reboot

Please enter a number [1]:

安装过程比较简单,就不再赘述,基本上都可以完成。在安装的过程中,我们采用的是text的方式进行的!
安装完成后,要用root登录ldom,必须调整这个,确保root用户可以登录ldom

root@MYTEST:/etc# cat user_attr
#
# The system provided entries are stored in different files
# under "/etc/user_attr.d".  They should not be copied to this file.
#
# Only local changes should be stored in this file.
# This line should be kept in this file or it will be overwritten.
#
#root::::type=role
admin::::lock_after_retries=no;profiles=System Administrator;roles=root

--将root::::type=role这一条注释掉

4、安装EIS patch
EIS英文原名叫Enterprise Installation Standard,其中包含了大部分SUN产品的补丁,不限于solaris操作系统和软件,硬件的固件补丁也在其列;还有一部分就是SUN常用的软件,例如cluster,CAM等等。

设置pkg publisher

# pkg set-publisher -G '*' -M '*' -g solaris

运行setup-standard.sh脚本

# ./setup-standard.sh

Running setup-standard with EIS-DVD Vn 16-OCT-13
================================================

Creating /var/sun for scripts, log files etc...
Loading /opt/eis/bin...

Replacing original /root/.profile by file from EIS-DVD.
Setting up /root/.profile-EIS...
The system is installed with Solaris 11.1.
The installed SRU:        Version: 0.5.11 (Oracle Solaris 11.1.12.5.0)
The installed Solaris 11 group is:  group/system/solaris-large-server

Remote ROOT logins via SSH probably enabled: See /etc/ssh/sshd_config...

Script /etc/rc3.d/S99EIS-DVDtag loaded.
Script /etc/rc3.d/S99EIS-DVDtag has been run.

Temporarily adding the STB IPS Repo to the publisher...

Automated Core File Analysis Tool (ACT).....

Do you want to install ACT 8.17 from the EIS-DVD? [y/n]: y

Installing ACT package from IPS Repository on the EIS-DVD...
           Packages to install:  1
       Create boot environment: No
Create backup boot environment: No

DOWNLOAD                                PKGS         FILES    XFER (MB)   SPEED
Completed                                1/1           5/5      0.3/0.3    0B/s

PHASE                                          ITEMS
Installing new actions                         27/27
Updating package state database                 Done
Updating image state                            Done
Creating fast lookup database                   Done

Installed version of ACT is 8.17


Oracle Explorer Data Collector.....
No IPS version of Explorer currently installed.

Do you want to install Explorer 8.1.13.9.6 from the EIS-DVD? [y/n]: y

Installing Explorer package from IPS Repository on the EIS-DVD...
           Packages to install:  1
       Create boot environment: No
Create backup boot environment: No

DOWNLOAD                                PKGS         FILES    XFER (MB)   SPEED
Completed                                1/1     1303/1303    14.5/14.5    0B/s

PHASE                                          ITEMS
Installing new actions                     1405/1405
Updating package state database                 Done
Updating image state                            Done
Creating fast lookup database                   Done

Installed version of Explorer is 8.1.13.9.6


Oracle Serial Number in EEPROM (Sneep).....
No IPS version of SNEEP currently installed.

Do you want to install SNEEP 8.1.13.9.6 from the EIS-DVD? [y/n]: y

Installing SNEEP package from IPS Repository on the EIS-DVD...
           Packages to install:  1
       Create boot environment: No
Create backup boot environment: No

DOWNLOAD                                PKGS         FILES    XFER (MB)   SPEED
Completed                                1/1           7/7      0.1/0.1    0B/s

PHASE                                          ITEMS
Installing new actions                         25/25
Updating package state database                 Done
Updating image state                            Done
Creating fast lookup database                   Done

Installed version of SNEEP is 8.1.13.9.6


Removing STB IPS Repo from the Publisher...


   ******************************************************
   * Please supply configuration information with care. *
   * Especially enter the following customer details:   *
   * - Company Name (case sensitive)                    *
   * - System serial number                             *
   * - Contact Name                                     *
   * - Contact email address                            *
   * - Address details                                  *
   * The contract ID is not vital at this stage.        *
   ******************************************************

Press RETURN to continue...

-----

Oracle Corporation respects your desire for privacy. Personal information
collected from this form will not be shared with organizations external to
Oracle without your consent, except to process data on Oracle's behalf in
connection with this transaction. We will use your personal information for
communications regarding Oracle equipment and service related topics associated
with the data submitted.

Oracle, as a global company, may transfer your personal information to
countries which may not provide an adequate level of protection. Oracle,
however, is committed to providing a suitable & consistent level of protection
for your personal information regardless of the country in which it resides.

Completing the form below implies agreement with the above processing.

If you have any questions please refer to the Oracle Privacy Policy or contact
us. Note that entry of personal information into Explorer is optional.


If you have any questions about this form or in the future wish to update or
delete any of the information provided, please contact Oracle.

-----

Absolute path of the Explorer defaults file?
[/etc/explorer/default/explorer]:
Absolute path of the Explorer output top location?
[/var/explorer/output]:
Should Explorer create /var/explorer/output (y/n)?
[y]:

Retrieving serial number ... (can take time)

Company name
[]:
Contract Identifier
[]:
System (MYTEST, 863adf9a) serial number
[AK00151939]:
Contact name
[]:
Contact email address
[]:
Phone number
[]:
Address (line 1)
[]:
Address (line 2)
[]:
City
[]:
State
[]:
Zip
[]:
Select your geography from this list:
    1) AMERICAS
    2) EMEA
    3) APAC
[AMERICAS] 3
APAC
Two-character country code or '?' for a list of countries
[]: CN

Automatic Submission
At the completion of Explorer, all output may be sent to Oracle or alternate
destinations.

Target: https://supportfiles.sun.com/curl
Send explorer output via HTTPS when -P is specified (y/n)?
Choose 'n' to specify an alternate target, such as your Secure File Transport
(SFT) listener
[]: n

When -P is specified, would you like Explorer output to be sent to an
alternate target destination, such as your Secure File Transport (SFT)
listener (y/n)?
If yes, then enter the http[s]://server:port
Otherwise, enter only a single '-' for your reply.
HTTPS destination or a '-'
[]: -

If you would like to be notified by email when your explorer output is uploaded
into the repository, enter the email address here. When notification is not
needed, enter a single '-'.
[]: -

You have answered:
               Company name:
                Contract ID:

       System serial number: AK00151939

               Contact name:
      Contact email address:
               Phone number:
           Address (line 1):
           Address (line 2):
                       City:
                      State:
                        Zip:
                    Country: China                        
               Country Code: CN

                  Geography: APAC
             Post output to:
         HTTPS proxy server:
           Mail output from:
          Mail on data load:
Are these values okay (y/n)?
[]: y
Do you wish to schedule explorer in cron (y/n)?
[]: n
Nov 20 15:39:16 MYTEST[3080] explorer:  Explorer defaults file updated.
Nov 20 15:39:16 MYTEST[3080] explorer:  Run /usr/sbin/explorer with options to collect data.

Note: /root/.profile was created - please check/edit this file!!!

You must log out & back in for the environment to be updated

Alternative: to test beforehand enter  . /root/.profile


setup-standard completed.
?
# . /root/.profile

root@MYTEST:/# pkg info entire | grep Version
       Version: 0.5.11 (Oracle Solaris 11.1.12.5.0)

5、安装图形界面solaris-desktop

# pkg install solaris-desktop
           Packages to install: 338
       Create boot environment:  No
Create backup boot environment: Yes
            Services to change:  14

DOWNLOAD                                PKGS         FILES    XFER (MB)   SPEED
Completed                            338/338   51001/51001  529.2/529.2    0B/s

PHASE                                          ITEMS
Installing new actions                   82287/82287
Updating package state database                 Done
Updating image state                            Done
Creating fast lookup database                   Done

 
6、开始配置LDOM

--首先配置primary域,管理域不安装任何程序,资源各方面都不划分太多

# ldm add-vds primary-vds0 primary
# ldm add-vcc port-range=5000-5100 primary-vcc0 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
# ldm add-vdsdev options=ro /install_image/sol-11_1-text-sparc.iso sol11.1@primary-vds0
# ldm add-vdsdev options=ro /install_image/EIS-DVD-ONE-16OCT13.iso EIS-one@primary-vds0
# ldm add-vdsdev options=ro /install_image/EIS-DVD-TWO-16OCT13.iso EIS-two@primary-vds0
# ldm add-vdsdev options=ro /install_image/sol-11_1-repo-full.iso sol11-full@primary-vds0
# ldm set-core 1 primary          --配置1个core
# ldm start-reconf primary
Initiating a delayed reconfiguration operation on the primary domain.
All configuration changes for other domains are disabled until the primary
domain reboots, at which time the new configuration for the primary domain
will also take effect.
# ldm set-memory 8G primary       --配置8g的内存
------------------------------------------------------------------------------
Notice: The primary domain is in the process of a delayed reconfiguration.
Any changes made to the primary domain will only take effect after it reboots.
------------------------------------------------------------------------------
# ldm add-config initial
# ldm add-config DONE             --对配置进行保存
# ldm list-config
factory-default
initial [current]
# init 6
# svcadm enable vntsd
# svcs |grep vntsd
online         17:28:33 svc:/ldoms/vntsd:default

--配置guest域

配置MYTEST1:

root@MYTEST # ldm add-domain MYTEST1
root@MYTEST # ldm add-core 2 MYTEST1
Must use set-core to enable the whole-core constraint
root@MYTEST # ldm add-vcpu 16 MYTEST1
root@MYTEST # ldm add-memory 16G MYTEST1
root@MYTEST # ldm add-vnet vnet1 primary-vsw1 MYTEST1
root@MYTEST # zfs create -V 150G rpool/zvol-MYTEST1               --从我们刚才的盘中划分150g供其使用
root@MYTEST # ldm add-vdsdev /dev/zvol/dsk/rpool/zvol-MYTEST1 MYTEST1-disk0@primary-vds0
root@MYTEST # ldm add-vdisk vcdrom sol11.1@primary-vds0 MYTEST1
root@MYTEST # ldm add-vdisk vdisk0 MYTEST1-disk0@primary-vds0 MYTEST1
root@MYTEST # ldm add-io /SYS/MB/PCIE0     --配置光纤口
root@MYTEST # ldm list-io
NAME                                      TYPE   BUS      DOMAIN   STATUS  
----                                      ----   ---      ------   ------  
pci_0                                     BUS    pci_0    primary  IOV     
pci_1                                     BUS    pci_1    primary  IOV     
niu_0                                     NIU    niu_0    primary          
niu_1                                     NIU    niu_1    primary          
/SYS/MB/PCIE0                             PCIE   pci_0    MYTEST1  OCC      
/SYS/MB/PCIE4                             PCIE   pci_0    primary  EMP     
/SYS/MB/PCIE6                             PCIE   pci_0    primary  EMP     
/SYS/MB/PCIE8                             PCIE   pci_0    primary  EMP     
/SYS/MB/SASHBA                            PCIE   pci_0    primary  OCC     
/SYS/MB/NET0                              PCIE   pci_0    primary  OCC     
/SYS/MB/PCIE1                             PCIE   pci_1    primary  OCC     
/SYS/MB/PCIE3                             PCIE   pci_1    primary  EMP     
/SYS/MB/PCIE5                             PCIE   pci_1    primary  EMP     
/SYS/MB/PCIE7                             PCIE   pci_1    primary  EMP     
/SYS/MB/PCIE9                             PCIE   pci_1    primary  EMP     
/SYS/MB/NET2                              PCIE   pci_1    primary  OCC     
/SYS/MB/NET0/IOVNET.PF0                   PF     pci_0    primary          
/SYS/MB/NET0/IOVNET.PF1                   PF     pci_0    primary
pci卡分配的结果如上所示

root@MYTEST # ldm bind-domain MYTEST1
root@MYTEST # ldm add-config DONE
root@MYTEST # telnet localhost 5000
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.

Connecting to console "MYTEST1" in group "MYTEST1" ....
Press ~? for control options ..

{0} ok
{0} ok devalias
vdisk0                   /virtual-devices@100/channel-devices@200/disk@1
vcdrom                   /virtual-devices@100/channel-devices@200/disk@0
vnet1                    /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
{0} ok boot vcdrom - install

配置MYTEST2域;

其配置过程与mytest1完全相同的,所以我们就不再进行配置了

7、查看配置安装情况
root@MYTEST # ldm list
NAME               STATE      FLAGS   CONS    VCPU  MEMORY   UTIL  NORM  UPTIME
primary            active     -n-cv-  UART    8     8G       0.5%  0.5%  20d 18h 49m
MYTEST1            active     -n----  5000    16    16G      0.3%  0.3%  4d 19h 24m
MYTEST2            active     -n----  5001    24    40G      0.0%  0.0%  17d 3h 28m

可以看到我拉的分区已经创建完成了!

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/21752515/viewspace-1063493/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2009-05-27

  • 博文量
    22
  • 访问量
    116248