1.准备工作
https://docs.oracle.com/cd/E19253-01/819-6951/sysresdiskuse-40204/index.html
1.关闭笔记本的无线 2.串口线连接到sun T2000的console口,网线连接服务器板载网卡第一个网口(Net 0) 注意: 连接串口线是为了查看mac和设备型号 连接网线在开始网络安装时才会用到,现在也可以不连 3.进入ok,查看mac和设备型号 a.进ok ————————————————————————1.登录———————————————————————— 一般连接串口后,需要输入密码登录到sc卡: login: root Password: changeme sc> help #查看帮助 sc> showfaults #显示当前系统故障 ————————————————————————2.sc>进{0}ok—————————————————— 方法一:先输入console,然后输入#. sc> console 方法二:输入break -Dyc sc> break -Dyc ————————————————————————3.ok进sc>————————————————————— 在ok模式下输入#. ————————————————————————4.ok进系统————————————————————— 确保系统已经启动,可以在sc模式下输入poweron 在ok模式下输入boot ————————————————————————4.sc进系统————————————————————— 在sc模式下输入console,然后输入#. 注意:若出现如下代码:0:0:0>CPU 0 trap trace. 先sc> poweroff,再sc> poweron ————————————————————————4.系统进sc————————————————————— 输入:init 0 b.查mac {0} ok banner SPARC T4-1, No Keyboard Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved. OpenBoot 4.33.4, 65024 MB memory available, Serial #100249168. Ethernet address 【0:21:28:f9:ae:50】, Host ID: 85f9ae50. c.查看设备型号 目标主机uname -m获取 或# showrev 4.网络配置 电脑: 网络适配器:配置到与要安系统的服务器同一网段如10.23.241.88 VMware中的服务器: 虚拟机设置中:网络适配器,选择:自定义(VMnet0) VMware虚拟网络编辑器: 原先是: VMnet0:桥接模式,自动桥接 VMnet1:仅主机 VMnet8:NAT模式,NAT模式 修改: VMnet0:桥接模式选择桥接到"Realtek PCIe GbE Family Controller"View Code
2.服务器端配置
1.创建网络共享目录并上传镜像 # mkdir /export/home/solaris10u11 Xshell点击"新建文件传输"图标 sftp:/> lcd D:\ISO\solaris-10-x86 sftp:/> put -r #将本地iso文件上传到该目录 # cd / # cp sol-10-u11-ga-sparc-dvd.iso /export/home/solaris10u11 2.挂载镜像至/mnt/iso # mkdir iso # lofiadm -a /export/home/solaris10u11/sol-10-u11-ga-sparc-dvd.iso /dev/lofi/1 挂载镜像至/mnt/iso # mount -F hsfs -o ro /dev/lofi/1 /mnt/iso 3.创建安装服务 # cd /mnt/iso/Solaris_10/Tools/ # ./setup_install_server /export/home/solaris_install/ 4.使引导服务器可以访问安装服务器(添加最下面一行) bash-3.2# vi /etc/dfs/dfstab # Place share(1M) commands here for automatic execution # on entering init state 3. # # Issue the command 'svcadm enable network/nfs/server' to # run the NFS daemon processes and the share commands, after adding # the very first entry to this file. # # share [-F fstype] [ -o options] [-d "<text>"] <pathname> [resource] # .e.g, # share -F nfs -o rw=engineering -d "home dirs" /export/home2 share -F nfs -o ro,anon=0 -d "install server directory" /export/home/solaris_install 5.共享安装服务器 # shareall #使用ssh连接,会显示couldn't set locale correctly # share - /export/home/solaris_install ro,anon=0 "install server directory" 6.在服务器配置客户机信息 a.hosts文件配置本机及目标主机IP及主机名 # vi /etc/hosts "/etc/hosts" [Read only] 6 lines, 90 characters # # Internet host table # ::1 localhost 127.0.0.1 localhost 192.168.0.54 xingyi loghost 【1.本机地址及主机名】 192.168.0.210 radius-4 【2.目标主机IP地址及主机名】 b.客户机mac和主机名 # vi /etc/ethers 0:21:28:f9:ae:50 radius-4 【3.目标主机第一个板载网口地址和主机名】 7.启动tftp服务 # vi /etc/inet/inetd.conf # CacheFS daemon. Provided only as a basis for conversion by inetconv(1M). # 100235/1 tli rpc/ticotsord wait root /usr/lib/fs/cachefs/cachefsd cachefsd # TFTPD - tftp server (primarily used for booting) tftp dgram udp6 wait root /usr/sbin/in.tftpd in.tftpd -s /tftpboot 8.将tftp加入svcs服务中,并启动服务 # inetconv -i /etc/inet/inetd.conf 1>/dev/null 2>&1 # svcadm enable svc:/network/tftp/udp6:default # netstat -a|grep tftp *.tftp Idle *.tftp Idle 9.客户端启动参数配置 #cd /export/home/solaris_install/Solaris_10/Tools/ #./add_install_client -e 0:21:28:f9:ae:50 radius-4 sun4v 【4.进入系统后输入showrev看到Kernel architecture为sun4v】 # ./add_install_client -i 192.168.0.210 -e 0:21:28:6f:63:ea -s 192.168.0.54:/export/home/solaris_install/ radius-4 sun4v #-i目标主机ip地址 -e 目标主机mac地址 -s 本机共享的安装目录 主机名 主机类型 【4.进入系统后输入showrev看到Kernel architecture为sun4v】 #不能用ssh输入,目标主机mac地址 主机名 类型(在目标主机uname -m获取) 10.检测生成的启动文件/etc/bootparams与/tftpboot/信息 # cat /etc/bootparams radius-4 root=test:/export/home/solaris_install/Solaris_10/Tools/Boot install=192.168.0.10:/export/home/solaris_install/ boottype=:in rootopts=:rsize=8192 # ls /tftpboot/ C0A800D2 C0A800D2.SUN4V inetboot.SUN4V.Solaris_10-1 rm.192.168.0.210 tftpbootView Code
3.ok模式下做硬raid
https://wenku.baidu.com/view/995c2c74f46527d3240ce0b7.html
http://blog.chinaunix.net/uid-11121350-id-4135336.html
注意:仅限配置有raid卡的主机划volume {0} ok probe-scsi-all #查看系统硬盘路径 {0} ok select /pci@400/pci@1/pci@0/pci@4/scsi@0 #进入系统硬盘路径 {0} ok show-volumes #查看系统硬盘是否已有raid {0} ok show-children #查看系统硬盘id及其它信息 {0} ok b c create-raid1-volume #选择b、c磁盘创建raid1逻辑卷 注意:显示create-raid1-volume ? 可能是主板或raid卡坏了,无法划硬raid {0} ok show-volumes #查看创建的卷 {0} ok unselect-dev #退出设备目录 {0} ok probe-scsi-all /pci@400/pci@2/pci@0/pci@f/pci@0//hub@2/hub@3/storage@2 Unit 0 Removable Read Only device AMI Virtual CDROM 1.00 /pci@400/pci@2/pci@0/pci@4/scsi@0 FCode Version 1.00.61, MPT Version 2.00, Firmware Version 9.00.00.00 Target a Unit 0 Removable Read Only device TEAC DV-W28SS-V 1.0B SATA device PhyNum 6 Target 381 Volume 0 Unit 0 Disk LSI Logical Volume 3000 583983104 Blocks, 298 GB VolumeDeviceName 33c3f410ab3c008a VolumeWWID 03c3f410ab3c008a {0} ok select /pci@400/pci@2/pci@0/pci@4/scsi@0 {0} ok show-volumes {0} ok 0 activate-volume #激活卷组0 {0} ok unselect-dev #退出设备目录 注意: 1.{0} ok probe-scsi-all报错: Last Trap: Fast Data Access MMU Miss {0} ok init 0 {0} ok set-defaults Setting NVRAM parameters to default values. {0} ok reset-all SC Alert: Host System has Reset SC Alert: CRITICAL ALARM is set …… Requesting Internet Address for 0:21:28:6f:63:ea Requesting Internet Address for 0:21:28:6f:63:ea …… SC Alert: Host System has Reset SC Alert: VOLTAGE_SENSOR at…… Please login: admin Please Enter password: ********View Code
4.启动安装及分区
https://blog.51cto.com/u_15127568/4626014
https://max.book118.com/html/2021/1017/7101014060004023.shtm
https://www.linuxdiyf.com/linux/6825.html
https://blog.csdn.net/duanzongbin/article/details/7259883
https://www.cnblogs.com/emanlee/archive/2012/07/09/2583764.html
https://max.book118.com/html/2018/0921/5231102211001314.shtm
#1.开始启动网络安装 {0} ok boot net #若是从光盘安装,输入boot cdrom [BEGIN] 2021/8/3 17:34:49 SunOS Release 5.10 Version Generic_147147-26 64-bit Copyright (c) 1983, 2013, Oracle and/or its affiliates. All rights reserved. Configuring devices. WARNING: /pci@400/pci@1/pci@0/pci@4/scsi@0 (mpt_sas0): Volume 897 is missing WARNING: /pci@400/pci@1/pci@0/pci@4/scsi@0/iport@v0/disk@w31b59822245248fc,0 (sd6): Corrupt label; wrong magic number Using RPC Bootparams for network configuration information. Attempting to configure interface igb15... Skipped interface igb15 …… Attempting to configure interface igb0... Skipped interface igb0 svc:/system/filesystem/local:default: WARNING: /usr/sbin/zfs mount -a failed: one or more file systems failed to mount Setting up Java. Please wait... Serial console, reverting to text install Beginning system identification... Searching for configuration file(s)... Search complete. Discovering additional network configuration... 注意: {0} ok boot net 若是出现system is not bootable, boot command is disabled {0} ok boot net Evaluating: FATAL: system is not bootable, boot command is disabled {0} ok reset-all …… #2.安装流程 [BEGIN] 2023-03-27 14:10:34 Connecting to COM4... Connected. {0} ok banner Netra T2000, No Keyboard Copyright 2008 Sun Microsystems, Inc. All rights reserved. OpenBoot 4.28.9, 16256 MB memory available, Serial #82659166. Ethernet address 0:14:4f:ed:47:5e, Host ID: 84ed475e. {0} ok boot net Boot device: /pci@780/pci@0/pci@1/network@0 File and args: 1000 Mbps full duplex Link up Requesting Internet Address for 0:14:4f:ed:47:5e Requesting Internet Address for 0:14:4f:ed:47:5e Requesting Internet Address for 0:14:4f:ed:47:5e 1000 Mbps full duplex Link up Requesting Internet Address for 0:14:4f:ed:47:5e 1000 Mbps full duplex Link up 1000 Mbps full duplex Link up Requesting Internet address for 0:14:4f:ed:47:5e 1000 Mbps full duplex Link up SunOS Release 5.10 Version Generic_147147-26 64-bit Copyright (c) 1983, 2013, Oracle and/or its affiliates. All rights reserved. Configuring devices. WARNING: /pci@780/pci@0/pci@9/scsi@0/sd@3,0 (sd4): Corrupt label; wrong magic number Using RPC Bootparams for network configuration information. Attempting to configure interface e1000g3... Skipped interface e1000g3 Attempting to configure interface e1000g2... Skipped interface e1000g2 Attempting to configure interface e1000g1... Skipped interface e1000g1 Attempting to configure interface e1000g0... Configured interface e1000g0 USB keyboard svc:/system/filesystem/local:default: WARNING: /usr/sbin/zfs mount -a failed: one or more file systems failed to mount Setting up Java. Please wait... Serial console, reverting to text install Beginning system identification... Searching for configuration file(s)... Search complete. Discovering additional network configuration... ——Select a Language—————————————————————— 0. English 1. Brazilian Portuguese 2. French 3. German 4. Italian 5. Japanese 6. Korean 7. Simplified Chinese 8. Spanish 9. Swedish 10. Traditional Chinese Please make a choice (0 - 10), or press h or ? for help: 0 ——What type of terminal are you using?—————————————————————— 1) ANSI Standard CRT 2) DEC VT52 3) DEC VT100 4) Heathkit 19 5) Lear Siegler ADM31 6) PC Console 7) Sun Command Tool 8) Sun Workstation 9) Televideo 910 10) Televideo 925 11) Wyse Model 50 12) X Terminal Emulator (xterms) 13) CDE Terminal Emulator (dtterm) 14) Other Type the number of your choice and press Return: 3 Completing system identification... ——The Oracle Solaris Installation Program —————————————————————— The Solaris installation program is divided into a series of short sections where you'll be prompted to provide information for the installation. At the end of each section, you'll be able to change the selections you've made before continuing. About navigation... - The mouse cannot be used - If your keyboard does not have function keys, or they do not respond, press ESC; the legend at the bottom of the screen will change to show the ESC keys to use for navigation. —————————————————————————————————————————— F2_Continue(✓) F6_Help ——Identify This System —————————————————————————————— On the next screens, you must identify this system as networked or non-networked, and set the default time zone and date/time. If this system is networked, the software will try to find the information it needs to identify your system; you will be prompted to supply any information it cannot find. > To begin identifying this system, press F2. ———————————————————————————————————————————— F2_Continue(✓) F6_Help ——Configure Multiple Network Interfaces——————————————————————————— Multiple network interfaces have been detected on this system. Specify all of the network interfaces you want to configure. Note: You must choose at least one interface to configure. Network interfaces —————————— [X] e1000g0 [ ] e1000g1 [ ] e1000g2 [ ] e1000g3 —————————————————————————————————————————————— F2_Continue(✓) F6_Help ——Subnet for e1000g0————————————————————————————————————— On this screen you must specify whether this system is part of a subnet. If you specify incorrectly, the system will have problems communicating on the network after you reboot. > To make a selection, use the arrow keys to highlight the option and press Return to mark it [X]. System part of a subnet ———————————— [X] Yes [ ] No ————————————————————————————————————————————————— F2_Continue(✓) F6_Help ——Netmask for e1000g0 —————————————————————————————————————— On this screen you must specify the netmask of your subnet. A default netmask is shown; do not accept the default unless you are sure it is correct for your subnet. A netmask must contain four sets of numbers separated by periods (for example 255.255.255.0). Netmask for e1000g0 【255.255.255.0】 ——————————————————————————————————————————————————— F2_Continue F6_Help ——IPv6 for e1000g0—————————————————————————————————————————— Specify whether or not you want to enable IPv6, the next generation Internet Protocol, on this network interface. Enabling IPv6 will have no effect if this machine is not on a network that provides IPv6 service. IPv4 service will not be affected if IPv6 is enabled. > To make a selection, use the arrow keys to highlight the option and press Return to mark it [X]. Enable IPv6 for e1000g0 ———————————— [ ] Yes [X] No ———————————————————————————————————————————————————— F2_Continue(✓) F6_Help ——Set the Default Route for e1000g0—————————————————————————————————— To specify the default route, you can let the software try to detect one upon reboot, you can specify the IP address of the router, or you can choose None. Choose None if you do not have a router on your subnet. > To make a selection, use the arrow keys to select your choice and press Return to mark it [X]. Default Route for e1000g0 ———————————————— [X] Detect one upon reboot [ ] Specify one [ ] None —————————————————————————————————————————————————————— F2_Continue(✓) F6_Help ——Confirm Information for e1000g0 —————————————————————————————————————— > Confirm the following information. If it is correct, press F2; to change any information, press F4. System part of a subnet: Yes Netmask: 255.255.255.0 Enable IPv6: No Default Route: Detect one upon reboot ———————————————————————————————————————————————————————— F2_Continue(✓) F4_Change F6_Help Just a moment... ——Configure Security Policy: ——————————————————————————————————————————— Specify Yes if the system will use the Kerberos security mechanism. Specify No if this system will use standard UNIX security. Configure Kerberos Security ———————————— [ ] Yes [X] No ————————————————————————————————————————————————————————— F2_Continue(✓) F6_Help ——Confirm Information—————————————————————————————————————————————— > Confirm the following information. If it is correct, press F2; to change any information, press F4. Configure Kerberos Security: No ————————————————————————————————————————————————————————— Please wait... F2_Continue(✓) F4_Change F6_Help ————————————————————————————————————————————————————————— Starting remote procedure call (RPC) services: ————————————————————————————————————————————————————————— ——Name Service ————————————————————————————————————————————————— On this screen you must provide name service information. Select the name service that will be used by this system, or None if your system will either not use a name service at all, or if it will use a name service not listed here. > To make a selection, use the arrow keys to highlight the option and press Return to mark it [X]. Name service —————— [X] NIS+ [ ] NIS [ ] DNS [ ] LDAP [ ] None ————————————————————————————————————————————————————————— F2_Continue(✓) F6_Help ——Domain Name ————————————————————————————————————————————————— On this screen you must specify the domain where this system resides. Make sure you enter the name correctly including capitalization and punctuation. Domain name: 【test】 ————————————————————————————————————————————————————————— F2_Continue(✓) F6_Help ——Name Server ————————————————————————————————————————————————— On this screen you must specify how to find a name server for this system. You can let the software try to find one, or you can specify one. The software can find a name server only if it is on your local subnet. > To make a selection, use the arrow keys to highlight the option and press Return to mark it [X]. Name server —————— [X] Find one [ ] Specify one —————————————————————————————————————————————————————————— F2_Continue(✓) F6_Help q Confirm Information qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq > Confirm the following information. If it is correct, press F2; to change any information, press F4. Name service: NIS+ Domain name: test Name server: Find one —————————————————————————————————————————————————————————— F2_Continue(✓) F4_Change F6_Help ——System Identification Error ——————————————————————————————————————————— The following error occurred while trying to set up the NIS binding directory for domain test to facilitate automatic server location: Error: No servers responding, use -H option This machine is in the "test." NIS+ domain. Setting up NIS+ client ... . > Press F2 to dismiss this message. —————————————————————————————————————————————————————————— F2_OK(✓) F6_Help ——Name Service—————————————————————————————————————————————— On this screen you must provide name service information. Select the name service that will be used by this system, or None if your system will either not use a name service at all, or if it will use a name service not listed here. > To make a selection, use the arrow keys to highlight the option and press Return to mark it [X]. Name service qqqqqqqqqqqq [X] NIS+ [ ] NIS [ ] DNS [ ] LDAP [ ] None —————————————————————————————————————————————————————————— F2_Continue(✓) F6_Help ——Domain Name —————————————————————————————————————————————————— On this screen you must specify the domain where this system resides. Make sure you enter the name correctly including capitalization and punctuation. Domain name: test ——————————————————————————————————————————————————————————— F2_Continue(✓) F6_Help ——Name Server ——————————————————————————————————————————————————— On this screen you must specify how to find a name server for this system. You can let the software try to find one, or you can specify one. The software can find a name server only if it is on your local subnet. > To make a selection, use the arrow keys to highlight the option and press Return to mark it [X]. Name server qqqqqqqqqqqqqqq [ ] Find one [ X ] Specify one ——————————————————————————————————————————————————————————— F2_Continue(✓) F6_Help ——Name Server Information —————————————————————————————————————————————— On this screen you must enter the host name and IP address of your name server. Host names must be at least two characters, and may contain letters, digits, and minus signs (-). IP addresses must contain four sets of numbers separated by periods (for example 129.200.9.1). Server's host name: 【xxxxx】 Server's IP address:【10.23.241.18x】 ——————————————————————————————————————————————————————————— F2_Continue(✓) F6_Help ——Confirm Information ———————————————————————————————————————————————— > Confirm the following information. If it is correct, press F2; to change any information, press F4. Name service: NIS+ Domain name: test Name server: Specify one Server's host name: test1 Server's IP address: 10.23.241.181 ———————————————————————————————————————————————————————————— Just a moment... F2_Continue(✓) F4_Change F6_Help ——Name Service Error —————————————————————————————————————————————————— The following error occurred while trying to initialize this system as an NIS+ client of server test1 for domain test: Error: Could not create a valid NIS+ coldstart file test.: Error in accessing NIS+ cold start file... is NIS+ installed?. This machine is in the "test." NIS+ domain. Setting up NIS+ client ... . To resolve this problem, run 'nisclient -i' after the system has booted, or manually enter new name service information. Enter new name service information? ———————————————————— [ ] Yes [ X ] No —————————————————————————————————————————————————————————————— F2_Continue(✓) F6_Help ——NFSv4 Domain Name——————————————————————————————————————————————————— NFS version 4 uses a domain name that is automatically derived from the system's naming services. The derived domain name is sufficient for most configurations. In a few cases, mounts that cross domain boundaries might cause files to appear to be owned by "nobody" due to the lack of a common domain name. The current NFSv4 default domain is: "test" NFSv4 Domain Configuration ————————————————————————— [X] Use the NFSv4 domain derived by the system [ ] Specify a different NFSv4 domain —————————————————————————————————————————————————————————————— F2_Continue(✓) F6_Help ——Confirm Information for NFSv4 Domain——————————————————————————————————————————— > Confirm the following information. If it is correct, press F2; to change any information, press F4. NFSv4 Domain Name: <<Value to be derived dynamically>> ——————————————————————————————————————————————————————————————— F2_Continue(✓) F4_Change F6_Help ——Time Zone ————————————————————————————————————————————————————————— On this screen you must specify your default time zone. You can specify a time zone in three ways: select one of the continents or oceans from the list, select other - offset from GMT, or other - specify time zone file. > To make a selection, use the arrow keys to highlight the option and press Return to mark it [X]. Continents and Oceans ————————————————— - [ ] Africa x [ ] Americas x [ ] Antarctica x [ ] Arctic Ocean x [ ✓ ] Asia x [ ] Atlantic Ocean x [ ] Australia x [ ] Europe v [ ] Indian Ocean ———————————————————————————————————————————————————————————————— - [ ] Afghanistan x [ ] Armenia x [ ] Azerbaijan x [ ] Bahrain x [ ] Bangladesh x [ ] Bhutan x [ ] Brunei x [ ] Cambodia x [X] China x [ ] Cyprus x [ ] East Timor x [ ] Georgia v [ ] Hong Kong ———————————————————————————————————————————————————————————————— F2_Continue(✓) F6_Help ——Date and Time ——————————————————————————————————————————————————————— > Accept the default date and time or enter new values. Date and time: 2023-03-23 22:04 Year (4 digits) : 2023 Month (1-12) : 03 Day (1-31) : 23 Hour (0-23) : 22 ———————————————————————————————————————————————————————————————— F2_Continue(✓) F6_Help ——Confirm Information ————————————————————————————————————————————————————— > Confirm the following information. If it is correct, press F2; to change any information, press F4. Time zone: PRC Date and time: 2023-03-27 14:41:00 ———————————————————————————————————————————————————————————————— F2_Continue(✓) F4_Change F6_Help ——Root Password ——————————————————————————————————————————————————————— Please enter the root password for this system. The root password may contain alphanumeric and special characters. For security, the password will not be displayed on the screen as you type it. > If you do not want a root password, leave both entries blank. Root password: 【xxxxxxxx】 Root password: 【xxxxxxxx】 ————————————————————————————————————————————————————————————————— F2_Continue(✓) F6_Help ——Enabling remote services ———————————————————————————————————————————————————— Would you like to enable network services for use by remote clients? Selecting "No" provides a more secure configuration in which Secure Shell is the only network service provided to remote clients. Selecting "Yes" enables a larger set of services as in previous Solaris releases. If in doubt, it is safe to select "No" as any services can be individually enabled after installation. Note: This choice only affects initial installs. It doesn't affect upgrades. Remote services enabled ———————————— [X] Yes [ ] No —————————————————————————————————————————————————————————————————— F2_Continue(✓) F6_Help System identification complete. Starting Solaris installation program... Executing JumpStart preinstall phase... Searching for SolStart directory... Checking rules.ok file... Using begin script: install_begin Using finish script: patch_finish Executing SolStart preinstall phase... Executing begin script "install_begin"... Begin script install_begin execution completed. ——Solaris Interactive Installation ———————————————————————————————————————————————————— On the following screens, you can accept the defaults or you can customize how Solaris software will be installed by: - Selecting the type of Solaris software to install - Selecting disks to hold software you've selected - Selecting unbundled products to be installed with Solaris - Specifying how file systems are laid out on the disks After completing these tasks, a summary of your selections (called a profile) will be displayed. There are two ways to install your Solaris software: - "Standard" installs your system from a standard Solaris Distribution. Selecting "Standard" allows you to choose between initial install and upgrade, if your system is upgradable. - "Flash" installs your system from one or more Flash Archives. —————————————————————————————————————————————————————————————————— F2_Standard(✓) F4_Flash F5_Exit F6_Help ——iSCSI Installation ————————————————————————————————————————————————————————— Do you want to install Oracle Solaris 10 on an iSCSI target? NOTE: You must have created the iSCSI target before beginning the OS installation and the target system should be running Oracle Solaris 11 or Solaris 10 U5 or greater. If you choose to install the OS on a non-iSCSI target, you will be taken directly to the Oracle Solaris 10 installation screens. [X] Install on non-iSCSI target [ ] Install on iSCSI target ——————————————————————————————————————————————————————————————————— F2_Continue(✓) F3_Go Back F5_Exit ——Warning—————————————————————————————————————————————————————————————— One or more disks are found, but one of the following problems exists : > Hardware failure > Unformatted disk. #如果是新盘,最后会提示安装失败, #F2会进入到一个界面,format执行label磁盘 #划好盘后重新开始安装即可 ——————————————————————————————————————————————————————————————————— F2_OK(✓) Solaris installation program exited. #分区操作如下: # format Searching for disks...done c0t1d0: configured with capacity of 279.38GB c0t3d0: configured with capacity of 279.38GB AVAILABLE DISK SELECTIONS: 0. c0t1d0 <SUN300G cyl 46873 alt 2 hd 20 sec 625> /pci@780/pci@0/pci@9/scsi@0/sd@1,0 1. c0t3d0 <SUN300G cyl 46873 alt 2 hd 20 sec 625> /pci@780/pci@0/pci@9/scsi@0/sd@3,0 Specify disk (enter its number): 0 #选择0号磁盘(显示命令菜单) selecting c0t1d0 [disk formatted] Disk not labeled. Label it now? y FORMAT MENU: disk - select a disk type - select (define) a disk type partition - select (define) a partition table current - describe the current disk format - format and analyze the disk repair - repair a defective sector label - write label to the disk analyze - surface analysis defect - defect list management backup - search for backup labels verify - read and display labels save - save new disk/partition definitions inquiry - show vendor, product and revision volname - set 8-character volume name !<cmd> - execute <cmd>, then return quit format> partition #进入创建何修改分片菜单(显示所有片,2片代表所有磁盘) #相当于fdisk PARTITION MENU: 0 - change `0' partition 1 - change `1' partition 2 - change `2' partition 3 - change `3' partition 4 - change `4' partition 5 - change `5' partition 6 - change `6' partition 7 - change `7' partition select - select a predefined table modify - modify a predefined partition table name - name the current table print - display the current table label - write partition map and label to the disk !<cmd> - execute <cmd>, then return quit partition> print #显示当前分区表 #一共0~7共8个片,2片0~65532,代表所有磁盘 Current partition table (original): Total disk cylinders available: 46873 + 2 (reserved cylinders) Part Tag Flag Cylinders Size Blocks 0 root wm 0 - 20 128.17MB (21/0/0) 262500 1 swap wu 21 - 41 128.17MB (21/0/0) 262500 2 backup wu 0 - 46872 279.38GB (46873/0/0) 585912500 3 unassigned wm 0 0 (0/0/0) 0 4 unassigned wm 0 0 (0/0/0) 0 5 unassigned wm 0 0 (0/0/0) 0 6 usr wm 42 - 46872 279.13GB (46831/0/0) 585387500 7 unassigned wm 0 0 (0/0/0) 0 partition> 0 #选择0号片(unassigned表示未划分的) Part Tag Flag Cylinders Size Blocks 0 root wm 0 - 20 128.17MB (21/0/0) 262500 Enter partition id tag[root]: #回车 Enter partition permission flags[wm]: #回车 Enter new starting cyl[0]:xxxx #开始柱面(不能与其它分片重叠,会导致数据丢失) #与print显示结果中的Cylinders列进行对比 Enter partition size[262500b, 21c, 20e, 128.17mb, 0.13gb]: partition> 200gb `200gb` is not expected. partition> print #再次查看分区是否有重叠 Current partition table (unnamed): Total disk cylinders available: 46873 + 2 (reserved cylinders) Part Tag Flag Cylinders Size Blocks 0 root wm 0 - 1677 10.00GB (1678/0/0) 20975000 1 swap wu 21 - 41 128.17MB (21/0/0) 262500 2 backup wu 0 - 46872 279.38GB (46873/0/0) 585912500 3 unassigned wm 0 0 (0/0/0) 0 4 unassigned wm 0 0 (0/0/0) 0 5 unassigned wm 0 0 (0/0/0) 0 6 usr wm 42 - 46872 279.13GB (46831/0/0) 585387500 7 unassigned wm 0 0 (0/0/0) 0 partition> label #保存,否则新分区丢失 Ready to label disk, continue? y partition> quit #退出 FORMAT MENU: disk - select a disk type - select (define) a disk type partition - select (define) a partition table current - describe the current disk format - format and analyze the disk repair - repair a defective sector label - write label to the disk analyze - surface analysis defect - defect list management backup - search for backup labels verify - read and display labels save - save new disk/partition definitions inquiry - show vendor, product and revision volname - set 8-character volume name !<cmd> - execute <cmd>, then return quit format> save #保存 format> quit # exit Exiting to shell... # exit Serial console, reverting to text install Beginning system identification... Searching for configuration file(s)... Search complete. Discovering additional network configuration... ——Select a Language—————————————————————— 0. English 1. Brazilian Portuguese 2. French 3. German 4. Italian 5. Japanese 6. Korean 7. Simplified Chinese 8. Spanish 9. Swedish 10. Traditional Chinese Please make a choice (0 - 10), or press h or ? for help: 0 ——What type of terminal are you using?—————————————————————— 1) ANSI Standard CRT 2) DEC VT52 3) DEC VT100 4) Heathkit 19 5) Lear Siegler ADM31 6) PC Console 7) Sun Command Tool 8) Sun Workstation 9) Televideo 910 10) Televideo 925 11) Wyse Model 50 12) X Terminal Emulator (xterms) 13) CDE Terminal Emulator (dtterm) 14) Other Type the number of your choice and press Return: 3 Completing system identification... ——The Oracle Solaris Installation Program —————————————————————— The Solaris installation program is divided into a series of short sections where you'll be prompted to provide information for the installation. At the end of each section, you'll be able to change the selections you've made before continuing. About navigation... - The mouse cannot be used - If your keyboard does not have function keys, or they do not respond, press ESC; the legend at the bottom of the screen will change to show the ESC keys to use for navigation. —————————————————————————————————————————— F2_Continue(✓) F6_Help ——Identify This System —————————————————————————————— On the next screens, you must identify this system as networked or non-networked, and set the default time zone and date/time. If this system is networked, the software will try to find the information it needs to identify your system; you will be prompted to supply any information it cannot find. > To begin identifying this system, press F2. ———————————————————————————————————————————— F2_Continue(✓) F6_Help ——Configure Multiple Network Interfaces——————————————————————————— Multiple network interfaces have been detected on this system. Specify all of the network interfaces you want to configure. Note: You must choose at least one interface to configure. Network interfaces —————————— [X] e1000g0 [ ] e1000g1 [ ] e1000g2 [ ] e1000g3 —————————————————————————————————————————————— F2_Continue(✓) F6_Help ——Subnet for e1000g0————————————————————————————————————— On this screen you must specify whether this system is part of a subnet. If you specify incorrectly, the system will have problems communicating on the network after you reboot. > To make a selection, use the arrow keys to highlight the option and press Return to mark it [X]. System part of a subnet ———————————— [X] Yes [ ] No ————————————————————————————————————————————————— F2_Continue(✓) F6_Help ——Netmask for e1000g0 —————————————————————————————————————— On this screen you must specify the netmask of your subnet. A default netmask is shown; do not accept the default unless you are sure it is correct for your subnet. A netmask must contain four sets of numbers separated by periods (for example 255.255.255.0). Netmask for e1000g0 【255.255.255.0】 ——————————————————————————————————————————————————— F2_Continue F6_Help ——IPv6 for e1000g0—————————————————————————————————————————— Specify whether or not you want to enable IPv6, the next generation Internet Protocol, on this network interface. Enabling IPv6 will have no effect if this machine is not on a network that provides IPv6 service. IPv4 service will not be affected if IPv6 is enabled. > To make a selection, use the arrow keys to highlight the option and press Return to mark it [X]. Enable IPv6 for e1000g0 ———————————— [ ] Yes [X] No ———————————————————————————————————————————————————— F2_Continue(✓) F6_Help ——Set the Default Route for e1000g0—————————————————————————————————— To specify the default route, you can let the software try to detect one upon reboot, you can specify the IP address of the router, or you can choose None. Choose None if you do not have a router on your subnet. > To make a selection, use the arrow keys to select your choice and press Return to mark it [X]. Default Route for e1000g0 ——————————————— [X] Detect one upon reboot [ ] Specify one [ ] None —————————————————————————————————————————————————————— F2_Continue(✓) F6_Help ——Confirm Information for e1000g0 —————————————————————————————————————— > Confirm the following information. If it is correct, press F2; to change any information, press F4. System part of a subnet: Yes Netmask: 255.255.255.0 Enable IPv6: No Default Route: Detect one upon reboot ———————————————————————————————————————————————————————— F2_Continue(✓) F4_Change F6_Help Just a moment... ——Configure Security Policy: ——————————————————————————————————————————— Specify Yes if the system will use the Kerberos security mechanism. Specify No if this system will use standard UNIX security. Configure Kerberos Security ———————————— [ ] Yes [X] No ————————————————————————————————————————————————————————— F2_Continue(✓) F6_Help ——Confirm Information—————————————————————————————————————————————— > Confirm the following information. If it is correct, press F2; to change any information, press F4. Configure Kerberos Security: No ————————————————————————————————————————————————————————— Please wait... F2_Continue(✓) F4_Change F6_Help ————————————————————————————————————————————————————————— Starting remote procedure call (RPC) services: ————————————————————————————————————————————————————————— ——Name Service ————————————————————————————————————————————————— On this screen you must provide name service information. Select the name service that will be used by this system, or None if your system will either not use a name service at all, or if it will use a name service not listed here. > To make a selection, use the arrow keys to highlight the option and press Return to mark it [X]. Name service —————— [X] NIS+ [ ] NIS [ ] DNS [ ] LDAP [ ] None ————————————————————————————————————————————————————————— F2_Continue(✓) F6_Help ——Domain Name ————————————————————————————————————————————————— On this screen you must specify the domain where this system resides. Make sure you enter the name correctly including capitalization and punctuation. Domain name: 【test】 ————————————————————————————————————————————————————————— F2_Continue(✓) F6_Help ——Name Server ————————————————————————————————————————————————— On this screen you must specify how to find a name server for this system. You can let the software try to find one, or you can specify one. The software can find a name server only if it is on your local subnet. > To make a selection, use the arrow keys to highlight the option and press Return to mark it [X]. Name server —————— [X] Find one [ ] Specify one —————————————————————————————————————————————————————————— F2_Continue(✓) F6_Help ——Confirm Information ——————————————————————————————————————————————— > Confirm the following information. If it is correct, press F2; to change any information, press F4. Name service: NIS+ Domain name: test Name server: Find one —————————————————————————————————————————————————————————— F2_Continue(✓) F4_Change F6_Help ——System Identification Error ——————————————————————————————————————————— The following error occurred while trying to set up the NIS binding directory for domain test to facilitate automatic server location: Error: No servers responding, use -H option This machine is in the "test." NIS+ domain. Setting up NIS+ client ... . > Press F2 to dismiss this message. —————————————————————————————————————————————————————————— F2_OK(✓) F6_Help ——Name Service—————————————————————————————————————————————— On this screen you must provide name service information. Select the name service that will be used by this system, or None if your system will either not use a name service at all, or if it will use a name service not listed here. > To make a selection, use the arrow keys to highlight the option and press Return to mark it [X]. Name service qqqqqqqqqqqq [X] NIS+ [ ] NIS [ ] DNS [ ] LDAP [ ] None —————————————————————————————————————————————————————————— F2_Continue(✓) F6_Help ——Domain Name —————————————————————————————————————————————————— On this screen you must specify the domain where this system resides. Make sure you enter the name correctly including capitalization and punctuation. Domain name: test ——————————————————————————————————————————————————————————— F2_Continue(✓) F6_Help ——Name Server ——————————————————————————————————————————————————— On this screen you must specify how to find a name server for this system. You can let the software try to find one, or you can specify one. The software can find a name server only if it is on your local subnet. > To make a selection, use the arrow keys to highlight the option and press Return to mark it [X]. Name server —————— [ ] Find one [ X ] Specify one ——————————————————————————————————————————————————————————— F2_Continue(✓) F6_Help ——Name Server Information —————————————————————————————————————————————— On this screen you must enter the host name and IP address of your name server. Host names must be at least two characters, and may contain letters, digits, and minus signs (-). IP addresses must contain four sets of numbers separated by periods (for example 129.200.9.1). Server's host name: 【xxxxx】 Server's IP address:【10.23.241.18x】 ——————————————————————————————————————————————————————————— F2_Continue(✓) F6_Help ——Confirm Information ———————————————————————————————————————————————— > Confirm the following information. If it is correct, press F2; to change any information, press F4. Name service: NIS+ Domain name: test Name server: Specify one Server's host name: test1 Server's IP address: 10.23.241.181 ———————————————————————————————————————————————————————————— Just a moment... F2_Continue(✓) F4_Change F6_Help ——Name Service Error —————————————————————————————————————————————————— The following error occurred while trying to initialize this system as an NIS+ client of server test1 for domain test: Error: Could not create a valid NIS+ coldstart file test.: Error in accessing NIS+ cold start file... is NIS+ installed?. This machine is in the "test." NIS+ domain. Setting up NIS+ client ... . To resolve this problem, run 'nisclient -i' after the system has booted, or manually enter new name service information. Enter new name service information? ———————————————————— [ ] Yes [ X ] No —————————————————————————————————————————————————————————————— F2_Continue(✓) F6_Help ——NFSv4 Domain Name——————————————————————————————————————————————————— NFS version 4 uses a domain name that is automatically derived from the system's naming services. The derived domain name is sufficient for most configurations. In a few cases, mounts that cross domain boundaries might cause files to appear to be owned by "nobody" due to the lack of a common domain name. The current NFSv4 default domain is: "test" NFSv4 Domain Configuration ————————————————————————— [X] Use the NFSv4 domain derived by the system [ ] Specify a different NFSv4 domain —————————————————————————————————————————————————————————————— F2_Continue(✓) F6_Help ——Confirm Information for NFSv4 Domain——————————————————————————————————————————— > Confirm the following information. If it is correct, press F2; to change any information, press F4. NFSv4 Domain Name: <<Value to be derived dynamically>> ——————————————————————————————————————————————————————————————— F2_Continue(✓) F4_Change F6_Help ——Time Zone ————————————————————————————————————————————————————————— On this screen you must specify your default time zone. You can specify a time zone in three ways: select one of the continents or oceans from the list, select other - offset from GMT, or other - specify time zone file. > To make a selection, use the arrow keys to highlight the option and press Return to mark it [X]. Continents and Oceans ————————————————— - [ ] Africa x [ ] Americas x [ ] Antarctica x [ ] Arctic Ocean x [ ✓ ] Asia x [ ] Atlantic Ocean x [ ] Australia x [ ] Europe v [ ] Indian Ocean ———————————————————————————————————————————————————————————————— - [ ] Afghanistan x [ ] Armenia x [ ] Azerbaijan x [ ] Bahrain x [ ] Bangladesh x [ ] Bhutan x [ ] Brunei x [ ] Cambodia x [X] China x [ ] Cyprus x [ ] East Timor x [ ] Georgia v [ ] Hong Kong ———————————————————————————————————————————————————————————————— F2_Continue(✓) F6_Help ——Date and Time ——————————————————————————————————————————————————————— > Accept the default date and time or enter new values. Date and time: 2023-03-23 22:04 Year (4 digits) : 2023 Month (1-12) : 03 Day (1-31) : 23 Hour (0-23) : 22 ———————————————————————————————————————————————————————————————— F2_Continue(✓) F6_Help ——Confirm Information ————————————————————————————————————————————————————— > Confirm the following information. If it is correct, press F2; to change any information, press F4. Time zone: PRC Date and time: 2023-03-27 14:41:00 ———————————————————————————————————————————————————————————————— F2_Continue(✓) F4_Change F6_Help ——Root Password ——————————————————————————————————————————————————————— Please enter the root password for this system. The root password may contain alphanumeric and special characters. For security, the password will not be displayed on the screen as you type it. > If you do not want a root password, leave both entries blank. Root password: 【xxxxxxxx】 Root password: 【xxxxxxxx】 ————————————————————————————————————————————————————————————————— F2_Continue(✓) F6_Help ——Enabling remote services ———————————————————————————————————————————————————— Would you like to enable network services for use by remote clients? Selecting "No" provides a more secure configuration in which Secure Shell is the only network service provided to remote clients. Selecting "Yes" enables a larger set of services as in previous Solaris releases. If in doubt, it is safe to select "No" as any services can be individually enabled after installation. Note: This choice only affects initial installs. It doesn't affect upgrades. Remote services enabled ———————————— [X] Yes [ ] No —————————————————————————————————————————————————————————————————— F2_Continue(✓) F6_Help System identification complete. Starting Solaris installation program... Executing JumpStart preinstall phase... Searching for SolStart directory... Checking rules.ok file... Using begin script: install_begin Using finish script: patch_finish Executing SolStart preinstall phase... Executing begin script "install_begin"... Begin script install_begin execution completed. ——Solaris Interactive Installation ———————————————————————————————————————————————————— On the following screens, you can accept the defaults or you can customize how Solaris software will be installed by: - Selecting the type of Solaris software to install - Selecting disks to hold software you've selected - Selecting unbundled products to be installed with Solaris - Specifying how file systems are laid out on the disks After completing these tasks, a summary of your selections (called a profile) will be displayed. There are two ways to install your Solaris software: - "Standard" installs your system from a standard Solaris Distribution. Selecting "Standard" allows you to choose between initial install and upgrade, if your system is upgradable. - "Flash" installs your system from one or more Flash Archives. —————————————————————————————————————————————————————————————————— F2_Standard(✓) F4_Flash F5_Exit F6_Help ——iSCSI Installation ————————————————————————————————————————————————————————— Do you want to install Oracle Solaris 10 on an iSCSI target? NOTE: You must have created the iSCSI target before beginning the OS installation and the target system should be running Oracle Solaris 11 or Solaris 10 U5 or greater. If you choose to install the OS on a non-iSCSI target, you will be taken directly to the Oracle Solaris 10 installation screens. [X] Install on non-iSCSI target [ ] Install on iSCSI target ——————————————————————————————————————————————————————————————————— F2_Continue(✓) F3_Go Back F5_Exit ——Eject a CD/DVD Automatically?———————————————————————————————————————————————————— During the installation of Solaris software, you may be using one or more CDs/DVDs. You can choose to have the system eject each CD/DVD automatically after it is installed or you can choose to manually eject each CD/DVD. [X] Automatically eject CD/DVD [ ] Manually eject CD/DVD ——————————————————————————————————————————————————————————————————— F2_Continue(✓) F3_Go Back F5_Exit ——Reboot After Installation?—————————————————————————————————————————————————————— After Solaris software is installed, the system must be rebooted. You can choose to have the system automatically reboot, or you can choose to manually reboot the system if you want to run scripts or do other customizations before the reboot. You can manually reboot a system by using the reboot(1M) command. [X] Auto Reboot [ ] Manual Reboot ——————————————————————————————————————————————————————————————————— F2_Continue(✓) F3_Go Back F5_Exit ——Choose Media——————————————————————————————————————————————————————————— Please specify the media from which you will install the Solaris Operating System. Media: [ ] CD/DVD [X] Network File System ——————————————————————————————————————————————————————————————————— F2_Continue(✓) F3_Go Back F5_Exit ——Specify Network File System Path ——————————————————————————————————————————————————— Please specify the path to the network file system from which you will install the Solaris Operating System. Example: NFS Location: server:/path_to_Solaris_image ============================================================================ NFS Location: 10.23.241.100:/export/home/solaris_install/ ———————————————————————————————————————————————————————————————————— F2_Continue(✓) F3_Go Back ——Solaris Interactive Installation ————————————————————————————————————————————————————— This system is upgradable, so there are two ways to install the Solaris software. The Upgrade option updates the Solaris software to the new release, saving as many modifications to the previous version of Solaris software as possible. Back up the system before using the Upgrade option. The Initial option overwrites the system disks with the new version of Solaris software. This option allows you to preserve any existing file systems. Back up any modifications made to the previous version of Solaris software before starting the Initial option. After you select an option and complete the tasks that follow, a summary of your actions will be displayed. ————————————————————————————————————————————————————————————————————— F2_Upgrade(✓) F3_Go Back F4_Initial F5_Exit F6_Help ——Initializing ——————————————————————————————————————————————————————————————— The system is being initialized. Loading install media, please wait... ——Patch Analysis ————————————————————————————————————————————————————————————— You have selected an upgrade from Solaris 10 to a Solaris 10 Update Release. Any patches that you applied to your system that are not included in the Update Release will be removed. An analysis of your system will determine which (if any) patches will be removed. > To perform the analysis, select Analyze. > To skip the analysis and proceed with the upgrade, select Continue. —————————————————————————————————————————————————————————————————————— F2_Continue(✓) F3_Go Back F4_Analyze F5_Exit F6_Help ——License ———————————————————————————————————————————————————————————————— You acknowledge that your use of this Oracle Solaris software product is subject to (i) the license terms that you accepted when you obtained the right to use Oracle Solaris software; or (ii) the license terms that you agreed to when you placed your Oracle Solaris software order with Oracle; or (iii) the Oracle Solaris software license terms included with the hardware that you acquired from Oracle; or, if (i), (ii) or (iii) are not applicable, then, (iv) the OTN License Agreement for Oracle Solaris (which you acknowledge you have read and agree to) available at http://www.oracle.com/technetwork/licenses/ solaris-cluster-express-license-167852.html Note: Software downloaded for trial use or downloaded as replacement media may not be used to update any unsupported software. —————————————————————————————————————————————————————————————————————— F2_Accept License(✓) F5_Exit ——Select Geographic Regions ———————————————————————————————————————————————————————— Select the geographic regions for which support should be installed. > [ ] South America > [ ] Central America > [ ] Australasia > [ ] Southern Europe > [ ] Eastern Europe > [ ] Middle East > [ ] Northern Africa > [ ] Southern Africa > [✓] Asia > [ ] Central Europe > [ ] North America > [ ] Western Europe > [ ] Northern Europe Press Return to show components Move left, right, up, down using the arrow keys —————————————————————————————————————————————————————————————————————— F2_Continue(✓) F3_Go Back F5_Exit F6_Help ——Select System Locale ——————————————————————————————————————————————————————————— Select the initial locale to be used after the system has been installed. [X] POSIX C ( C ) Asia [ ] Simplified Chinese EUC ( zh ) [ ] Simplified Chinese GB18030 ( zh_CN.GB18030 ) [ ] Simplified Chinese GBK ( zh.GBK ) [ ] Simplified Chinese UTF-8 ( zh.UTF-8 ) ——————————————————————————————————————————————————————————————————————— F2_Continue(✓) F3_Go Back F5_Exit F6_Help ——Additional Products ———————————————————————————————————————————————————————————— To scan for additional products, select the location you wish to scan. Products found at the selected location that are in a Web Start Ready install form will be added to the Products list. Web Start Ready product scan location: [X] None [ ] CD/DVD [ ] Network File System ——————————————————————————————————————————————————————————————————————— F2_Continue(✓) F3_Go Back F5_Exit ——Choose Filesystem Type ——————————————————————————————————————————————————————————— Select the filesystem to use for your Solaris installation [X] UFS [ ] ZFS ——————————————————————————————————————————————————————————————————————— F2_Continue(✓) F3_Go Back F5_Exit F6_Help ——Select Software —————————————————————————————————————————————————————————————— Select the Solaris software to install on the system. NOTE: After selecting a software group, you can add or remove software by customizing it. However, this requires understanding of software dependencies and how Solaris software is packaged. [ ] Entire Distribution plus OEM support ....... 8760.00 MB [X] Entire Distribution ........................ 8719.00 MB [ ] Developer System Support ................... 8489.00 MB [ ] End User System Support .................... 7436.00 MB [ ] Core System Support ........................ 3147.00 MB [ ] Reduced Networking Core System Support ..... 3092.00 MB ———————————————————————————————————————————————————————————————————————— F2_Continue(✓) F3_Go Back F4_Customize F5_Exit F6_Help ——Select Disks ————————————————————————————————————————————————————————————————— On this screen you must select the disks for installing Solaris software. Start by looking at the Suggested Minimum field; this value is the approximate space needed to install the software you've selected. Keep selecting disks until the Total Selected value exceeds the Suggested Minimum value. NOTE: ** denotes current boot disk Disk Device Available Space ============================================================================= [X] c0t1d0 286090 MB (F4 to edit) [ ] c0t3d0 286090 MB Total Selected: 286090 MB Suggested Minimum: 6719 MB —————————————————————————————————————————————————————————————————————— F2_Continue(✓) F3_Go Back F4_Edit F5_Exit F6_Help ——Preserve Data? —————————————————————————————————————————————————————————————— Do you want to preserve existing data? At least one of the disks you've selected for installing Solaris software has file systems or unnamed slices that you may want to save. ——————————————————————————————————————————————————————————————————————— Esc-2_Continue(✓) F3_Go Back F4_Preserve F5_Exit F6_Help ——Automatically Layout File Systems? ————————————————————————————————————————————————————— Do you want to use auto-layout to automatically layout file systems? Manually laying out file systems requires advanced system administration skills. ——————————————————————————————————————————————————————————————————————— F2_Auto Layout(✓) F3_Go Back F4_Manual Layout F5_Exit F6_Help ——File System and Disk Layout ————————————————————————————————————————————————————————— The summary below is your current file system and disk layout, based on the information you've supplied. NOTE: If you choose to customize, you should understand file systems, their intended purpose on the disk, and how changing them may affect the operation of the system. File sys/Mnt point Disk/Slice Size ======================================================================== overlap c0t1d0s2 286090 MB ———————————————————————————————————————————————————————————————————————— Esc-2_Continue F3_Go Back F4_Customize F5_Exit F6_Help ——Customize Disk: c0t1d0 ———————————————————————————————————————————————————————————— Boot Device: c0t1d0s0 Entry: Recommended: MB Minimum: MB ================================================================================ Slice Mount Point Size (MB) 0 / 70001 1 swap 16003 2 overlap 286090 3 /var 20001 4 /opt 20001 5 /home 130004 6 0 7 0 ================================================================================ Capacity: 286090 MB Allocated: 256010 MB Rounding Error: 2 MB Free: 30078 MB ——File System and Disk Layout —————————————————————————————————————————————————————————— The summary below is your current file system and disk layout, based on the information you've supplied. NOTE: If you choose to customize, you should understand file systems, their intended purpose on the disk, and how changing them may affect the operation of the system. File sys/Mnt point Disk/Slice Size ======================================================================== / c0t1d0s0 70001 MB swap c0t1d0s1 16003 MB overlap c0t1d0s2 286090 MB /var c0t1d0s3 20001 MB /opt c0t1d0s4 20001 MB /home c0t1d0s5 130004 MB —————————————————————————————————————————————————————————————————————————— Esc-2_Continue F3_Go Back F4_Customize F5_Exit F6_Help ——Mount Remote File Systems? ———————————————————————————————————————————————————————————— Do you want to mount software from a remote file server? This may be necessary if you had to remove software because of disk space problems. ——————————————————————————————————————————————————————————————————————————— Esc-2_Continue F3_Go Back F4_Remote Mounts F5_Exit F6_Help ——Profile —————————————————————————————————————————————————————————————————————— The information shown below is your profile for installing Solaris software. It reflects the choices you've made on previous screens. ============================================================================ - Installation Option: Initial x Boot Device: c0t1d0 x Root File System Type: UFS x Client Services: None x x Regions: Asia x System Locale: Simplified Chinese UTF-8 (zh.UTF-8 x x Software: Solaris 10, Entire Distribution plus OEM su x x File System and Disk Layout: / c0t1d0s0 70001 MB x swap c0t1d0s1 16003 MB x /var c0t1d0s3 20001 MB x /opt c0t1d0s4 20001 MB v /home c0t1d0s5 130004 MB ————————————————————————————————————————————————————————————————————————————— Esc-2_Begin Installation F4_Change F5_Exit F6_Help ——Warning ——————————————————————————————————————————————————————————————————————— The following disk configuration condition(s) have been detected. Errors must be fixed to ensure a successful installation. Warnings can be ignored without causing the installation to fail. WARNING: Unused disk space (c0t1d0) ————————————————————————————————————————————————————————————————————————————— Esc-2_OK Esc-5_Cancel Preparing system for Solaris install Configuring disk (c0t1d0) - Creating Solaris disk label (VTOC) Creating and checking file systems - Creating / (c0t1d0s0) - Creating /var (c0t1d0s3) - Creating /opt (c0t1d0s4) - Creating /home (c0t1d0s5) Beginning Solaris software installation Solaris Initial Install MBytes Installed: 0.00 MBytes Remaining: 5237.81 Installing: Fujitsu SunOS Header Files | | | | | | 0 20 40 60 80 100 Solaris 10 software installation succeeded Customizing system files - Mount points table (/etc/vfstab) - Unselected disk mount points (/var/sadm/system/data/vfstab.unselected) - Network host addresses (/etc/hosts) - Environment variables (/etc/default/init) Cleaning devices Customizing system devices - Physical devices (/devices) - Logical devices (/dev) Installing boot information - Installing boot blocks (c0t1d0s0) - Installing boot blocks (/dev/rdsk/c0t1d0s0) Installation log location - /a/var/sadm/system/logs/install_log (before reboot) - /var/sadm/system/logs/install_log (after reboot) Installation complete Executing SolStart postinstall phase... Executing finish script "patch_finish"... Finish script patch_finish execution completed. Executing JumpStart postinstall phase... The begin script log 'begin.log' is located in /var/sadm/system/logs after reboot. The finish script log 'finish.log' is located in /var/sadm/system/logs after reboot. Launching installer. Please Wait... Installing Additional Software |-1%--------------25%-----------------50%-----------------75%--------------100%| Pausing for 30 seconds at the "Summary" screen. The wizard will continue to the next step unless you select "Pause". Enter 'p' to pause. Enter 'c' to continue. [c] Creating boot_archive for /a updating /a/platform/sun4v/boot_archive syncing file systems... done rebooting... SC Alert: Host System has Reset SC Alert: CRITICAL ALARM is set / Netra T2000, No Keyboard Copyright 2008 Sun Microsystems, Inc. All rights reserved. OpenBoot 4.28.9, 16256 MB memory available, Serial #82659166. Ethernet address 0:14:4f:ed:47:5e, Host ID: 84ed475e. Boot device: disk:a 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: radius-4 Configuring devices. Loading smf(5) service descriptions: 188/188 Creating new rsa public/private host key pair Creating new dsa public/private host key pair Mar 28 13:27:33 svc.startd[9]: svc:/network/rpc/nisplus:default: Method "/lib/svc/method/nisplus" failed with exit status 96. Mar 28 13:27:33 svc.startd[9]: network/rpc/nisplus:default misconfigured: transitioned to maintenance (see 'svcs -xv' for details) Mar 28 13:27:34 svc.startd[9]: svc:/network/rpc/nisplus:default: Method "/lib/svc/method/nisplus" failed with exit status 96. Mar 28 13:27:34 svc.startd[9]: network/rpc/nisplus:default misconfigured: transitioned to maintenance (see 'svcs -xv' for details) radius-4 console login: root Password: Mar 28 14:12:29 radius-4 login: ROOT LOGIN /dev/console Oracle Corporation SunOS 5.10 Generic Patch January 2005 # bash bash-3.2# df -h 文件系统 大小 用了 可用 容量 挂接在 /dev/dsk/c0t1d0s0 67G 5.2G 61G 8% / /devices 0K 0K 0K 0% /devices ctfs 0K 0K 0K 0% /system/contract proc 0K 0K 0K 0% /proc mnttab 0K 0K 0K 0% /etc/mnttab swap 28G 696K 28G 1% /etc/svc/volatile objfs 0K 0K 0K 0% /system/object sharefs 0K 0K 0K 0% /etc/dfs/sharetab /platform/SUNW,Netra-T2000/lib/libc_psr/libc_psr_hwcap1.so.1 67G 5.2G 61G 8% /platform/sun4v/lib/libc_psr.so.1 /platform/SUNW,Netra-T2000/lib/sparcv9/libc_psr/libc_psr_hwcap1.so.1 67G 5.2G 61G 8% /platform/sun4v/lib/sparcv9/libc_psr.so.1 fd 0K 0K 0K 0% /dev/fd /dev/dsk/c0t1d0s3 19G 112M 19G 1% /var swap 28G 32K 28G 1% /tmp swap 28G 56K 28G 1% /var/run /dev/dsk/c0t1d0s4 19G 150M 19G 1% /opt /dev/dsk/c0t1d0s5 125G 127M 124G 1% /homeView Code
5.分区详细流程
一、分区大小 若是300G的硬盘 / 70G swap 16G(等于内存 ) /var 20G /opt 20G s7 留1G(不要多留) #s7是分区7,用来做镜像的 /home 剩余空间都留给/home 注意: 如果有做双机,还得留出100M 二、分区流程 #format 0 #选择0号磁盘(显示命令菜单) format> partition #进入创建何修改分片菜单(显示所有片,2片代表所有磁盘) partition> print #显示当前分区表(每个片对应的分区大小) partition> 4 #选择4号片(unassigned表示未划分的) Enter partition id tag[unassigned] #回车 Enter partition permission flags[wm] #回车 Enter new starting cyl[0]:13632 #开始柱面(不能与其它分片重叠,会导致数据丢失) Enter partition size[0b,0c,13632e,0.00mb,0.00gb]: partition> 200gb #需要分配的大小200gb partition> print #显示当前分区表 partition> label #保存,否则新分区丢失 ready to label disk,continue?y partition> print #显示当前分区表 partition> quit #退出到命令菜单 format> save #保存 bash-3.2# newfs /devrdsk/c0t0d0s4 y #对上述创建的分区创建ufs文件系统 bash-3.2# mkdir /data #创建挂载点 bash-3.2# mount /devrdsk/c0t0d0s4 /data #挂载 bash-3.2# cat /etc/vfstab #更改系统启动自动挂载 测试是否自动挂载成功: umount /data mount -a,df -hView Code
6.配置软raid
6.1 专家文档
一、实验环境 两块盘,系统盘为c0t0d0 9.1G,镜像盘为c0t8d0 36G。分区划分:s0为/,s1为swap,s3为/usr,s7为/export/home。与标准备的系统分区不同,标准的分区镜像更简单。 要求:至少有一个100M的空间来保存meta database。假定分配s4为meta 【1】 database分区。 二、镜像盘分区 1,先确定硬件系统满足镜像条件: 源盘与目标盘大小最好一致,至少目标盘要大于源盘。 如新盘加入系统,请先保证系统能识别新盘,可用以下命令: #devfsadm 查找新安装的硬盘,加载驱动。 #format 查看disk 是否存在 #prtvtoc /dev/dsk/c0t1d0s2 ----查看分区信息 要保证被镜像的磁盘分区表必须是与引导磁盘相同。 # prtvtoc /dev/rdsk/c0t1d0s2 | fmthard -s - /dev/rdsk/c0t3d0s2 #把引导磁盘的分区表复制到镜像磁盘。使用下列命令: #这个命令的提前是要求两个盘的大小要一致,如果不一致会报: Partition 0 not aligned on cylinder boundary: " 0 2 00 0 2050461 2050460" 有一种办法可以使两个大少不一致的盘变为一致的,format-----选中大的那个盘------type--修改为与小盘一致的容量。 还有一种办法就是手工分配大盘的分区,保证每个分区不得少于原盘分区容量。 #prtvtoc /dev/dsk/c0t3d0s2 ----查看分区信息 如果报/dev/rdsk/c0t1d0s2: Cannot read VTOC,则要用format对其写label。 三、使用Disksuite进行配置 1、首先要创建状态数据库复本。 最少要创建两个或两个以上的数据库复本。状态数据库复本存储着DiskSuite的配置和状态信息。meta database是必须要的。 #metadb -a -f -c 3 /dev/dsk/c0t1d0s7 /dev/dsk/c0t3d0s7 ----创建这个数据库复本 #metadb -i ----查询数据库状态。 2、创建文件系统分区的镜像 首先我们先对1个磁盘做一个单向的镜像,稍候我们追加第2个磁盘去镜像。设备编号(dnn),必须以d开头,数字nn 是任意的。这里为了方便管理,我们须对镜像设备编号做个约定: d10 – 表示第1块磁盘的镜像设备名。 d20 – 表示第2块磁盘的镜像设备名。 d30 – 表示镜像中所包含第1块磁盘的镜像设备和第2块磁盘的镜像设备的总镜像设备。 #for i in 0 1 3 4 5 7 ---使用循环语句,其中0 1 3 6 7 为分区数,根据实际情况定。 >do >metainit -f d1$i 1 1 c0t0d0s$i >metainit -f d2$i 1 1 c0t3d0s$i >metainit d3$i -m d1$i >done 在上列命令中的“-f”参数表示强迫metainit 命令继续,即使是这些分区之一包含了一个被挂载的文件系统或正在被使用的交换分 区。 命令“# metainit -f d10 1 1 c0t0d0s0”表示为root分区创建一个一对一的级联。 最后一条命令表示创建metadevice镜像并且把镜像设备d10 附加到d30。也就是d30是mirror,而d10就是d30的子镜像submirror。 3、vfstab和system文件 系统会自动更新/etc/vfstab 文件和/etc/system file。在metaroot 命令之前,最好备份vfstab文件和system文件 #cp /etc/vfstab /etc/vfstab.bak #cp /etc/system /etc/system.bak #metaroot d30 ----只到引导分区执行。自动修改/etc/vfstab、/etc/system文件。不要手工编辑/区的信息。 #lockfs -fa --change or report file system locks重新引导允许系统去重新挂载镜像 查看/etc/vfstab,可以能看到“/”文件系统将被挂载到/dev/md/dsk/d30上而不是挂载到/dev/dsk/c0t0d0s0上。 编辑/etc/system文件,添加如下一行到文件/etc/system里: set md:mirrored_root_flag=1 ----当两块盘中坏了一块盘后,能正常启动,不然就得先通过boot -s 进入到单用户,使用metadb -d 来删除坏了的那个盘上的库。使正常的数据库片数大于50%. 4、编辑/etc/vfstab文件,编辑之后这个新的/etc/vfstab文件应该类似于这样: 【2】 # more /etc/vfstab #device device mount FS fsck mount mount #to mount to fsck point type pass at boot options # #/dev/dsk/c1d0s2 /dev/rdsk/c1d0s2 /usr ufs 1 yes - fd - /dev/fd fd - no - /proc - /proc proc - no - /dev/md/dsk/d30 /dev/md/rdsk/d30 / ufs 1 no - /dev/md/dsk/d31 /dev/md/rdsk/d31 /swap ufs 2 yes - /dev/md/dsk/d33 /dev/md/rdsk/d33 /usr ufs 1 no - #/dev/dsk/c0t0d0s3 /dev/rdsk/c0t0d0s3 /usr ufs 1 no - #/dev/dsk/c0t0d0s7 /dev/rdsk/c0t0d0s7 /export/home ufs 2 yes - #/dev/dsk/c0t0d0s1 /dev/rdsk/c0t0d0s1 /swap ufs 2 yes - swap - /tmp tmpfs - yes - 应该是根据实际的分区情况进行修改。 5、作用dumpadm配置crash dump。【3】 6、禁止无害的消息(可选)被禁止掉的这条信息是:"WARNING: forceload of misc/md_hotspares failed". # metainit hsp001 注:信息提示在/etc/system,但一定不要手工编辑它,否则会启不了系统。建议不要操作此步。【4】 7、重启机器 # init 6 下列的警告住处是无害的,可以忽略不记: WARNING: forceload of misc/md_trans failed WARNING: forceload of misc/md_raid failed WARNING: forceload of misc/md_hotspares failed 以后上面这些信息可以在/etc/system里面。不要注释掉。 8、镜像镜像盘 追加第二个子镜像设备到镜像,这样磁盘上的数据就会从引导磁盘上与已经镜像的磁盘进行同步。 #for i in 0 1 2 3 4 5 ---使用循环语句,其中0 1 3 6 7 为分区数,根据实际情况定。 >do >metattach d3$i d2$i >done # metastat d30 --查看镜像进度及状态 # installboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk /dev/rdsk/c0t3d0s0--生成可自切换的能启动的镜像磁盘,生成引导块 回到ok提示符下(用笔记本,或PC上的终端仿真软件请按Ctrl+Break从solaris操做系统状态可回到ok提示符下,如用sun 工作站或键盘可用 stop+A回到OK装态)修改启动值,把被镜像磁盘列入备用启动中: ok >printenv *查看obp参数,注意 boot-device 项的参数,未修改前默认为 disk。 ok >devalias *查看设备别名,我们可以看到,第2块盘被命名为 disk1 。 Ok>setenv boot-device disk disk1 *设置 boot-device 把 disk1 加入。 Ok> reset-all *重启View Code
6.2 配置流程
一、查看--------------------------------------------------------------------------- ---------------------------------------------------------------------------------- ash-3.2# df -h 文件系统 大小 用了 可用 容量 挂接在 /dev/dsk/c0t1d0s0 67G 5.2G 61G 8% / /devices 0K 0K 0K 0% /devices ctfs 0K 0K 0K 0% /system/contract proc 0K 0K 0K 0% /proc mnttab 0K 0K 0K 0% /etc/mnttab swap 28G 696K 28G 1% /etc/svc/volatile objfs 0K 0K 0K 0% /system/object sharefs 0K 0K 0K 0% /etc/dfs/sharetab /platform/SUNW,Netra-T2000/lib/libc_psr/libc_psr_hwcap1.so.1 67G 5.2G 61G 8% /platform/sun4v/lib/libc_psr.so.1 /platform/SUNW,Netra-T2000/lib/sparcv9/libc_psr/libc_psr_hwcap1.so.1 67G 5.2G 61G 8% /platform/sun4v/lib/sparcv9/libc_psr.so.1 fd 0K 0K 0K 0% /dev/fd /dev/dsk/c0t1d0s3 19G 112M 19G 1% /var swap 28G 32K 28G 1% /tmp swap 28G 56K 28G 1% /var/run /dev/dsk/c0t1d0s4 19G 150M 19G 1% /opt /dev/dsk/c0t1d0s5 125G 127M 124G 1% /home bash-3.2# devfsadm #1.查找新安装的硬盘,加载驱动。 bash-3.2# format #2.查看disk 是否存在 Searching for disks...done AVAILABLE DISK SELECTIONS: 0. c0t1d0 <SUN300G cyl 46873 alt 2 hd 20 sec 625> /pci@780/pci@0/pci@9/scsi@0/sd@1,0 1. c0t3d0 <SUN300G cyl 46873 alt 2 hd 20 sec 625> y /pci@780/pci@0/pci@9/scsi@0/sd@3,0 Specify disk (enter its number): ^C bash-3.2# prtvtoc /dev/dsk/c0t1d0s2 #3.查看分区信息 #要保证被镜像的磁盘分区表必须是与引导磁盘相同 * /dev/dsk/c0t1d0s2 partition map * * Dimensions: * 512 bytes/sector * 625 sectors/track * 20 tracks/cylinder * 12500 sectors/cylinder * 46875 cylinders * 46873 accessible cylinders * * Flags: * 1: unmountable * 10: read-only * * Unallocated space: * First Sector Last * Sector Count Sector * 524312500 61600000 585912499 * * First Sector Last * Partition Tag Flags Sector Count Sector Mount Directory 0 2 00 0 143362500 143362499 / 1 3 01 143362500 32775000 176137499 2 5 00 0 585912500 585912499 3 7 00 176137500 40962500 217099999 /var 4 0 00 217100000 40962500 258062499 /opt 5 8 00 258062500 266250000 524312499 /home 二、发现0号盘没有创建s7分区,下面先在0号盘上创建s7分区---------------------------------- -------------------------------------------------------------------------------- bash-3.2# format Searching for disks...done AVAILABLE DISK SELECTIONS: 0. c0t1d0 <SUN300G cyl 46873 alt 2 hd 20 sec 625> /pci@780/pci@0/pci@9/scsi@0/sd@1,0 1. c0t3d0 <SUN300G cyl 46873 alt 2 hd 20 sec 625> y /pci@780/pci@0/pci@9/scsi@0/sd@3,0 Specify disk (enter its number): 0 selecting c0t1d0 [disk formatted] Warning: Current Disk has mounted partitions. /dev/dsk/c0t1d0s0 is currently mounted on /. Please see umount(1M). /dev/dsk/c0t1d0s1 is currently used by swap. Please see swap(1M). /dev/dsk/c0t1d0s3 is currently mounted on /var. Please see umount(1M). /dev/dsk/c0t1d0s4 is currently mounted on /opt. Please see umount(1M). /dev/dsk/c0t1d0s5 is currently mounted on /home. Please see umount(1M). FORMAT MENU: disk - select a disk type - select (define) a disk type partition - select (define) a partition table current - describe the current disk format - format and analyze the disk repair - repair a defective sector label - write label to the disk analyze - surface analysis defect - defect list management backup - search for backup labels verify - read and display labels save - save new disk/partition definitions inquiry - show vendor, product and revision volname - set 8-character volume name !<cmd> - execute <cmd>, then return quit format> partition PARTITION MENU: 0 - change `0' partition 1 - change `1' partition 2 - change `2' partition 3 - change `3' partition 4 - change `4' partition 5 - change `5' partition 6 - change `6' partition 7 - change `7' partition select - select a predefined table modify - modify a predefined partition table name - name the current table print - display the current table label - write partition map and label to the disk !<cmd> - execute <cmd>, then return quit partition> 7 Part Tag Flag Cylinders Size Blocks 7 unassigned wm 0 0 (0/0/0) 0 Enter partition id tag[unassigned]: Enter partition permission flags[wm]: Enter new starting cyl[0]: #开始柱面设置成了从0开始,和0号分区重叠了 Enter partition size[0b, 0c, 0e, 0.00mb, 0.00gb]: 2gb partition> print Current partition table (unnamed): Total disk cylinders available: 46873 + 2 (reserved cylinders) Part Tag Flag Cylinders Size Blocks 0 root wm 0 - 11468 68.36GB (11469/0/0) 143362500 1 swap wu 11469 - 14090 15.63GB (2622/0/0) 32775000 2 backup wm 0 - 46872 279.38GB (46873/0/0) 585912500 3 var wm 14091 - 17367 19.53GB (3277/0/0) 40962500 4 unassigned wm 17368 - 20644 19.53GB (3277/0/0) 40962500 5 home wm 20645 - 41944 126.96GB (21300/0/0) 266250000 6 unassigned wm 0 0 (0/0/0) 0 7 unassigned wm 0 - 335 2.00GB (336/0/0) 4200000 partition> label Ready to label disk, continue? y partition> print Current partition table (unnamed): Total disk cylinders available: 46873 + 2 (reserved cylinders) Part Tag Flag Cylinders Size Blocks 0 root wm 0 - 11468 68.36GB (11469/0/0) 143362500 1 swap wu 11469 - 14090 15.63GB (2622/0/0) 32775000 2 backup wm 0 - 46872 279.38GB (46873/0/0) 585912500 3 var wm 14091 - 17367 19.53GB (3277/0/0) 40962500 4 unassigned wm 17368 - 20644 19.53GB (3277/0/0) 40962500 5 home wm 20645 - 41944 126.96GB (21300/0/0) 266250000 6 unassigned wm 0 0 (0/0/0) 0 7 unassigned wm 0 - 335 2.00GB (336/0/0) 4200000 partition> quit FORMAT MENU: disk - select a disk type - select (define) a disk type partition - select (define) a partition table current - describe the current disk format - format and analyze the disk repair - repair a defective sector label - write label to the disk analyze - surface analysis defect - defect list management backup - search for backup labels verify - read and display labels save - save new disk/partition definitions inquiry - show vendor, product and revision volname - set 8-character volume name !<cmd> - execute <cmd>, then return quit format> save Please name this partition type before saving it format> quit bash-3.2# 三、由于7号分区和0号分区重叠,所以要重新设置7号分区---------------------------------- ----------------------------------------------------------------------------- bash-3.2# format Searching for disks...done AVAILABLE DISK SELECTIONS: 0. c0t1d0 <SUN300G cyl 46873 alt 2 hd 20 sec 625> /pci@780/pci@0/pci@9/scsi@0/sd@1,0 1. c0t3d0 <SUN300G cyl 46873 alt 2 hd 20 sec 625> y /pci@780/pci@0/pci@9/scsi@0/sd@3,0 Specify disk (enter its number): 0 selecting c0t1d0 [disk formatted] Warning: Current Disk has mounted partitions. /dev/dsk/c0t1d0s0 is currently mounted on /. Please see umount(1M). /dev/dsk/c0t1d0s1 is currently used by swap. Please see swap(1M). /dev/dsk/c0t1d0s3 is currently mounted on /var. Please see umount(1M). /dev/dsk/c0t1d0s4 is currently mounted on /opt. Please see umount(1M). /dev/dsk/c0t1d0s5 is currently mounted on /home. Please see umount(1M). FORMAT MENU: disk - select a disk type - select (define) a disk type partition - select (define) a partition table current - describe the current disk format - format and analyze the disk repair - repair a defective sector label - write label to the disk analyze - surface analysis defect - defect list management backup - search for backup labels verify - read and display labels save - save new disk/partition definitions inquiry - show vendor, product and revision volname - set 8-character volume name !<cmd> - execute <cmd>, then return quit format> p PARTITION MENU: 0 - change `0' partition 1 - change `1' partition 2 - change `2' partition 3 - change `3' partition 4 - change `4' partition 5 - change `5' partition 6 - change `6' partition 7 - change `7' partition select - select a predefined table modify - modify a predefined partition table name - name the current table print - display the current table label - write partition map and label to the disk !<cmd> - execute <cmd>, then return quit partition> 7 Part Tag Flag Cylinders Size Blocks 7 unassigned wm 0 - 335 2.00GB (336/0/0) 4200000 Enter partition id tag[unassigned]: Enter partition permission flags[wm]: Enter new starting cyl[0]: Enter partition size[4200000b, 336c, 335e, 2050.78mb, 2.00gb]: 0 partition> p Current partition table (unnamed): Total disk cylinders available: 46873 + 2 (reserved cylinders) Part Tag Flag Cylinders Size Blocks 0 root wm 0 - 11468 68.36GB (11469/0/0) 143362500 1 swap wu 11469 - 14090 15.63GB (2622/0/0) 32775000 2 backup wm 0 - 46872 279.38GB (46873/0/0) 585912500 3 var wm 14091 - 17367 19.53GB (3277/0/0) 40962500 4 unassigned wm 17368 - 20644 19.53GB (3277/0/0) 40962500 5 home wm 20645 - 41944 126.96GB (21300/0/0) 266250000 6 unassigned wm 0 0 (0/0/0) 0 7 unassigned wm 0 0 (0/0/0) 0 partition> label Ready to label disk, continue? y partition> q FORMAT MENU: disk - select a disk type - select (define) a disk type partition - select (define) a partition table current - describe the current disk format - format and analyze the disk repair - repair a defective sector label - write label to the disk analyze - surface analysis defect - defect list management backup - search for backup labels verify - read and display labels save - save new disk/partition definitions inquiry - show vendor, product and revision volname - set 8-character volume name !<cmd> - execute <cmd>, then return quit format> q bash-3.2# reboot bash-3.2# format Searching for disks...done AVAILABLE DISK SELECTIONS: 0. c0t1d0 <SUN300G cyl 46873 alt 2 hd 20 sec 625> /pci@780/pci@0/pci@9/scsi@0/sd@1,0 1. c0t3d0 <SUN300G cyl 46873 alt 2 hd 20 sec 625> y /pci@780/pci@0/pci@9/scsi@0/sd@3,0 Specify disk (enter its number): 0 selecting c0t1d0 [disk formatted] Warning: Current Disk has mounted partitions. /dev/dsk/c0t1d0s0 is currently mounted on /. Please see umount(1M). /dev/dsk/c0t1d0s1 is currently used by swap. Please see swap(1M). /dev/dsk/c0t1d0s3 is currently mounted on /var. Please see umount(1M). /dev/dsk/c0t1d0s4 is currently mounted on /opt. Please see umount(1M). /dev/dsk/c0t1d0s5 is currently mounted on /home. Please see umount(1M). FORMAT MENU: disk - select a disk type - select (define) a disk type partition - select (define) a partition table current - describe the current disk format - format and analyze the disk repair - repair a defective sector label - write label to the disk analyze - surface analysis defect - defect list management backup - search for backup labels verify - read and display labels save - save new disk/partition definitions inquiry - show vendor, product and revision volname - set 8-character volume name !<cmd> - execute <cmd>, then return quit format> p PARTITION MENU: 0 - change `0' partition 1 - change `1' partition 2 - change `2' partition 3 - change `3' partition 4 - change `4' partition 5 - change `5' partition 6 - change `6' partition 7 - change `7' partition select - select a predefined table modify - modify a predefined partition table name - name the current table print - display the current table label - write partition map and label to the disk !<cmd> - execute <cmd>, then return quit partition> p #看到5号片末尾是41944,所以7号片从41945开始 Current partition table (original): Total disk cylinders available: 46873 + 2 (reserved cylinders) Part Tag Flag Cylinders Size Blocks 0 root wm 0 - 11468 68.36GB (11469/0/0) 143362500 1 swap wu 11469 - 14090 15.63GB (2622/0/0) 32775000 2 backup wm 0 - 46872 279.38GB (46873/0/0) 585912500 3 var wm 14091 - 17367 19.53GB (3277/0/0) 40962500 4 unassigned wm 17368 - 20644 19.53GB (3277/0/0) 40962500 5 home wm 20645 - 41944 126.96GB (21300/0/0) 266250000 6 unassigned wm 0 0 (0/0/0) 0 7 unassigned wm 0 0 (0/0/0) 0 partition> 7 Part Tag Flag Cylinders Size Blocks 7 unassigned wm 0 0 (0/0/0) 0 Enter partition id tag[unassigned]: Enter partition permission flags[wm]: Enter new starting cyl[0]: 41945 Enter partition size[0b, 0c, 41945e, 0.00mb, 0.00gb]: 1gb partition> p Current partition table (unnamed): Total disk cylinders available: 46873 + 2 (reserved cylinders) Part Tag Flag Cylinders Size Blocks 0 root wm 0 - 11468 68.36GB (11469/0/0) 143362500 1 swap wu 11469 - 14090 15.63GB (2622/0/0) 32775000 2 backup wm 0 - 46872 279.38GB (46873/0/0) 585912500 3 var wm 14091 - 17367 19.53GB (3277/0/0) 40962500 4 unassigned wm 17368 - 20644 19.53GB (3277/0/0) 40962500 5 home wm 20645 - 41944 126.96GB (21300/0/0) 266250000 6 unassigned wm 0 0 (0/0/0) 0 7 unassigned wm 41945 - 42112 1.00GB (168/0/0) 2100000 partition> label Ready to label disk, continue? y partition> q FORMAT MENU: disk - select a disk type - select (define) a disk type partition - select (define) a partition table current - describe the current disk format - format and analyze the disk repair - repair a defective sector label - write label to the disk analyze - surface analysis defect - defect list management backup - search for backup labels verify - read and display labels save - save new disk/partition definitions inquiry - show vendor, product and revision volname - set 8-character volume name !<cmd> - execute <cmd>, then return quit format> q bash-3.2# 四、开始配置------------------------------------------------------------------- ----------------------------------------------------------------------------- bash-3.2# prtvtoc /dev/rdsk/c0t1d0s2 #查看分区信息 * /dev/rdsk/c0t1d0s2 partition map * * Dimensions: * 512 bytes/sector * 625 sectors/track * 20 tracks/cylinder * 12500 sectors/cylinder * 46875 cylinders * 46873 accessible cylinders * * Flags: * 1: unmountable * 10: read-only * * Unallocated space: * First Sector Last * Sector Count Sector * 526412500 59500000 585912499 * * First Sector Last * Partition Tag Flags Sector Count Sector Mount Directory 0 2 00 0 143362500 143362499 / 1 3 01 143362500 32775000 176137499 2 5 00 0 585912500 585912499 3 7 00 176137500 40962500 217099999 /var 4 0 00 217100000 40962500 258062499 /opt 5 8 00 258062500 266250000 524312499 /home 7 0 00 524312500 2100000 526412499 bash-3.2# prtvtoc /dev/rdsk/c0t1d0s2|fmthard -s - /dev/rdsk/c0t3d0s2 #把引导磁盘的分区表复制到镜像磁盘 fmthard: New volume table of contents now in place. bash-3.2# metadb -a -f -c 3 /dev/dsk/c0t1d0s7 #创建这个数据库复本 bash-3.2# metadb -a -f -c 3 /dev/dsk/c0t3d0s7 #创建这个数据库复本 bash-3.2# metadb -i #查询数据库状态 flags first blk block count a u 16 8192 /dev/dsk/c0t1d0s7 a u 8208 8192 /dev/dsk/c0t1d0s7 a u 16400 8192 /dev/dsk/c0t1d0s7 a u 16 8192 /dev/dsk/c0t3d0s7 a u 8208 8192 /dev/dsk/c0t3d0s7 a u 16400 8192 /dev/dsk/c0t3d0s7 r - 副本没有设备的重新分配信息 o - 上次 mddb 配置更改前副本已在激活中 u - 副本已更新 l - 已成功读入此副本的定位器 c - 副本位于 /etc/lvm/mddb.cf p - 已于内核中修补副本的位置 m - 此副本主副本,且已选作为输入 W - 副本含有设备写入错误 a - 副本正在激活中,所有确定事项都将传给此副本 M - 副本主块有问题 D - 副本数据块有问题 F - 副本格式有问题 S - 副本太小,不能容纳当前数据库 R - 副本含有设备读入错误 #c0t1d0的用d1$ c0t3d0的用d3$ ,合成的镜像用d2$ s2是总的,不用做镜像。s7也不用做镜像 #for i in 0 1 3 4 5 ---使用循环语句,其中0 1 3 6 7 为分区数,根据实际情况定。 >do >metainit -f d1$i 1 1 c0t1d0s$i >metainit -f d3$i 1 1 c0t3d0s$i >metainit d2$i -m d1$i >done 若是怕做错,可以一条一条输入: bash-3.2# metainit -f d10 1 1 c0t1d0s0 d10: Concat/Stripe 已设置 bash-3.2# metainit -f d30 1 1 c0t3d0s0 d30: Concat/Stripe 已设置 bash-3.2# metainit -f d11 1 1 c0t1d0s1 d11: Concat/Stripe 已设置 bash-3.2# metainit -f d31 1 1 c0t3d0s1 d31: Concat/Stripe 已设置 bash-3.2# metainit -f d13 1 1 c0t1d0s3 d13: Concat/Stripe 已设置 bash-3.2# metainit -f d14 1 1 c0t1d0s4 d14: Concat/Stripe 已设置 bash-3.2# metainit -f d15 1 1 c0t1d0s5 d15: Concat/Stripe 已设置 bash-3.2# metainit -f d33 1 1 c0t3d0s3 d33: Concat/Stripe 已设置 bash-3.2# metainit -f d34 1 1 c0t3d0s4 d34: Concat/Stripe 已设置 bash-3.2# metainit -f d35 1 1 c0t3d0s5 d35: Concat/Stripe 已设置 bash-3.2# metainit d20 -m d10 d20: 镜像已设置 bash-3.2# metainit d21 -m d11 d21: 镜像已设置 bash-3.2# metainit d23 -m d13 d23: 镜像已设置 bash-3.2# metainit d24 -m d14 d24: 镜像已设置 bash-3.2# metainit d25 -m d15 d25: 镜像已设置 若是不小心设置错了: bash-3.2# metainit -f d11 1 1 c0t3d0s1 #这里设置错误(d11对应c0t1d0) #下面进行清除操作 bash-3.2# metaclear d11 metaclear: SXTY-PS-MMSC1-SP2: d11: 无此文件或目录 bash-3.2# metastat #查看 d30: Concat/Stripe 大小: 143362500 块 (68 GB) 条 0: 设备 引导块 Dbase Reloc c0t3d0s0 0 否 是 d10: Concat/Stripe 大小: 143362500 块 (68 GB) 条 0: 设备 引导块 Dbase Reloc c0t1d0s0 0 否 是 Device Relocation Information: Device Reloc Device ID c0t3d0 是 id1,sd@n5000cca06e334fe4 c0t1d0 是 id1,sd@n5000cca05448c820 bash-3.2# cp /etc/vfstab /etc/vfstab.bak bash-3.2# cp /etc/system /etc/system.bak bash-3.2# metaroot d20 #只到引导分区执行。自动修改/etc/vfstab、/etc/system文件。不要手工编辑/区的信息。 bash-3.2# lockfs -fa #重新引导允许系统去重新挂载镜像 bash-3.2# cat /etc/vfstab #查看/etc/vfstab,可以能看到“/”文件系统将被挂载到/dev/md/dsk/d20上而不是挂载到/dev/dsk/c0t1d0s0上。 #device device mount FS fsck mount mount #to mount to fsck point type pass at boot options # fd - /dev/fd fd - no - /proc - /proc proc - no - /dev/dsk/c0t1d0s1 - - swap - no - /dev/md/dsk/d20 /dev/md/rdsk/d20 / ufs 1 no - /dev/dsk/c0t1d0s3 /dev/rdsk/c0t1d0s3 /var ufs 1 no - /dev/dsk/c0t1d0s5 /dev/rdsk/c0t1d0s5 /home ufs 2 yes - /dev/dsk/c0t1d0s4 /dev/rdsk/c0t1d0s4 /opt ufs 2 yes - /devices - /devices devfs - no - sharefs - /etc/dfs/sharetab sharefs - no - ctfs - /system/contract ctfs - no - objfs - /system/object objfs - no - swap - /tmp tmpfs - yes - bash-3.2# metastat #查看 d25: 镜像 次镜像 0: d15 状态: 确定 传送: 1 读入选项: roundrobin (缺省) 写入选项: parallel (缺省) 大小: 266250000 块 (126 GB) d15: d25 的次镜像 状态: 确定 大小: 266250000 块 (126 GB) 条 0: 设备 引导块 Dbase 状态 Reloc 热备援 c0t1d0s5 0 否 确定 是 d24: 镜像 次镜像 0: d14 状态: 确定 传送: 1 读入选项: roundrobin (缺省) 写入选项: parallel (缺省) 大小: 40962500 块 (19 GB) d14: d24 的次镜像 状态: 确定 大小: 40962500 块 (19 GB) 条 0: 设备 引导块 Dbase 状态 Reloc 热备援 c0t1d0s4 0 否 确定 是 d23: 镜像 次镜像 0: d13 状态: 确定 传送: 1 读入选项: roundrobin (缺省) 写入选项: parallel (缺省) 大小: 40962500 块 (19 GB) d13: d23 的次镜像 状态: 确定 大小: 40962500 块 (19 GB) 条 0: 设备 引导块 Dbase 状态 Reloc 热备援 c0t1d0s3 0 否 确定 是 d21: 镜像 次镜像 0: d11 状态: 确定 传送: 1 读入选项: roundrobin (缺省) 写入选项: parallel (缺省) 大小: 32775000 块 (15 GB) d11: d21 的次镜像 状态: 确定 大小: 32775000 块 (15 GB) 条 0: 设备 引导块 Dbase 状态 Reloc 热备援 c0t1d0s1 0 否 确定 是 d20: 镜像 次镜像 0: d10 状态: 确定 传送: 1 读入选项: roundrobin (缺省) 写入选项: parallel (缺省) 大小: 143362500 块 (68 GB) d10: d20 的次镜像 状态: 确定 大小: 143362500 块 (68 GB) 条 0: 设备 引导块 Dbase 状态 Reloc 热备援 c0t1d0s0 0 否 确定 是 d35: Concat/Stripe 大小: 266250000 块 (126 GB) 条 0: 设备 引导块 Dbase Reloc c0t3d0s5 0 否 是 d34: Concat/Stripe 大小: 40962500 块 (19 GB) 条 0: 设备 引导块 Dbase Reloc c0t3d0s4 0 否 是 d33: Concat/Stripe 大小: 40962500 块 (19 GB) 条 0: 设备 引导块 Dbase Reloc c0t3d0s3 0 否 是 d31: Concat/Stripe 大小: 32775000 块 (15 GB) 条 0: 设备 引导块 Dbase Reloc c0t3d0s1 0 否 是 d30: Concat/Stripe 大小: 143362500 块 (68 GB) 条 0: 设备 引导块 Dbase Reloc c0t3d0s0 0 否 是 Device Relocation Information: Device Reloc Device ID c0t3d0 是 id1,sd@n5000cca06e334fe4 c0t1d0 是 id1,sd@n5000cca05448c820 bash-3.2# vi /etc/vfstab #编辑配置文件 #device device mount FS fsck mount mount #to mount to fsck point type pass at boot options # fd - /dev/fd fd - no - /proc - /proc proc - no - #/dev/dsk/c0t1d0s1 - - swap - no - /dev/md/dsk/d20 /dev/md/rdsk/d20 / ufs 1 no - #/dev/dsk/c0t1d0s3 /dev/rdsk/c0t1d0s3 /var ufs 1 no - #/dev/dsk/c0t1d0s5 /dev/rdsk/c0t1d0s5 /home ufs 2 yes - #/dev/dsk/c0t1d0s4 /dev/rdsk/c0t1d0s4 /opt ufs 2 yes - /devices - /devices devfs - no - sharefs - /etc/dfs/sharetab sharefs - no - ctfs - /system/contract ctfs - no - objfs - /system/object objfs - no - swap - /tmp tmpfs - yes - /dev/md/dsk/d21 - - swap - no - /dev/md/dsk/d23 /dev/md/rdsk/d23 /var ufs 1 no - /dev/md/dsk/d24 /dev/md/rdsk/d24 /opt ufs 2 yes - /dev/md/dsk/d25 /dev/md/rdsk/d25 /home ufs 2 yes - bash-3.2# metainit hsp001 hsp001: 热备援缓冲池已设置 bash-3.2# init 6 #重启 updating /platform/sun4v/boot_archive bash-3.2# svc.startd: The system is coming down. Please wait. svc.startd: 107 system services are now being stopped. Mar 28 17:18:22 SXTY-PS-MMSC1-SP2 rpc.metad: Terminated Mar 28 17:18:31 SXTY-PS-MMSC1-SP2 syslogd: going down on signal 15 svc.startd: The system is down. syncing file systems... done rebooting... SC Alert: Host System has Reset SC Alert: CRITICAL ALARM is set \ Netra T2000, No Keyboard Copyright 2008 Sun Microsystems, Inc. All rights reserved. OpenBoot 4.28.9, 16256 MB memory available, Serial #82659166. Ethernet address 0:14:4f:ed:47:5e, Host ID: 84ed475e. Boot device: disk:a 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: SXTY-PS-MMSC1-SP2 Mar 28 17:20:49 svc.startd[9]: svc:/network/rpc/nisplus:default: Method "/lib/svc/method/nisplus" failed with exit status 96. Mar 28 17:20:49 svc.startd[9]: network/rpc/nisplus:default misconfigured: transitioned to maintenance (see 'svcs -xv' for details) SXTY-PS-MMSC1-SP2 console login: root Password: Mar 28 17:20:57 SXTY-PS-MMSC1-SP2 login: ROOT LOGIN /dev/console Last login: Tue Mar 28 16:04:39 on console Oracle Corporation SunOS 5.10 Generic Patch January 2005 # bash bash-3.2# Mar 28 17:21:05 SXTY-PS-MMSC1-SP2 SC Alert: [ID 596662 daemon.alert] SC unretrieved msg JAN 02 06:00:18 2000 UTC [CRITICAL ALARM is set] bash-3.2# for i in 0 1 3 4 5 #镜像镜像盘 > do > metattach d2$i d3$i > done d20:子镜像 d30 is attached d21:子镜像 d31 is attached d23:子镜像 d33 is attached d24:子镜像 d34 is attached d25:子镜像 d35 is attached bash-3.2# metastat d20 #查看镜像进度及状态 d20: 镜像 次镜像 0: d10 状态: 确定 次镜像 1: d30 状态: 正在重新同步 重新同步在进行中: 0 % 完成 传送: 1 读入选项: roundrobin (缺省) 写入选项: parallel (缺省) 大小: 143362500 块 (68 GB) d10: d20 的次镜像 状态: 确定 大小: 143362500 块 (68 GB) 条 0: 设备 引导块 Dbase 状态 Reloc 热备援 c0t1d0s0 0 否 确定 是 d30: d20 的次镜像 状态: 正在重新同步 大小: 143362500 块 (68 GB) 条 0: 设备 引导块 Dbase 状态 Reloc 热备援 c0t3d0s0 0 否 确定 是 Device Relocation Information: Device Reloc Device ID c0t1d0 是 id1,sd@n5000cca05448c820 c0t3d0 是 id1,sd@n5000cca06e334fe4 bash-3.2# installboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk /dev/rdsk/c0t3d0s0 #生成可自切换的能启动的镜像磁盘,生成引导块 bash-3.2# metastat d20 d20: 镜像 次镜像 0: d10 状态: 确定 次镜像 1: d30 状态: 正在重新同步 重新同步在进行中: 2 % 完成 传送: 1 读入选项: roundrobin (缺省) 写入选项: parallel (缺省) 大小: 143362500 块 (68 GB) d10: d20 的次镜像 状态: 确定 大小: 143362500 块 (68 GB) 条 0: 设备 引导块 Dbase 状态 Reloc 热备援 c0t1d0s0 0 否 确定 是 d30: d20 的次镜像 状态: 正在重新同步 大小: 143362500 块 (68 GB) 条 0: 设备 引导块 Dbase 状态 Reloc 热备援 c0t3d0s0 0 否 确定 是 Device Relocation Information: Device Reloc Device ID c0t1d0 是 id1,sd@n5000cca05448c820 c0t3d0 是 id1,sd@n5000cca06e334fe4View Code
标签:10,F2,solaris,partition,system,dev,Continue,disk,安装 From: https://www.cnblogs.com/xingyi123/p/17275279.html