- 論壇徽章:
- 0
|
本帖最后由 3sun 于 2012-02-25 08:15 編輯
在論壇里學(xué)到不少東西,今天也嘗試去寫一寫。 辛苦測(cè)試結(jié)果 。申請(qǐng)精華阿 :)
正題:
測(cè)試環(huán)境 M5000 (domain0 ,domain1) M5000 firmware update to 1100
domain0 text-install 介質(zhì)光盤引導(dǎo)安裝, 安裝過程略。。。。
domain0: hostname(solaris11-1) ip:192.168.0.1
domain1進(jìn)行網(wǎng)絡(luò)AI安裝
一 domain0 建立IPS Repo URI 模式
root@solaris11-1:~#zfs create rpool/export/repoSolaris11
****為IPS repo 創(chuàng)建zfs文件系統(tǒng)及目錄***
root@solaris11-1:~# zfs set atime=off rpool/export/repoSolaris11
****atime 屬性控制是否在讀取文件時(shí)更新文件的訪問時(shí)間。關(guān)閉此屬性可避免在讀取文件時(shí)生成寫入流量。*****
下載IPS軟件庫 iso文件傳到服務(wù)器目錄
兩個(gè)文件:
sol-11-1111-repo-full-iso-a.zip
sol-11-1111-repo-full-iso-b.zip
Unzip 兩個(gè)文件后
sol-11-1111-repo-full.iso-a
sol-11-1111-repo-full.iso-b
合并為一個(gè)文件
root@solaris11-1:/export/repoSolaris11# cat sol-11-1111-repo-full.iso-a sol-11-1111-repo-full.iso-b > sol-11-1111-repo-full.iso
root@solaris11-1:/export/repoSolaris11# mkdir /repo
root@solaris11-1:/export/repoSolaris11# lofiadm -a /export/repoSolaris11/sol-11-1111-repo-full.iso
/dev/lofi/1
root@solaris11-1:/export/repoSolaris11# mount -F hsfs /dev/lofi/1 /repo
root@solaris11-1:/export/repoSolaris11# cd /repo; tar cf - . | (cd /export/repoSolaris11; tar xfp -)
將系統(tǒng)信息庫從 lofi 已掛載文件系統(tǒng)移動(dòng)到 ZFS 文件系統(tǒng)。
root@solaris11-1:/export/repoSolaris11# pkgrepo -s /export/repoSolaris11 refresh
Initiating repository refresh.
缺省情況下,系統(tǒng)信息庫創(chuàng)建命令不會(huì)構(gòu)建搜索索引。要使客戶機(jī)能夠在本地系統(tǒng)信息庫中搜索軟件包,使用以下命令在系統(tǒng)信息庫中為軟件包編寫目錄并更新搜索索引。
root@solaris11-1:/export/repoSolaris11# pkg set-publisher -G '*' -g /export/repoSolaris11/repo solaris
-G '*' 刪除 solaris 發(fā)布者的所有現(xiàn)有源。
-g 將新建的本地系統(tǒng)信息庫的 URI 添加為 solaris 發(fā)布者的新源
root@solaris11-1:/export/repoSolaris11# pkg publisher
PUBLISHER TYPE STATUS URI
solaris origin online file:///export/repoSolaris11/repo/
檢查發(fā)布者的內(nèi)容
root@solaris11-1:# svccfg -s application/pkg/server setprop pkg/inst_root=/export/repoSolaris11/repo
root@solaris11-1:# svccfg -s application/pkg/server setprop pkg/readonly=true
root@solaris11-1:# svcadm refresh application/pkg/server
root@solaris11-1:# svcadm enable application/pkg/server
建立URI發(fā)布地址
瀏覽器http://192.168.0.1:80 測(cè)試 是否可以訪問到 IPS Repo頁面
二創(chuàng)建AI服務(wù)器及AI安裝domain1
檢查建立AI安裝服務(wù)器需要的包installadm:
root@solaris11-1:/export/repoSolaris11# pkg info installadm
Name: install/installadm
Summary: installadm utility
Description: Automatic Installation Server Setup Tools
Category: System/Administration and Configuration
State: Installed
Publisher: solaris
Version: 0.5.11
Build Release: 5.11
Branch: 0.175.0.0.0.2.1482
Packaging Date: October 19, 2011 12:26:24 PM
Size: 1.04 MB
FMRI: pkg://solaris/install/installadm@0.5.11,5.11-0.175.0.0.0.2.1482:20111019T122624Z
root@solaris11-1:/export/repoSolaris11# svcs system/install/server
STATE STIME FMRI
online 11:18:10 svc:/system/install/server:default
建立AI安裝服務(wù)
這里采用使用 ISO 文件中的網(wǎng)絡(luò)映像為 SPARC 客戶機(jī)創(chuàng)建 AI 安裝服務(wù)方法,不用建立DHCP服務(wù)器。
***下載sol-11-1111-ai-sparc.iso文件上傳到本地目錄/home/test/image-s11***
root@solaris11-1:/home/test/image-s11# ls
osc4.0-repo-full.iso sol-11-1111-ai-sparc.iso
root@solaris11-1:/home/test/image-s11# installadm create-service -n s11-sparc -s /home/test/image-s11/sol-11-1111-ai-sparc.iso -d /install/images/s11-sparc
執(zhí)行上述 installadm create-service 命令后會(huì)執(zhí)行以下操作。
1. 將安裝服務(wù)命名為 s11-sparc。
2. 創(chuàng)建安裝服務(wù)目標(biāo)目錄 /install/images/s11-sparc。
3. 將 ISO 文件/home/test/image-s11/ sol-11-1111-ai-sparc.iso 解壓縮到網(wǎng)絡(luò)映像位置 /install/images/s11-sparc。
4. 在 /install/images/s11-sparc/wanboot.conf 處生成此服務(wù)的 wanboot.conf 文件。
5. 刷新 AI SMF 服務(wù) system/install/server,將 /install/images/s11-sparc 掛載為 /etc/netboot/s11-sparc。
6. 因?yàn)檫@是在此安裝服務(wù)器上創(chuàng)建的第一個(gè) SPARC 安裝服務(wù),因此將自動(dòng)創(chuàng)建 default-sparc 服務(wù)別名。別名將使用 s11-sparc 中的映像,因此 /install/images/s11-sparc 也掛載為 /etc/netboot/default-sparc。
7. 將配置文件 /etc/netboot/wanboot.conf 以符號(hào)形式鏈接到 /etc/netboot/default-sparc/wanboot.conf。將配置文件 /etc/netboot/system.conf 以符號(hào)形式鏈接到 /etc/netboot/default-sparc/system.conf。
8. 提供 DHCP 配置所需的引導(dǎo)文件 http:// 192.168.0.1:5555/cgi-bin/wanboot-cgi。
root@solaris11-1:/home/test/image-s11# installadm list
Service Name Alias Of Status Arch Image Path
------------ -------- ------ ---- ----------
default-sparc s11-sparc on Sparc /install/images/s11-sparc
s11-sparc - on Sparc /install/images/s11-sparc
root@solaris11-1:/home/test/image-s11# installadm create-client -e 0:21:28:af:55:2c -n s11-sparc
***將 domain1的MAC地址加入到s11-sparc安裝服務(wù)***
root@solaris11-1:/home/guo/image-s11#installadm list –m
Service Name Manifest Status
------------ -------- ------
default-sparc orig_default Default
s11-sparc orig_default Default
****查看已有的安裝服務(wù)及AI清單****
這里我不做特殊設(shè)置,使用默認(rèn)的AI清單。只需要將默認(rèn)AI清單中 軟件發(fā)布者地址更換成domain0的發(fā)布地址。
root@solaris11-1:/var/ai/service/default-sparc/AI_data# vi orig_default 修改默認(rèn)AI清單
將此行<origin name="http://pkg.oracle.com/solaris/release"/>
*****改為<origin name="http://192.168.0.1:80>******
domian 1 網(wǎng)絡(luò)啟動(dòng):
0} ok boot net:dhcp - install
Boot device: /pci@0,600000/pci@0/pci@8/pci@0/network@2:dhcp File and args: - install
1000 Mbps full duplex Link up
Timed out waiting for BOOTP/DHCP reply
<time unavailable> wanboot info: WAN boot messages->console
<time unavailable> wanboot info: configuring /pci@0,600000/pci@0/pci@8/pci@0/network@2:dhcp
1000 Mbps full duplex Link up
<time unavailable> wanboot info: Starting DHCP configuration
<time unavailable> wanboot info: DHCP configuration succeeded
<time unavailable> wanboot progress: wanbootfs: Read 368 of 368 kB (100%)
<time unavailable> wanboot info: wanbootfs: Download complete
Thu Feb 23 05:40:15 wanboot progress: miniroot: Read 213735 of 213735 kB (100%)
Thu Feb 23 05:40:16 wanboot info: miniroot: Download complete
SunOS Release 5.11 Version 11.0 64-bit
Copyright (c) 1983, 2011, Oracle and/or its affiliates. All rights reserved.
Remounting root read/write
Probing for device nodes ...
Preparing network image for use
Downloading solaris.zlib
--2012-02-23 06:06:45-- http://192.168.0.1:5555/export/a ... sparc//solaris.zlib
Connecting to 192.168.0.1:5555... connected.
HTTP request sent, awaiting response... 200 OK
Length: 126752256 (121M) [text/plain]
Saving to: `/tmp/solaris.zlib'
100%[======================================>] 126,752,256 80.1M/s in 1.5s
2012-02-23 06:06:47 (80.1 MB/s) - `/tmp/solaris.zlib' saved [126752256/126752256]
Downloading solarismisc.zlib
--2012-02-23 06:06:47-- http://192.168.0.1:5555/export/a ... c//solarismisc.zlib
Connecting to 192.168.0.1:5555... connected.
HTTP request sent, awaiting response... 200 OK
Length: 20636672 (20M) [text/plain]
Saving to: `/tmp/solarismisc.zlib'
100%[======================================>] 20,636,672 76.8M/s in 0.3s
2012-02-23 06:06:47 (76.8 MB/s) - `/tmp/solarismisc.zlib' saved [20636672/20636672]
Downloading .image_info
--2012-02-23 06:06:47-- http://192.168.0.1:5555/export/a ... -sparc//.image_info
Connecting to 192.168.0.1:5555... connected.
HTTP request sent, awaiting response... 200 OK
Length: 65 [text/plain]
Saving to: `/tmp/.image_info'
100%[======================================>] 65 --.-K/s in 0s
2012-02-23 06:06:47 (8.73 MB/s) - `/tmp/.image_info' saved [65/65]
Done mounting image
Configuring devices.
Hostname: solaris
Service discovery phase initiated
Service name to look up: default-sparc
Service discovery finished successfully
Process of obtaining install manifest initiated
Using the install manifest obtained via service discovery
solaris console login:
Automated Installation started
The progress of the Automated Installation will be output to the console
Detailed logging is in the logfile at /system/volatile/install_log
Press RETURN to get a login prompt at any time.
06:07:03 Install Log: /system/volatile/install_log
06:07:03 Using XML Manifest: /system/volatile/ai.xml
06:07:03 Using profile specification: /system/volatile/profile
06:07:03 Using service list file: /var/run/service_list
06:07:03 Starting installation.
06:07:03 0% Preparing for Installation
06:07:03 100% manifest-parser completed.
06:07:03 0% Preparing for Installation
06:07:04 0% Preparing for Installation
06:07:04 0% Preparing for Installation
06:07:04 0% Preparing for Installation
06:07:04 1% Preparing for Installation
06:07:04 1% Preparing for Installation
06:07:04 1% Preparing for Installation
06:07:04 2% Preparing for Installation
06:07:04 2% Preparing for Installation
06:07:04 2% Preparing for Installation
06:07:04 3% Preparing for Installation
06:07:04 3% Preparing for Installation
06:07:04 3% Preparing for Installation
06:07:04 4% Preparing for Installation
06:07:04 4% Preparing for Installation
06:07:04 4% Preparing for Installation
06:07:08 7% target-discovery completed.
06:07:08 === Executing Target Selection Checkpoint ==
06:07:08 Selected Disk(s) : c2t0d0
06:07:08 13% target-selection completed.
06:07:08 17% ai-configuration completed.
06:07:09 19% var-shared-dataset completed.
06:07:20 21% target-instantiation completed.
06:07:21 21% Beginning IPS transfer
06:07:21 Creating IPS image
06:07:24 Installing packages from:
06:07:24 solaris
06:07:24 origin: http://192.168.0.1:80/
06:16:06 23% generated-transfer-848-1 completed.
06:16:06 25% initialize-smf completed.
06:16:08 Installing SPARC bootblk to root pool devices: ['/dev/rdsk/c2t0d0s0']
06:16:08 Setting openprom boot-device
06:16:09 35% boot-configuration completed.
06:16:09 37% update-dump-adm completed.
06:16:09 40% setup-swap completed.
06:16:10 42% device-config completed.
06:16:10 44% apply-sysconfig completed.
06:16:10 46% transfer-zpool-cache completed.
06:16:18 87% boot-archive completed.
06:16:18 89% transfer-ai-files completed.
06:16:18 99% create-snapshot completed.
06:16:18 Automated Installation succeeded.
06:16:18 You may wish to reboot the system at this time.
Automated Installation finished successfully
The system can be rebooted now
Please refer to the /system/volatile/install_log file for details
After reboot it will be located at /var/sadm/system/logs/install_log
安裝完畢
root@solaris11-2:~# zfs list
NAME USED AVAIL REFER MOUNTPOINT
rpool 72.0G 202G 73.5K /rpool
rpool/ROOT 1.83G 202G 31K legacy
rpool/ROOT/test 62K 202G 1.46G /
rpool/ROOT/test/var 1K 202G 344M /var
rpool/ROOT/solaris 1.83G 202G 1.47G /
rpool/ROOT/solaris/var 348M 202G 344M /var
rpool/dump 66.0G 204G 64.0G -
rpool/export 98K 202G 32K /export
rpool/export/home 66K 202G 32K /export/home
rpool/export/home/test 34K 202G 34K /export/home/test
rpool/swap 4.13G 202G 4.00G -
root@solaris11-2:~# pkg publisher
PUBLISHER TYPE STATUS URI
solaris origin online http://192.168.0.1:80/
|
|