You are on page 1of 85

Security Level: Internal Use

SUN Advanced Training


-System Management
ISSUE 1.0
www.huawei.c
om

M2000 Technical Support Team

HUAWEI TECHNOLOGIES CO., LTD.

HUAWEI Confidential

Foreword
Features of the Solaris system
Major methods for daily management of
the Solaris system

HUAWEI TECHNOLOGIES CO., LTD.

HUAWEI Confidential

object

Upon completion this course, you will be able to:


Get familiar with the Solaris system;
Grasp the Solaris hard disk management;
Grasp the Solaris network configuration
management;
Grasp the Solaris backup and restoration;
Be able to perform daily inspection and
maintenance of the system.

HUAWEI TECHNOLOGIES CO., LTD.

HUAWEI Confidential

Solaris System Management


Introduction to the Solaris System
Solaris System Management
Solaris Hardware Management
Solaris File System Management
Solaris Network Configuration and
Management
Solaris System Backup and Restoration

HUAWEI TECHNOLOGIES CO., LTD.

HUAWEI Confidential

Chapter 1 Introduction to the Solaris System


Introduction Solaris system history
Common Versions and Kernels of SUN Solaris
Switch between System Kernels
Introduction PROM
Basic BootPROM Commands
System Boot Process
Introduction /etc/inittab File
Introduction system Run Levels

HUAWEI TECHNOLOGIES CO., LTD.

HUAWEI Confidential

Introduction to the Solaris System


UNIX History
1969 The rudiment of UNIX is formed in Bell labs

1972 UNIX version 2 was created, which was


distinguished by pipe, support for programming
language, and kernel compilation with NB (which is
later called C language).
1973 UNIX version was created. The kernel and
shell were re-written with C language.

1982 Bill Joy left Berkeley and founded with others


a joint venture called Sun, which developed and
released SunOS on the basis of BSD and later
released Solaris.

HUAWEI TECHNOLOGIES CO., LTD.

HUAWEI Confidential

Common Versions and Kernels of SUN Solaris


OS version and kernel system:
1. SPARC platform
Solaris 2.7(7) 64 bit+32 bit
Solaris 5.8(8) 64 bit+32 bit
Solaris 5.9(9) 64 bit+32 bit

2. INTEL X86 platform


Solaris 5.8(8) 32 bit
Solaris 5.9(9) 32 bit

HUAWEI TECHNOLOGIES CO., LTD.

HUAWEI Confidential

Switch between System Kernels

Command for viewing the system kernel


# isainfo -b To view the number of bits of
the kernel

Start the 64-bit kernel mode


Ok > boot kernel/sparcv9/unix

Start the 32-bit mode


Ok > boot kernel/unix

HUAWEI TECHNOLOGIES CO., LTD.

View the system version


$ uname -X
View the detailed OS version
$ more /etc/release

HUAWEI Confidential

PROM

The PROM (OBP) firmware, which is also known as OBP or EEPROM, runs
immediately upon power-on of the system. The Prom firmware mainly serves
to:
test and initialize the system hardware;
change the startup order and the startup mode;
Set the systems bottom parameters ,such as scsi id.

Explanation: In fact, a minicomputer is similar to a PC in terms of


management ideas.
It differs from a PC only in hardware architecture. Thus, a sun minicomputers
prom may be regarded as a PCs BIOS.
HUAWEI TECHNOLOGIES CO., LTD.

HUAWEI Confidential

HOW to use PROM


We can enter the ok mode by:

executing the following command under the OS


# /usr/sbin/shutdown -y -g0 -i0
pressing Stop+A at the same time on the hosts
console keyboard
pressing ctrl+break on the PCs serial port
terminal.
Prom parameters may be modified by:

Entering a command under the


ok prompt characters; or
Directly using the eeprom
command under the os.
HUAWEI TECHNOLOGIES CO., LTD.

HUAWEI Confidential

The BootPROM
Upon completion of this module, you should be able to:

Describe the main functions of the boot programmable readonly memory (PROM) chip and NVRAM
Explain the basic elements of POST and the purpose of the
Stop key to control POST
Invoke some common boot PROM commands from the ok
prompt to customize how the system boots
Use boot command options to boot a system in different
situations
Demonstrate how to display the device tree to list all the
configured devices using the show-devs command

HUAWEI TECHNOLOGIES CO., LTD.

HUAWEI Confidential

The BootPROM
probe- :Use the commands to identify what peripheral devices (disks,
tape drives, or CDROMs) are currently connected to the system
Devalias: Using the command to determine a systems default boot
device
nvalias or nvedit : Create a custom device alias name for a new boot
device
Nvunalias: Delete a custom device alias name with the command.
eeprom :Use the command within the Solaris Operating Environment
to view or change the values of NVRAM parameters
Demonstrate the steps to interrupt an unresponsive system

HUAWEI TECHNOLOGIES CO., LTD.

HUAWEI Confidential

Basic BootPROM Commands

HUAWEI TECHNOLOGIES CO., LTD.

HUAWEI Confidential

Basic BootPROM Commands


The boot Command
You use the boot command to boot the Solaris Operating
Environment from the ok prompt.
This command has several options available for booting the system in
different situations.
Command Format
> ok boot [device_name] - [options]
Entering the boot command at the ok prompt boots the system to
multiuser mode automatically. For example:
> ok boot

HUAWEI TECHNOLOGIES CO., LTD.

HUAWEI Confidential

For example
> ok help

Enter 'help command-name' or 'help category-name' for more help


(Use ONLY the first word of a category description)
Examples: help system -or- help nvramrc
Categories:
boot (Load and execute a program)
nvramrc (Store user defined commands)
system configuration variables (NVRAM variables)
command ..

HUAWEI TECHNOLOGIES CO., LTD.

HUAWEI Confidential

Changing NVRAM Parameters with the


eeprom Command
To list all of the parameters with default and current values, type:
# eeprom
To list a single parameter and its value, type:
# eeprom boot-device
boot-device=disk
To change the value of the default boot device, type:
# eeprom boot-device=disk2
To change the value of the auto-boot? parameter, type:
# eeprom auto-boot?=true
auto-boot?=true

HUAWEI TECHNOLOGIES CO., LTD.

HUAWEI Confidential

System Boot Process

HUAWEI TECHNOLOGIES CO., LTD.

HUAWEI Confidential

Objectives

Upon completion of this module, you should be


Describe the four phases of the boot process
able to:
Identify the directories that contain the kernel and its loadable modules
Modify the kernels configuration file
Describe the eight Solaris Operating Environment run levels
Define a systems current run level using the who -r command
Explain the purpose of the /etc/inittab file
Describe the steps in the init process to bring a system to multiuser mode
List the directories that hold the run control scripts used to stop and start

system processes and services


Describe the steps to add a new run control script
Use the following commands to shut down the system: init, shutdown,

halt, poweroff, and reboot

HUAWEI TECHNOLOGIES CO., LTD.

HUAWEI Confidential

Run Levels
A run level refers to an execution state of the system. It specifies a set of system services and
processes.
The following run levels are provided in the Solaris environment:

RL

Function

PROM monitoring mode

Management mode (single-user mode, in which a file system is installed and


the user cannot log in)

Multi-user mode (no nfs resource is shared)

Multi-user mode (nfs resource is shared)

The current version is not used

Power off (Sun4m and Sun4u systems will be powered off)

Restart the system to run level 3

S,s

Single-user mode, in which users cannot log in

HUAWEI TECHNOLOGIES CO., LTD.

HUAWEI Confidential

Determining a Systems Current Run


Level

HUAWEI TECHNOLOGIES CO., LTD.

HUAWEI Confidential

The Boot Process

HUAWEI TECHNOLOGIES CO., LTD.

HUAWEI Confidential

The kernel Initialization Phase

HUAWEI TECHNOLOGIES CO., LTD.

HUAWEI Confidential

Init :/etc/inittab File


s3:3:wait:/sbin/rc3

>/dev/msglog 2<>/dev/msglog </dev/console


Process: The command or script that is running
Action: To tell init how to deal with the process
Run Level: To indicate the level of this item
Sign: Comprises 1-4 characters to indicate this item

The Action field falls into the following categories:

Action

Meaning

sysinit

To start the process before the access console, and not to handle the next item
until the completion of this process

initdefault

The default Run Level, which is 3 in the SUN system

respawn

To start the process and to restart it once it is dead

wait

To start the process, and not to handle the next item until the completion of
the process

powerfail

To start the process when init receives the powerfail information

HUAWEI TECHNOLOGIES CO., LTD.

HUAWEI Confidential

The init Process

HUAWEI TECHNOLOGIES CO., LTD.

HUAWEI Confidential

System Services in Solaris


The Solaris 10 uses svcadm to manage the
10
services, these services includes:
Services started by scripts in /etc/rc*.d/
Services started by system
Other serives

The services started by scripts can only be

monitored, you can use commands svcs -a to


check.
The services has dependency, the service can only

be started when its depended services are started.


Refer to page 72 to check how to manage services.

HUAWEI TECHNOLOGIES CO., LTD.

HUAWEI Confidential

Chapter 2 Solaris System Management


Introduction to the Solaris System
Solaris System Management
Solaris Hardware Management
Solaris File System Management
Solaris Network Configuration and
Management
Solaris System Backup and Restoration

HUAWEI TECHNOLOGIES CO., LTD.

HUAWEI Confidential

Chapter 2

Solaris System Management


Installation Methods of the System OS
System Startup and Shutdown
The Directory Hierarchy
System Management Tools
User Management
Software Package Management

HUAWEI TECHNOLOGIES CO., LTD.

HUAWEI Confidential

Installation Methods of the System OS


The system OS can be installed in four modes:

Web start wizard: console, witch means GUI mode on the monitor
suninstall: Character terminal interface mode
Jumpstart: Customized installation mode for multiple hosts
Network installation: To boot and install the system in network
mode

Installation procedure: Put the system installation CD in


the CD drive and enter the following command under the
ok prompt characters:

ok >boot cdrom
Later, set such system parameters that installation may
require.

HUAWEI TECHNOLOGIES CO., LTD.

HUAWEI Confidential

Objectives
Upon completion of this module, you should be
State
the different
able
to: installation methods available for the Solaris 8
Operating Environment software
Explain the hardware requirements for a Solaris 8 Operating

Environment installation
Identify the different Solaris 8 Operating Environment software

CD-ROM editions
List the five Solaris Software Groups
Demonstrate how to install the Solaris 8 Operating Environment

software on a networked, standalone system, using Solaris Web


Start

HUAWEI TECHNOLOGIES CO., LTD.

HUAWEI Confidential

The Solaris Operating Environment


Software Groups

HUAWEI TECHNOLOGIES CO., LTD.

HUAWEI Confidential

System Startup and Shutdown


Solaris system shutdown
The system can be shut down in the following modes:

shutdown -y -g0 -i5

To shut down and power off the system

shutdown -y -g0 -i0

To shut down the system and enter the ok mode

ok >

To directly power off the host in the ok mode

Note: Under the OS, do not directly press stop+A to enter the ok mode.
Solaris system startup:
Under the ok prompt characters, the system can
start in the following modes:
Ok > boot disk
disk

To start the system from hard

Ok > boot cdrom


To boot the system from the CD
drive for system installation
Ok > boot

HUAWEI TECHNOLOGIES CO., LTD.

-s

HUAWEI Confidential

To start to the single-user mode

Solaris system startup

Summary of Run Control Scripts and


Functions

HUAWEI TECHNOLOGIES CO., LTD.

HUAWEI Confidential

Run-Level Transitions1

HUAWEI TECHNOLOGIES CO., LTD.

HUAWEI Confidential

System Shutdown Procedures


The commands available to root for doing these types of
system
shutdown procedures include:
/sbin/init (using run levels S, 1, 0, 5 or 6)
/usr/sbin/shutdown (using run levels S, 1, 0, 5

or 6)
/usr/sbin/halt

//not suggested

/usr/sbin/poweroff

//not suggested

/usr/sbin/reboot

//not suggested

HUAWEI TECHNOLOGIES CO., LTD.

HUAWEI Confidential

The Directory Hierarchy


Introducing / (root) Subdirectories
Introducing File Components

File names : the objects most often used to access and


manipulate files
Inodes : the objects the system uses to record information about
a file
Data blocks: units of disk space used to store data.
Identifying File Types

# cd /etc ; ls -l
# cd /devices/pci@1f,0/pci@1,1/ide@3 ; ls -l
- Regular files
d Directories
l Symbolic links
b Block-special device files
c TECHNOLOGIES
Character-special
HUAWEI
CO., LTD.

device
HUAWEI files
Confidential

Configuration File for User Management


User configuration file:

/etc/passwd User password file


/etc/shadow Encrypted password
/etc/group

User group

Example:
#vi /etc/passwd
root:x:0:1:Super-User:/:/usr/bin/bash
daemon:x:1:1::/:
Note:

login_name:passwd_field:UID:GID:comment:home_directory:defau
lt_shell
HUAWEI TECHNOLOGIES CO., LTD.

HUAWEI Confidential

User Management Commands

Add a user
useradd -u uid -g gid -d home_dir -m -k shell
username
Add a user group
groupadd -g gid groupname

Delete a user
userdel -r username
home directory
userdel username

To delete a user and his


To delete a username

Delete a user group


groupdel groupname

Attention: If a users home directory cannot be established, modify the /etc/auto_maste


file by commenting out the home item and then restart the host.

HUAWEI TECHNOLOGIES CO., LTD.

HUAWEI Confidential

M2000 users management


Add user group

# groupadd -g 100 omcsysm


Add user and change password

# useradd -d /opt/sybase -g staff -m -k /etc/skel -u 101


-s /bin/bash dbuser
# passwd dbuser
# useradd -d /export/home/omc -g staff -G
root,sys,omcsysm -m -k /etc/skel -u 102 -s /bin/bash
omcuser
# passwd omcuser
# useradd -d /export/home/sysm -g omcsysm -m -k
/etc/skel -u 103 -s /bin/bash ftpuser
# passwd ftpuser
HUAWEI TECHNOLOGIES CO., LTD.

HUAWEI Confidential

Software Package Management


Solaris system software is released in the form of

package.
To obtain the software package information:

pkginfo
#pkginfo-d [device|pathname]-lpkg_name
Example:
# pkginfo |more
system

FJSVmdb

Fujitsu Platform Modular

The three domains are explained as follows:

pkg_category: Category of software package


pkg_name:Name of the software package, which start
with SUNW in the case of SUN products.
Description: Simple description of the software
product.
HUAWEI TECHNOLOGIES CO., LTD.

HUAWEI Confidential

Software Package Management


Install the software package

# pkgadd-d[device|pathname]pkg_name
Example:
#pkgadd -d /cdrom/Solaris_3_SUNWaudio
Uninstall the software package

In this case, an email is sent to root upon


successful deletion
of the software package
#pkgrmpkgname1pkgname2
Example:
# pkgrm Solaris_3_SUNWaudio
Attention: A software package, if shared by
two or more packages, cannot be deleted until all
software packages dependent on it are deleted.
HUAWEI TECHNOLOGIES CO., LTD.

HUAWEI Confidential

Chapter 3 Solaris Hardware Management


Introduction to the Solaris System
Solaris System Management
Solaris Hardware Management
Solaris File System Management
Solaris Network Configuration and
Management
Solaris System Backup and Restoration

HUAWEI TECHNOLOGIES CO., LTD.

HUAWEI Confidential

Chapter 3 Solaris Hardware Management


Device Naming Conventions
Reconfiguring Devices
Disk Partitioning
Disk Logic Names

HUAWEI TECHNOLOGIES CO., LTD.

HUAWEI Confidential

Device Naming Conventions


In the Solaris Operating Environment, all devices have three
different
types of names, depending on how the device is being
referenced.

Logical device names

Physical device names


Instance names

HUAWEI TECHNOLOGIES CO., LTD.

HUAWEI Confidential

Logical Device Names


# ls /dev/dsk
c0t0d0s0 c0t0d0s4 c0t3d0s0 c0t3d0s4 c0t6d0s0 c0t6d0s4
c0t0d0s1 c0t0d0s5 c0t3d0s1 c0t3d0s5 c0t6d0s1 c0t6d0s5
c0t0d0s2 c0t0d0s6 c0t3d0s2 c0t3d0s6 c0t6d0s2 c0t6d0s6
c0t0d0s3 c0t0d0s7 c0t3d0s3 c0t3d0s7 c0t6d0s3 c0t6d0s7

Physical Device Names


# ls -l /dev/dsk/c0t0d0s0
lrwxrwxrwx 1 root root 46 Jun 16 19:07 /dev/dsk/c0t0d0s0
->
../../devices/pci@1f,0/pci@1,1/ide@3/dad@0,0:a

HUAWEI TECHNOLOGIES CO., LTD.

HUAWEI Confidential

Instance Names
Instance names are abbreviated names assigned by the

kernel for each device on the system.


An instance name is simply a shortened name for the

physical device name. Two examples are shown below


sdn
where sd is the disk name and n is the disk number, such

as sd0, for the first SCSI (small computer system


interface) disk device: dadn
where dad (direct access device) is the disk name and n is

the disk number, such as dad0, for the first ide


(integrated drive electronics) disk device.

HUAWEI TECHNOLOGIES CO., LTD.

HUAWEI Confidential

Reconfiguring Devices
Performing a reconfiguration boot
# touch /reconfig
# reboot -- -r
Ok boot -r
Using the devfsadm command
# devfsadm -c divice_class
# devfsadm -i diver_name
# devfsadm //normally, this command is enough
# drvconfig
Listing a System's Devices
The /etc/path_to_inst file
The prtconf command
The format command

HUAWEI TECHNOLOGIES CO., LTD.

HUAWEI Confidential

Reconfiguring Devices
Use the devfsadm command to reconfigure a device:
Limit configuration to a specific device type:
# devfsadm -c disk

Limit configuration to a specific device driver:


# devfsadm -i dad
# devfsadm -i sd
# devfsadm -i st

To print the changes to /dev and /devices:


# devfsadm -v

HUAWEI TECHNOLOGIES CO., LTD.

HUAWEI Confidential

Reconfiguring Devices
Pre-Solaris 8 Operating Environment device reconfiguration is
handled with the drvconfig command.

To add a new disk device:


# drvconfig -i dad
# disks

To add a new tape drive:


# drvconfig -i st
# tapes

HUAWEI TECHNOLOGIES CO., LTD.

HUAWEI Confidential

Disk Partitioning
In the SUN system, the disk is

partitioned into 0-7 slices. Slice 0


serves as the root file system on the
boot disk. Slice 2 stands for the whole
disk and cannot be used for any other
purpose. User data is generally stored
in Slice 7.
The right figure illustrates a typical

mode of disk partitioning. The disk is


generally partitioned during system
installation. Alternatively, it may be
partitioned with the format command.

HUAWEI TECHNOLOGIES CO., LTD.

HUAWEI Confidential

Disk Logic Names

/dev/[r]dsk/c# t# d# s#
scsi controller number
Equipments scsi id
Equipments Logical Unit Number (LUN)
slice number
HUAWEI TECHNOLOGIES CO., LTD.

HUAWEI Confidential

Hard Disk Management Commands


Manage the hard disk

Command format: format


Example: # format
Searching for disks...done
AVAILABLE DISK SELECTIONS:
0. c0t0d0 <IBM-IC35L009UCD210-0-S5BS cyl 20763 alt 2 hd 2 sec 431>
/pci@1f,4000/scsi@3/sd@0,0

Re-search for new hard disks:

#devfsadm -C
#drvconfig

HUAWEI TECHNOLOGIES CO., LTD.

HUAWEI Confidential

Chapter 4 Solaris File System Management

Introduction to the Solaris System


Solaris System Management
Solaris Hardware Management
Solaris File System Management
Solaris Network Configuration and
Management
Solaris System Backup and Restoration

HUAWEI TECHNOLOGIES CO., LTD.

HUAWEI Confidential

Chapter 4 Solaris File System Management


Introducing Solaris OE File Systems
File System Management
mount a File System

HUAWEI TECHNOLOGIES CO., LTD.

HUAWEI Confidential

Introducing Solaris OE File


Systems
Disk-based file systems :
ufs, hsfs, pcfs, udfs
Distributed file systems :

nfs
Pseudo file systems:

tmpfs, swapfs, fdfs, procfs

HUAWEI TECHNOLOGIES CO., LTD.

HUAWEI Confidential

Introducing the Solaris Operating


Environment
ufs File
System

HUAWEI TECHNOLOGIES CO., LTD.

HUAWEI Confidential

File System Management


Create a file system on slice

# newfs /dev/rdsk/c0t0d0s5
Create a mount point

# mkdir /myfs
Mount a file system to a mount point

# mount /dev/dsk/c0t0d0s5 /myfs


View whether the file system has been mounted

# df -k

or

# mount

umount a file system

# umount /myfs
Recover a file system

# fsckraw-device
Example: # fsck -y /dev/rdsk/c0t1d0s0
HUAWEI TECHNOLOGIES CO., LTD.

HUAWEI Confidential

Maintaining File Systems

The File System Check Program


