The BOS boot image contains a copy of the system's kernel and device drivers needed to boot from the mksysb tape,It is created by the bosboot command
There are three important files in the mkinsttape image: ./tapeblksz contains the block size
./bosinst.data allow you to specify the requirements at the target system and how the user interacts with the target system
./image.data contain information describing the image installed during the BOS installation process,This information includes the size,names ,maps,and mount points of logical volumes and file systems in the rootvg
# mksysb -i 产生一个新的image.data on the tape during a backup( mkszfile命令产生的image.data)
The mksysb commmand creates a bootable image of the rootvg file system either in a file system directory onto a bootable tape,an is used to restore a system after a system failure or for system cloning
# savevg -if /dev/rmt0 uservg 使用tar备份目录:
进入该目录,运行: # tar -cvf /dev/fd0 * 使用backup备份目录:
进入该目录,运行: # find . -print ( or -depth ) | backup -i -f /dev/rmt0 (相对的路径)恢复时使用restore
使用cpio备份目录: # cd /
# find /userdirectory -print | cpio -o -c -v -B >; /dev/rmt0 (恢复时使用cpio -i) (绝对的路径)
增量备份:
# backup -0 -uf /dev/rmt0 /home # backup -1 -uf /dev/rmt0 /home
对于磁带机:
Rewind the tape to the beginning by using the following # tctl -f /dev/rmt0 rewind ( mt 也可以 )
显示在一个备份的媒质上的内容 # restore -T -d -v -q -s4 -f /dev/rmt0.1
恢复一个文件:
# restore -x -d -v -q -s4 -f /dev/rmt0.1 ./etc/hosts # tar -xvg /dev/rmt0 /etc/hosts
# cpio -i -c -v -d -u -m -B < /dev/rmt0 \ (注意多了一个 -d )
The following shows how to restore the file /etc/hosts from a backup that was made using the -i
flag option during a backup by file sytem , notice the -d flag is used to restore the file # restore -x -d -v -q -f /dev/rmt0 /etc/hosts
The following shows how to restore the file /etc/hosts when a file system backup was used to make the backup
# restore -x -v -q -f /dev/rmt0 /etc/hosts
恢复一个目录:
先 tctl -f /dev/rmt0 rewind
# restore -x -d -v -s4 -f/dev/rmt0.1 ./var/dt # tar -xvf /dev/rmt0 /var/dt
# cpio -i -c -v -d -u -m -B < /dev/rmt0 \
考点: 一个典型的错误发生在磁带和系统之间移动数据的时候,是因为不正确的 Block size 使用 # tcopy /dev/rmt0 来决定 tape block size
# dd if=/dev/rmt0 bs=128k count=1 | wc -c 来决定 tape block size 改变 tape block size 使用 # chdev -l rmt0 -a block_size=512 复制磁带: # tcopy /dev/rmt0 /dev/rmt1 创建一个软盘的copy:
# dd if=/dev/fd0 of=/tmp/ddcopy # dd if=/tmp/ddcopy of=/dev/fd0
第九部分: SRC 启动SRC:
涉及到一个 /usr/sbin/srcmstr 进程,Remove the srcmstr daemon from the /etc/inittab file would cause these startsrc command to fail
Make a record for the srcmstr daemon in the /etc/inittab file using the mkitab command # mkitab -i fbcheck srcmstr:2:respawn:/usr/sbin/srcmstr #telinit q
The syslogd daemon read the /etc/syslog.conf configuration file when it is activated or when it receives a hangup signal
If you decide to capture the warning messages from all users int hte /var/spool/syslog file, 1、 .warning /var/spool/syslog (在 /etc/syslog.conf中加入相关信息 ) 2、 touch /var/spool/syslog ( 创建该文件 )
3、 chmod 666 /var/spool/syslog ( 改变权限使所有的用户都可以写信息到该文件 ) 4、 refresh -s syslogd
安装skuler command只需要将/var/spool/cron/crontabs/root文件中的注释去掉
第十部分: Newwork adminsitration
At IPL time, the /init process will run /etc/rc.tcpip after starting the SRC
The script /etc/tcp.clean can be used to stop TCP/IP daemon, It will stop some daemons and remove the /etc/locks/lpd TCP/IP lock file
Note that the /etc/tcp.clean does not stop the portmap and nfsd daemons ( 要使用stopsrc 和
startsrc )
该命令调用方法: # sh /etc/tcp.clean
注意:不要使用 # startsrc -g tcpip 来启动TCP/IP daemons(它将同时启动routed和gated) Remove the rc.tcpip条目在/etc/inittab中将在IPL阶段不会启动任何 server application,如果使用的图形终端,一定要确认删除了rc.dt和rc.tcpip条目,否则系统将挂起
Inetd进程调用了inet.conf文件,如果使用smit改变该/etc/inetd.conf的话,inetd进程自动refresh,如果使用vi来更新的话,则要使用refresh -s inetd 或者是 kill -l inetdPID来手工刷新 subserver controlled by inetd in the inetd.conf文件 # lssrc -ls inetd 列示启动的subserver
When the inetd daemon is stopped, The previously started subserver processes are not affected , However , new service requests for the subservers can no longer be satisfied,此时,就不能telnet 或 ftp了
如果Inetd进程停止,已经存在的session将不会受到影响,但不会产生新的session
The protmap daemon converts remote procedure call (RPC) program numbers into Internet port numbers
When an RPC server starts up , it registers with the portmap daemon
Since standard RPC servers are normally started by the inetd daemon,The portmap daemon must be started before the inetd daemon is invoked
注意: if the portmap daemon is stopped or comes to an abnormal end,all RPC servers on the hosts must be restarted, The nfsd is a common RPC server
The default order in resolving host names is : 1、 BIND/DNS (named) 2、NIS 3、/etc/hosts 通过创建/etc/netsvc.conf文件可以改变该顺序
通过设置NSORDER变量可以改变默认的和/etc/netsvc.conf文件中的顺序,NSORDER的优先级最高
一个/etc/resolv.conf的例子: # cat /etc/resolvl.conf nameserver 9.3.1.12
domain itsc.ibm.com
search itsc.ibm.com itse.ibm.com
确认named进程的状态: # lssrc -s named
插入一块新的网卡后需要的配置步骤:(基于硬件的配置) 1、必要的话重新调用cfgmgr命令来加载硬件 2、smitty devices安装驱动软件
3、# diag -a 确认新的网卡已经加入到硬件配置中了 4、再次运行cfgmgr
5、# lsdev -cl ent0 确认该网卡处于available的状态
6、使用 # smitty inet来配置nework interface,不要使用smitty mktcpip,It is used for configuration TCP/IP for the first time
To change advanced feature of network adapters # smitty chgenet
To configure TCP/IP # smitty tcpip
To change/show Characteristics of a nework interface # smitty chinet
Enable IP forwarding: no -o ipforwarding=1
配置IP地址: # smitty mktcpip
Identify network interface on your server # lsdev -Cc if
This will list of all interfaces on the system,whether they are being actively or not
或者使用 # ifconfig -a
This will produce a list of all network interfaces on the system that have ip addresses and are actively
To get information about one specific network interface # ifconfig en0
To activate a network interface # ifconfig tr0 up
# ifconfig tr0 10.32.1.1 netmaski 255.255.255.0 up (同时分配一个IP address) To deactivate a network interface # ifconfig tro down
To delete an address from a network interface
# ifconfig tro delete ( this command does not place the interface in the down state,nor does it remove the interface from the work interface list )
To remove the interface tro from the network interface list
# ifconfig tr0 detach ( This command remove all network addresses assigned to the interface and removes the interface from the output of the ifconfig -a command,To add an interface back to the system , or to add a new interface to the newwork interface list , run # ifconfig Interface
考点: 给一块网卡绑两个IP address :
# ifconfig tr0 10.32.1.1 netmask 255.255.255.0 alias
删掉该IP # ifconfig tr0 10.32.1.1 netmask 255.255.255.0 delete
MTU to small :may be lost during transmission MTU to length :may be collide with other packets
如何看一块网卡的MTU ( 同一个LAN中必须有相同的MTU) # lsattr -El en0
调整MTU的大小: