超级用户忘了密码怎么办?
重起机器, 自检完成后,会出现这一行 “ To discontinue, press any key in 10 seconds ”, 这时你按任意键, 系统会中止启动, 进入Main Menu.
* 键入“ bo ”, 在系统询问“ Interact with IPL (Y or N?)?”, 输入“y”。
* 在提示符ISL> 后, 输入“ hpux - is ”, 系统进入单用户状态。
* 键入“ passwd ”, 然后输入新的密码。
键入“ init 3 ”, 恢复系统正常运行作者: snowli 时间: 2003-11-28 09:39
双机热备份常用命令:
MC/Lock Manager (Multi-Computer/Lock Manager) 是惠普公司推出专门用 来保护关键业务应用免遭软、硬件故障影响的特殊应用软件。 使用MC/Lock Manager,多个节点(系统)被组织成一个企业群集,为局域网(LAN) 上的客户机提供高可用性的服务。 MC/Lock.Manager监控程序监控每一个节点的状态,并且对出现的故障很快 做出反应,使对应用程序的影响减小到最低。Abbreviations: CN = cluster_name NN = node_name PN = package_nameExplainations: ... = multiple occurences | = OR [descriptor] = optional1. 如何手动启动MC/Lock Manager?______________________________________________________________________________Start Lock Manager daemons and form a new cluster#cmruncl [-f] [-v] [-n NN...][-f] Force cluster startup without warning message[-v] Verbose output[-n ] specific name(s) of node(s) to2. 单点启动后如何加入另一个节点?______________________________________________________________________________Start Lock Manager daemon on node(s) and join a clustercmrunnode [-v] [NN...][-v] Verbose output3. 如何实现节点切换?______________________________________________________________________________切换分两种:本地切换 ( Local Switch ) 和 切换 ( Switch ) 当主节点出现网卡故障 ( MAC address or Hardware State Down ) 时,首 先会进行本地切换,备份网卡开始工作;如果此时备份网卡也有故障, 则系统会进行切换,备份节点接管系统工作。 可以手工模拟这些故障以进行故障诊断或检测。4. 如何监测 Cluster 运行状态?______________________________________________________________________________view information about the current Lock Manger clustercmviewcl [-v] [-n NN]... [-p PN]... [-l {package|cluster|node}][-v] Verbose output[-n] View information only about the specific node_name(s).[-p] package_name... View information only about the specific package_name(s).[-l] pkg|clus|node Display only package, cluster or node specific information.5. 如何停止 Cluster 运行?______________________________________________________________________________halt Lock Manager cluster daemonscmhaltcl [-f] [-v][-f] Force the cluster to shutdown even if packages are currently running.[-v] Verbose output6. 如何停止运行某个节点而 Cluster 在其它节点继续运行?______________________________________________________________________________halt Lock Manager daemon on node(s) and leave the clustercmhaltnode [-f] [-v] [NN...][-f] Force the node to halt even if there are packages running on it.[-v] Verbose output7. 如何在 Running Cluster 中运行某一个包?______________________________________________________________________________run a Lock Manager packagecmrunpkg [-n NN] [-v] PN...[-n ] Act on a specific node. [-v] Verbose output8. 如何停止一个运行中的包?______________________________________________________________________________halt a Lock Manager packagecmhaltpkg [-n NN] [-v] PN...[-n ] Act on a specific node.[-v] Verbose output9. 如何改变一个包的切换属性?______________________________________________________________________________enable or disable switching attributes for a Lock Manager packagecmmodpkg [-v] [-n NN]... {-e|-d} PN...[-v] Verbose output[-n ] Modify attributes on specific node(s) - else globally mod.-e enable-d disable
PN - package(s) whose switching attributes are changed作者: snowli 时间: 2003-11-28 09:41
3) 从远程磁带机上恢复数据到本地:
# frecover -xi /dir -f remote_name : /dev/rmt/0m
4) 从本地磁带机上恢复数据到远地系统:
# remsh remote_name "frecover -xi /dir -f local_name:
/dev/rmt/0m"
2. tar 命令
A. 对系统全备份
# tar cvf /dev/rmt/0m /
B. 备份某目录
# tar cvf /dev/rmt/0m /tmp
C. 改变文件的备份路径
# tar cvf /dev/rmt/0m -C /tmp .
[Note] : 路径 /tmp 在磁带上的备份路径变为 ./
# cd /tmp
# tar cvf /dev/rmt/0m ./*
D. 恢复数据
# tar xvf /dev/rmt/0m (磁带上所有数据)
# tar xvf /dev/rmt/0m /tmp ( 恢复目录 /tmp )
E. 查看磁带上的数据
# tar tvf /dev/rmt/0m
3. SAM
1) 备份数据
# sam
----> Select " Backup and Recovery "
---- >Select " Interactive Backup and Recovery "
---- >Select " Backup Device "
---- > Select " Backup Files Interactively " ( From [ Action ] menus )
----- > Select Backup Scope
----- > Select Local File Systems Only ( no NFS )
-----> Select"OK"
2. 检查备份的数据
(1) 检查文件 /var/sam/log/br_log
Notes: if Exit code=2, there is problem on backup procedure.
(2) 查看磁带上有那些文件
# frecover -rNsv -f /dev/rmt/0m
4. Copyutil
如何启动" Copyutil "
(1) 从CD boot , 进入ISL
BOOT_ADMIN>boot scsi.n.m ( path of CDROM drive----such as scsi.4.0)
(2) ISL>ode copyutil
Type help for command information
(3) ISL_CMD>copyutil
please wait while scan device bussess…
TY Indx Path Product ID Bus Size Rev
D 0 16/5.6.0 SEAGATEST31230N disk drive SCSI 1.0 GB HPM4
D 1 16/5.5.0 SEAGATEST31230N disk drive SCSI 1.0 GB HPM4
T 2 16/5.0.0 HPC1504[X]/HPC1521B DDS tape SCSI n/a 1009
a. 备份系统硬盘上的所有数据
COPYUTIL>backup
Enter the disk index ([q]/?): 0
Enter the Tape index ([q]/?): 2
Use data compression? (y/[n])? n
When backup finished, system will show: DONE!
COPYUTIL> exit
恢复数据到指定的系统硬盘上
COPYUTIL> restore
Enter the Tape index ([q]/?): 2
Enter the disk index ([q]/?): 0
Use data compression? (y/[n])? Y
After system display: Restored Successful, that means restore is finished!
COPYUTIL> exit
b. 注意:
当用copyutil备份RootDisk到相应的磁带时,该磁带可以作为bootable 磁带使用。作者: snowli 时间: 2003-12-1 11:56
5. make_recovery
1) 安装 " Ignite-UX application"
(1) 从 " HP-UX Application CD-ROM"上安装
a. # swinstall
b. " Mark" [A. 1.53 HP-UX Installation Utility( Ignite-ux for 10.20)]
c. " Analysis"
d. " Install"
(2) 从 WebSite 下载并安装:
http://www.software.hp.com/
Select : " Network & System administration "
Download: " ignite-ux_10.20.tar"(10.20 为 OS 版本)
(3)从硬盘上安装:
# cd /tmp
# tar xvf /dev/rmt/0m ./ignite-ux_10.20.tar
# swinstall -s /tmp/ignite-ux_10.20.tar
(4)从磁带上安装:
# dd if=/tmp/ignite-ux_10.20.tar of=/dev/rmt/0m bk=2
# swinstall -s /dev/rmt/0m
2)make_recovery:
/opt/ignite/bin/make_recovery [ -AprvC] [-d destination] [-b boot_destination]
-A : 指定要备份整个Root disk / Volume Group
-p : 预览备份过程,并不创建 Bootable DDS Tape
a. 确认 /var/opt/ignite/recovery/mkrec.append 文件
b. 创建 /var/opt/ignite/recovery/arch.include 文件
-r : 使用 -p 选项后,可以用该选项创建 Bootable DDS Tape
a. 该选项可以识别 /var/opt/ignite/recovery/arch.include 文件
-v : 用于显示备份过程的提示信息
-d : 指定DDS的设备文件名 ( default: /dev/rmt/0mn )
-b :指定系统备份过程中,用到的临时文件 ( default:
/var/tmp/uxinstlf.recovery )
该文件大小为32M,对系统进行make_recovery时,要注意/var文件系统的大小,当/var文件系统大小不足时,可用如下命令对系统进行备份: # make_recovery -A -C -b /tmp/uxinstlf.recovery
-C : 创建反映系统当前状态的文件: /var/opt/ignite/recovery/makrec.last
如果该文件存在,那么可以用 check_recovery 命令
3)注意:
用make_recovery备份的磁带是bootable 磁带,用它可以安装OS。
4)备份系统Root Disk
(1) 创建 " 最小"OS的bootable DDS tape (default 设备文件: /dev/rmt/0mn )
# make_recovery
(2) 创建" 最小"OS的bootable DDS tape (设备文件: /dev/rmt/c0t1d1BESTn )
# make_recovery -d /dev/rmt/c0t1d1BESTn
(3) 先预览,再创建 bootable DDS tape
# make_recovery -p
# vi /var/opt/ignite/recovery/arch.include
# make_recovery -r
(4) 复制 整个 Root Disk
# make_recovery -A
(5) 复制 整个 Root Disk, 且生成反映系统当前状态的文件:
( /var/opt/ignite/recovery/makrec.last )
# make_recovery -C -A
(6) 实例分析 :
<1> 系统文件系统:
Filesystem kbytes used avail %used Mounted on
/dev/vg01/osdepot 2621440 2530838 84872 97% /osdepot
/dev/vg01/lvol1 480341 58696 373610 14% /var
/dev/vg01/lvol7 378965 297521 43547 87% /usr
/dev/vg01/lvol6 588643 245540 284238 46% /opt
/dev/vg00/lvol3 107669 38577 58325 40% /
/dev/vg00/lvol1 67733 12409 48550 20% /stand
/dev/vg00/lvol4 30597 19 27518 0% /tmp
/dev/vg00/lvol5 19861 1416 16458 8% /home
<2> 分析:
[a] make_recovery:
vg00: /stand, /sbin, /dev, /etc, /tmp, /home
vg01: parts of /opt and /var (see Core-OS list)
/usr/bin, /usr/lib
/usr/obam, /usr/sam,
/usr/share, /usr/ccs,
/usr/conf, /usr/lbin,
/usr/contrib, /usr/local,
/usr/newconfig
make_recovery -A:
vg00:备份Root Volume Group 上的所有数据
vg01:备份non-Root volume Group 上的所有数据
只有当/usr 位于non-root volume group时,
该 non-root volume group 上的所有数据也将
被备份到磁带上
5)恢复磁带上的所有数据
(1) 非交互式恢复系统
a. 在磁带机中,插入系统恢复带
b. Boot 系统
c. 中断Boot 流程,进入 Boot_admin> 提示下
d. Boot_admin> bo 8/16.0.0
8/16.0.0: 磁带机的 hardware path
e. 选取 " non-interactive "
f. 等待系统恢复完毕
(2) 交互式恢复系统
a. 在磁带机中,插入系统恢复带
b. Boot 系统
c. 中断Boot 流程,进入 Boot_admin> 提示下
d. Boot_admin> bo 8/16.0.0
8/16.0.0: 磁带机的 hardware path
e. 不选取 " non-interactive "
f. 选取
<1> [ Install HP-UX ]
<2> [ Advanced Installation ]
<3> 配置或改变如下选项:
disks, file systems,
hostname, IP ddress,
timezone, root password,
DNS server, and gateway
g. 选取 [install continue… ],直到系统恢复完毕作者: weixiao@usisz.c 时间: 2003-12-12 16:12