# fsck /dev/rdsk/c0t0d0s7
** /dev/rdsk/c0t3d0s7
** Last Mounted on /export/home
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
7 files, 14 used, 279825 free (17 frags, 347891 blocks,
0.0%
HUAWEI TECHNOLOGIES CO., LTD.

HUAWEI Confidential

Troubleshooting
Repairing Important Files if Boot Fails
ok boot cdrom -s
Boot device: /pci@1f,0/pci@1,1/ide@3/cdrom@2,0:f File and args
-s
SunOS Release 5.8 Version Generic_106541-02 [UNIX(R) System
V
Copyright (c) 1983-1999 by Sun Microsystems, Inc.
Configuring the /dev and /devices directories
INIT: SINGLE USER MODE

# fsck /dev/rdsk/c0t0d0s0
# mount /dev/dsk/c0t0d0s0 /a
Use terminal login if need use vi editor to set :
# TERM=vt100
# export TERM
HUAWEI TECHNOLOGIES CO., LTD.

HUAWEI Confidential

Automatic mount a File System


When the /etc/vfstab file system is booted, the /etc/vfstab file is
read for it to be automatically mounted. The file contains the
setting items of both the local and remote file resources:
Example: # cat /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/c0t0d0s1
swap no /dev/dsk/c0t0d0s0
/dev/rdsk/c0t0d0s0 /
ufs 1
no
/dev/dsk/c0t0d0s7
/dev/rdsk/c0t0d0s7 /export/home ufs 2
yes swap /tmp tmpfs yes HUAWEI TECHNOLOGIES CO., LTD.

HUAWEI Confidential

Automatic Load Options


Meaning of the domains:
Device-to-mount: To identify the NFS server and local block device

file
Device-to-fsck: To identify the local raw device file used to execute

fsck
Mountpoint: mount point
FS-type: Type of file system. In general, ufs is used for a local file

system, while nfs for a remote file system.


Fsck-pass: Figure in this domain is the sequence by which fsck

passes the check by the file system. The same figures indicate they
are checked concurrently.
Mount-at-boot: To decide that the file system is automatically

mounted at the time of system boot.


Mount-options: To define the mount options such as the read-write

access, and ufs file systems logging function. It is recommended


that the logging function of the ufs file system be enabled.
Notation: - in any domain indicates that there is no option.

HUAWEI TECHNOLOGIES CO., LTD.

HUAWEI Confidential

CD Drive, FDD (Volume) Management


After the system starts normally, it often automatically mounts

the CD drive and FDD because it has started the service process
for volume management. If the system does not automatically
mount them, we can start the volmgt service manually.
#/etc/init.d/volmgt[start|stop]
# volcheck

To check the CD drive and FDD, which will be

automatically mounted if they are found.


# eject[cdrom|floppy]

HUAWEI TECHNOLOGIES CO., LTD.

To eject the device

HUAWEI Confidential

Chapter 5

Solaris Network Configuration and


management
Introduction to the Solaris System
Solaris System Management
Solaris Hardware Management
Solaris File System Management
Solaris Network Configuration and management
Solaris System Backup and Restoration

HUAWEI TECHNOLOGIES CO., LTD.

HUAWEI Confidential

Chapter 5

Solaris Network Configuration and


management
Network Parameter Configuration Files
Basic Commands for Network Management
mount a File System
Route Commands for Temporary Setting
Host Name Resolution
FTP/telnet Service Configuration Methods
How to customize Solaris for M2000

HUAWEI TECHNOLOGIES CO., LTD.

HUAWEI Confidential

Network Parameter Configuration Files


Under the Solaris, the basic network configuration files are as follows:

/etc/hosts

To set the host name resolution and

the hosts IP address


/etc/hostname.hme0

To set the network interface name

/etc/netmasks

To set the network mask

/etc/nodename

hostname

/etc/inet/ipnodes

in Solaris 10, this file is added

/etc/defaultrouter

To set the address of the default

route (gateway) in the network


/etc/inetd.conf
/etc/service

HUAWEI TECHNOLOGIES CO., LTD.

To define the network service items


To set the network service port

HUAWEI Confidential

Basic Commands for Network Management

To display the network interfaces of active state in the system, use the
ifconfig command:
# ifconfig -a

To check network interface names


# cat /etc/path_to_inst | grep network

To enable or disable a network interface physically


# ifconfig ce3 plumb

//enable interface ce3

# ifconfig ce3 unplumb

//disable interface ce3

To enable or disable a network interface


# ifconfig nic_name up|down
example: # ifconfig ce3 192.168.0.3 netmask 255.255.255.0 up

To display all data structures related to the network


# netstat -[r | i] n
-r: To display the routing information
-i: To display the interface information

HUAWEI TECHNOLOGIES CO., LTD.

HUAWEI Confidential

Route Commands for Temporary Setting


Route setting

# route [add | delete]


Add a route to a destination host
# route add -host destination hosts ip local ip -interface
# route add -host

202.12.16.100

202.12.17.1

Add a route to a network


# route add -net destination networks ip local ip
# route add -net 204.12.16.0 204.12.17.1
Add a default route (gateway)
# route add default gateway_ip
# route add default 204.54.56.1
Notation: To set a route as a permanent value, add the
above route command to the system boot script, the
/etc/rc3.d/S98route file, for example.
HUAWEI TECHNOLOGIES CO., LTD.

HUAWEI Confidential

Routing Table Analysis


To view the systems routing table with the netstat -r command

Example: # netstat -r
Routing Table: IPv4
Destination
202.12.16.100

Gateway

Flags

10.72.88.69

UH

Ref Use Interface


1

0 hme0

204.12.16.0

10.72.88.69

UG

10.72.88.0

10.72.88.69

2 hme0

default

10.72.88.254

UG

UH

17

localhost

localhost

228 lo0

Notation: U indicates that the route is up, H indicates a


route to the host and G indicates a gateway.

HUAWEI TECHNOLOGIES CO., LTD.

HUAWEI Confidential

Host Name Resolution

/etc/nsswitch.conf: To decide the resolution order

Example: # cat /etc/nsswitch.conf

hosts : files dns nis


It indicates that the host name is resolved in the order of the local hosts
files, dns server and nis server.

/etc/reslove.conf: To set the hosts domain name and the dns servers IP

Example: # cat /etc/resolve.conf


domain huawei.com
nameserver 202.96.134.133

HUAWEI TECHNOLOGIES CO., LTD.

HUAWEI Confidential

FTP/telnet Service Configuration Methods

In Solaris 8, the daemon inetd monitors the FTP and telnet


service requests of the client, which can be responded to after
the system has normally started.

In Solaris 8, the configuration file of the daemon inetd is


/etc/inetd.conf.

The configuration file of the FTP and telnet service port is


/etc/services.

HUAWEI TECHNOLOGIES CO., LTD.

HUAWEI Confidential

FTP/telnet Service Configuration Methods


By default, the system does not grant FTP or telnet right to the

root user.
For the root user to have the FTP right, modify the /etc/ftpuser
file under Solaris8 by commenting out the root user items.
For the root user to have the telnet right, modify the
/etc/default/login file by commenting out the
CONSOLE=/dev/console item.

HUAWEI TECHNOLOGIES CO., LTD.

HUAWEI Confidential

Solaris 8 FTP/telnet Service Configuration Methods


In the system, to check whether the telnet service is running

# ps -ef |grep telnet


# ps -ef |grep ftp
# ps -ef |grep inetd
To temporarily stop the ftp or telnet service

# kill -9 pid

(ps -ef |grep inetd)

To enable the FTP or Telnet service in the system

# inetd -s

HUAWEI TECHNOLOGIES CO., LTD.

HUAWEI Confidential

Solaris 10 FTP/telnet Service Configuration Methods


In the Solaris 10, to check whether the telnet service is running

# svcs -l telnet

//check the enabled and state information

# svcs -l ftp
To enable and disable ftp or telnet service

# svcadm enable telnet


# svcadm disable svc:/network/ftp:default
//M2000 is not using this svc:/network/ftp:default Solaris default FTP
service
# svcadm enable svc:/omc/ftp:default
//M2000 is using svc:/omc/ftp:default FTP service, published with M2000
HUAWEI TECHNOLOGIES CO., LTD.

HUAWEI Confidential

How to customize Solaris for M2000? (1)


We do the following configuration:
Set Ethernet Cards connection parameter:

# echo "set ce:ce_taskq_disable=1">>/etc/system


Set Fiber Cards connection parameter:

# echo
"ses \"scsiclass,00.vSUN.pUniversal_Xport\"">>/etc/driver_aliases
Set system share memory for Sybase

# echo "set shmsys:shminfo_shmmax = ${value}">>/etc/system


note: ${value}=memory size (MB)x1024x1024/2
Stop finger service

# svcadm disable svc:network/finger


HUAWEI TECHNOLOGIES CO., LTD.

HUAWEI Confidential

How to customize Solaris for M2000? (2)


Stop sadmindrpc service which is for remote user query function:

# svcadm disable svc:/network/rpc/rusers:default


Stop sendmail service:

# svcadm disable svc:/network/smtp:sendmail


Stop the SNMP service published with Solaris:

# mv /etc/rc3.d/S76snmpdx /etc/rc3.d/K06snmpdx
# /etc/init.d/init.snmpdx stop
# chmod 000 /usr/lib/snmp/snmpdx

HUAWEI TECHNOLOGIES CO., LTD.

HUAWEI Confidential

Chapter 6 Solaris System Backup and Restoration

Introduction to the Solaris System


Solaris System Management
Solaris Hardware Management
Solaris File System Management
Solaris Network Configuration and
Management
Solaris System Backup and Restoration

HUAWEI TECHNOLOGIES CO., LTD.

HUAWEI Confidential

Chapter 6 Solaris System Backup and Restoration


System Backup and Restoration
System Backup and Restoration Examples

HUAWEI TECHNOLOGIES CO., LTD.

HUAWEI Confidential

System Backup and Restoration


Backup is needed for protection against:

Disastrous deletion of files


External system fault
Internal system fault
Backup level

Complete backup
Incremental backup

HUAWEI TECHNOLOGIES CO., LTD.

HUAWEI Confidential

Importance of Regular File System Backups


Backing up file systems is one of the most crucial system
administration functions. Backups should be performed on a
regularly
scheduled basis to prevent loss of data due to:
Accidental deletion of files
Hardware failures
Problems when reinstalling or upgrading a

system
System crashes
System break-in by an unauthorized user

compromising data integrity


Natural disasters

HUAWEI TECHNOLOGIES CO., LTD.

HUAWEI Confidential

Tape Device Naming

For example:

The first instance of a tape drive:


/dev/rmt/0
The second instance of a tape drive:
/dev/rmt/1
The third instance of a tape drive:
/dev/rmt/2

HUAWEI TECHNOLOGIES CO., LTD.

HUAWEI Confidential

System Backup and Restoration


Backup procedures:
1. Check the system activity
2. Notify all users
3. Put the system in the single-user state
4. Check the file system with fsck
5. Execute the backup

HUAWEI TECHNOLOGIES CO., LTD.

HUAWEI Confidential

Restoring File Systems

Command Format
ufsrestore options [ arguments ] [ filesystem ]
ufsrestore options [ arguments ] [ filenames . . . ]
Options:
t Lists the table of contents of the backup media.
r Restores the entire file system from the backup media.
x Restores only the files named on the command line.
i Invokes an interactive restore.
v Specifies Verbose mode. Displays pathnames to the terminal
screen as each file is being restored.
f Specifies the tape device name.

HUAWEI TECHNOLOGIES CO., LTD.

HUAWEI Confidential

System Backup and Restoration Examples


System backup:

# ufsdump 0uf /dev/rmt/0 /dev/rdsk/c0t3d0s0


System restoration

1. ok boot cdrom -s
2. # mount /dev/dsk/c0t3d0s0 /a
3. # cd /a
4. # ufsrestore rvf /dev/rmt/0
5. # rm restoresymtable
6. # installboot bootblk /dev/rdsk/c0t3d0s0 cd /

HUAWEI TECHNOLOGIES CO., LTD.

HUAWEI Confidential

Restoring Regular File


Systems
Example
# newfs /dev/rdsk/c#t#d#s#
# mount /dev/dsk/c#t#d#s# /mnt
# cd /mnt
# ufsrestore rf /dev/rmt/#
# rm restoresymtable
# cd /
# umount /mnt
# fsck /dev/rdsk/c#t#d#s#
# ufsdump 0uf /dev/rmt/# /dev/rdsk/c#t#d#s#
HUAWEI TECHNOLOGIES CO., LTD.

HUAWEI Confidential

M2000 System Backup and Restore


System backup:

System backup is done by Platform tool


Both Platform tool and system / root partition are
backed up
The backup material is tape
System restoration

Firstly uncompress the Platform tool


Then the Platform tool will do the system restoration

HUAWEI TECHNOLOGIES CO., LTD.

HUAWEI Confidential

Thank You
www.huawei.com

You might also like