HPUX服务器常用操作命令汇总.docx
- 文档编号:8068942
- 上传时间:2023-01-28
- 格式:DOCX
- 页数:19
- 大小:23.35KB
HPUX服务器常用操作命令汇总.docx
《HPUX服务器常用操作命令汇总.docx》由会员分享,可在线阅读,更多相关《HPUX服务器常用操作命令汇总.docx(19页珍藏版)》请在冰豆网上搜索。
HPUX服务器常用操作命令汇总
HPUX小型机常用操作命令汇总
目录
1、操作系统备份到本地磁盘2
2、备份系统到磁带机:
2
3、CELL板检查与合并分区操作2
3.1检查服务器分区2
3.2将CELL1加入分区03
3.3重新加载CELL板3
3.4合并后检查,是否在分区0里面4
3.5检查CPU,内存是否增加4
4检查卷组VG和磁盘PV的映射关系4
5检查引导设备顺序5
6创建新的PV5
7创建VG2.0的卷组5
8创建条带化逻辑卷5
9检查逻辑卷分布情况6
10导出卷组信息,仅导出,不删除数据7
11卷组去激活7
12修改为集群共享卷组7
13在集群里面修改为集群激活卷组,修改配置文件7
14停止CRS服务7
15机器性能检查7
15.1磁盘IO性能检查7
15.2磁盘IO性能检查8
15.3检查复制文件所需要的时间:
8
16从光盘安装软件9
17检查宕机文件内容9
18、服务器配置IP地址10
18.1修改/etc/rc.config.d/netconf文件10
19设置系统的主机名11
20使用sam工具修改12
21用户锁定,解锁办法13
22利用scsimgr获取hba卡的wwn号13
23使用命令获取WWN13
24.利用scsimgr获取disk的wwid号.比如eva要查看对应的盘14
25检查EVA存储挂载的硬盘15
26检查多路径映射关系16
27利用scsimgr获得设置多路径模式16
28.利用sccimgr关闭多路径合并模式16
29利用scsimgr做replace_wwid,相当于之前的replace_dsk17
30修改磁盘编号:
17
按照编号ID排序18
1、操作系统备份到本地磁盘
yx8640b1:
[/]#drdclone-t/dev/disk/disk3-xignore_unmounted_fs=true-xoverwrite=true
2、备份系统到磁带机:
#make_tape_recovery-Av-a/dev/rmt/15mn
3、CELL板检查与合并分区操作
3.1检查服务器分区
yx8640b1:
[/]#parstatus
[Cell]
CPUMemoryUse
OK/(GB)CoreOn
HardwareActualDeconf/OK/CellNextPar
LocationUsageMaxDeconfConnectedToCapableBootNum
=======================================================================
cab0,cell0ActiveCore4/0/816.0/0.0cab0,bay0,chassis0yesyes0
cab0,cell1Inactive4/0/88.0/0.0cab0,bay0,chassis1yes--
cab0,cell2Absent*------
cab0,cell3Absent*------
CELL1未加入分区
3.2将CELL1加入分区0
yx8640b1:
[/]#parmodify-p0-a1:
base:
y:
ri
Warning:
Thefirmwareminornumberofcell1(48)andcell0(66)donotmatch.
Note:
Itmaytakealongertimeforthepartitiontobootif
anycellisperformingpower-onselftest.
Toactivatenewlyaddedcells,rebootthepartitionforreconfiguration.
oractivateaCellOnlineusing"parolrad"command.
OnHP-UXuse"shutdown-R"or"parolrad-a".
OnWindows,restarttheOSonthepartitionusingtheStartmenuor"shutdown-r"ataCommandPrompt.
OnLinux,restarttheOSonthepartitionusing"shutdown-r"ataCommandPrompt.
Ifthepartitionisatthesystemfirmwareprompt,usetheRRcommandontheMP.
3.3重新加载CELL板
yx8640b1:
[/]#parolrad-a1
Note:
CellOnlineactivationoperationhasbeeninitiated.
Thesequencenumberis:
1
Note:
CellOL*operations,maytakeseveralminutestocomplete.
Killingorotherwiseabortingthisparolradcommandwillnotcancelthe
CellOL*operation.Seetheparolrad(1M)manpagefordetails.
Onlineoperationinprogress....
3.4合并后检查,是否在分区0里面
yx8640b1:
[/]#parstatus
[Cell]
CPUMemoryUse
OK/(GB)CoreOn
HardwareActualDeconf/OK/CellNextPar
LocationUsageMaxDeconfConnectedToCapableBootNum
=======================================================================
cab0,cell0ActiveCore4/0/816.0/0.0cab0,bay0,chassis0yesyes0
cab0,cell1ActiveNone4/0/88.0/0.0cab0,bay0,chassis1yesyes0
cab0,cell2Absent*------
cab0,cell3Absent*------
3.5检查CPU,内存是否增加
yx8640b1:
[/]#machinfo
CPUinfo:
Intel(R)Itanium29100seriesprocessor(1.6GHz,18MB)
2cores,4logicalprocessorspersocket
533MT/sbus,CPUversionA1
Activeprocessorcount:
2sockets
4cores(2persocket)
4logicalprocessors(2persocket)
LCPUattributeisdisabled
Memory:
16316MB(15.93GB)
Firmwareinfo:
Firmwarerevision:
9.066
FPSWAdriverrevision:
1.18
IPMIissupportedonthissystem.
BMCfirmwarerevision:
4.02
4检查卷组VG和磁盘PV的映射关系
gsdb01:
[/]#lvmadm-l
---Version1.0volumegroups---
VGName/dev/vg00
PVName/dev/disk/disk6_p2
/dev/disk/disk8_p2
VGName/dev/vglock
PVName/dev/disk/disk195
5检查引导设备顺序
gsdb01:
[/]#setboot
Primarybootpath:
0/0/0/2/0.0x6.0x0(/dev/rdisk/disk6)
HAAlternatebootpath:
0/0/0/2/0.0x6.0x0(/dev/rdisk/disk6)
Alternatebootpath:
AutobootisON(enabled)
Hyperthreading:
OFF
:
OFF(nextboot)
6创建新的PV
#pvcreate/dev/rdisk/disk187
7创建VG2.0的卷组
#vgcreate-V2.0-s16-S2pvgdlyx02\
>/dev/rdisk/disk187\
>/dev/rdisk/disk197\
>/dev/rdisk/disk202\
>/dev/rdisk/disk207\
>/dev/rdisk/disk210\
>/dev/rdisk/disk217
8创建条带化逻辑卷
大小为8个PE,分布在六块PV上面的逻辑卷
lvcreate-l8-i6-nlog2e_1gvgdlyx03
lvcreate-l8-i6-nlog2d_1gvgdlyx03
lvcreate-l8-i6-nlog2c_1gvgdlyx03
lvcreate-l8-i6-nlog2b_1gvgdlyx03
9检查逻辑卷分布情况
#lvdisplay-v/dev/vgdlyx03/log2c_1g|more
---Logicalvolumes---
LVName/dev/vgdlyx03/log2c_1g
VGName/dev/vgdlyx03
LVPermissionread/write
LVStatusavailable/syncd
Mirrorcopies0
ConsistencyRecoveryMWC
Schedulestriped
LVSize(Mbytes)1536
CurrentLE12
AllocatedPE12
Stripes6
StripeSize(Kbytes)128
BadblockNONE
Allocationstrict
IOTimeout(Seconds)default
---Distributionoflogicalvolume---
PVNameLEonPVPEonPV
/dev/disk/disk18722
/dev/disk/disk19722
/dev/disk/disk20222
/dev/disk/disk20722
/dev/disk/disk21022
Standardinput/dev/disk/disk21722
---Logicalextents---
LEPV1PE1Status1
000000000/dev/disk/disk18700000018current
000000001/dev/disk/disk19700000018current
000000002/dev/disk/disk20200000018current
000000003/dev/disk/disk20700000018current
000000004/dev/disk/disk21000000018current
000000005/dev/disk/disk21700000018current
000000006/dev/disk/disk18700000019current
000000007/dev/disk/disk19700000019current
000000008/dev/disk/disk20200000019current
000000009/dev/disk/disk20700000019current
000000010/dev/disk/disk21000000019current
000000011/dev/disk/disk21700000019current
10导出卷组信息,仅导出,不删除数据
#vgexport-p-s-mvgdlyx03.mapvgdlyx03
vgexport:
Volumegroup"vgdlyx03"isstillactive.
vgexport:
Previewofvgexportonvolumegroup"vgdlyx03"succeeded.
#rcpvgdlyx03.mapgsyxdb02:
/tmp/jna
导入卷组信息
vgimport-s-N-m/tmp/jna/vgogg.mapvgogg
11卷组去激活
#vgchange-ayvgdlyx03
12修改为集群共享卷组
#vgchange-cy-Syvgdlyx02
13在集群里面修改为集群激活卷组,修改配置文件
/etc/cmcluster/pkg_dlyx01/pkg_dlyx01.sh
添加卷组名称
#VG[1]=vg02
14停止CRS服务
#/sbin/init.d/init.crsstop
#cmhaltpkgpkg_dlyx02
15机器性能检查
15.1磁盘IO性能检查
#sar-d35
HP-UXgsyxdb01B.11.31Uia6412/09/14
19:
00:
16device%busyavquer+w/sblks/savwaitavserv
19:
00:
19disk52.660.565741.0817.32
disk93100.000.5011623400.009.41
disk94100.000.5016627320.008.99
disk9548.170.50508350.009.72
disk9684.720.5011218920.007.55
disk9724.250.50223560.0011.04
disk9846.180.50447710.0010.56
disk9919.930.50183140.0015.00
disk1010.660.50160.0010.20
disk33.320.676772.1121.20
disk11427.240.50295160.009.53
disk11768.770.507111380.009.71
disk1303.990.5037390.0013.45
disk1381.000.501110.0013.30
disk1411.660.501160.0016.13
disk1520.330.50050.0013.96
disk1692.660.5016700.0027.51
disk18712.960.501118740.0012.18
disk19723.590.502225530.0010.71
disk20220.600.501829750.0011.68
disk20715.610.501525240.0010.48
disk2107.640.50917890.008.52
disk2176.640.50817140.008.35
15.2磁盘IO性能检查
#sar-b35
HP-UXgsyxdb02B.11.31Uia6412/09/14
21:
14:
28bread/slread/s%rcachebwrit/slwrit/s%wcachepread/spwrit/s
21:
14:
310893100594667625
21:
14:
340102410021178109623
21:
14:
37025810044079646
21:
14:
4009531005197258521
21:
14:
43010191003309073726
15.3检查复制文件所需要的时间:
#timecp2g.txt2g.txt2
real3:
45.3
user0.0
sys1.0
lvlnboot-v/dev/vgdlyx01
16从光盘安装软件
挂载光驱
#ioscan-knfNCdisk
#mount/dev/disk/disk7/cdrom
gsyxdb01:
[/cdrom]#swinstall-s/cdrom
17检查宕机文件内容:
[root@gsyxdb02/var/opt]#cd/var/adm/crash
[root@gsyxdb02/var/adm/crash]#ls
boundscrashinfocrashinfo.binxportdbg-lp64.o
crash.9crashinfo-a-icrashinfo.install
[root@gsyxdb02/var/adm/crash]#ll
total31344
-rwxr-xr-x1rootroot2Dec1014:
12bounds
drwxr-xr-x2rootroot8192Dec1014:
16crash.9
-rwxrwxrwx22002006678168Oct172008crashinfo
-rwxrwxrwx22002006678168Oct172008crashinfo-a-i
-rwxr-xr-x1rootsys2539181Nov12009crashinfo.bin
-rwxr-xr-x1200200536Oct172008crashinfo.install
-rw-rw-rw-1200200107008Oct172008xportdbg-lp64.o
[root@gsyxdb02/var/adm/crash]#ls-lart
total31376
-rwxrwxrwx22002006678168Oct172008crashinfo
-rw-rw-rw-1200200107008Oct172008xportdbg-lp64.o
-rwxr-xr-x1200200536Oct172008crashinfo.install
-rwxrwxrwx22002006678168Oct172008crashinfo-a-i
-rwxr-xr-x1rootsys2539181Nov12009crashinfo.bin
-rwxr-xr-x1rootroot2Dec1014:
12bounds
drwxr-xr-x2rootroot8192Dec1014:
16crash.9
drwxr-xr-x3rootroot8192Dec1014:
16.
drwxr-xr-x16admadm8192Dec1014:
16..
[root@gsyxdb02/var/adm/crash]#cdcrash.9
[root@gsyxdb02/var/adm/crash]#./crashinfo
crashinfo(4.88)
Note:
HPCONFIDENTIAL
libp4(9.335):
Opening/stand/current/vmunix/dev/kmem
Loadingsymbolsfrom/stand/current/vmunix
KernelTEXTpagesnotrequestedincrashconf
Willuseanartificialmappingfroma.outTEXTpages
Loadingsymbolsfrom/stand/current/mod/rng
Loadingsymbolsfrom/stand/current/mod/iether
Loadingsymbolsfrom/stand/current/mod/btlan
Loadingsymbolsfrom/stand/current/mod/procsm
Loadingsymbolsfrom/stand/current/mod/c8xx
Loadingsymbolsfrom/stand/current/mod/cdfs
Loadingsymbolsfrom/stand/current/mod/igssn
Loadingsymbolsfrom/stand/current/mod/fcd
Loadingsymbolsfrom/stand/current/mod/td
Loadingsymbolsfrom/stand/current/mod/gelan
Loadingsymbolsfrom/stand/current/mod/igelan
Loadingsymbolsfrom/stand/current/mod/lvmp
Loadingsymbolsfrom/stand/current/mod/ciss
Loadingsymbolsfrom/stand/current/mod/sasd
18、服务器配置IP地址
18.1修改/etc/rc.config.d/netconf文件.
INTERFACE_NAME[0]=lan0#用lanscan显示网卡的设备名
IP_ADDRESS[0]=128.0.0.1#lan0的ip地址
SUBNET_NASK[0]=255.255.0.0#子网掩码
BROADCAST_ADDRESS[0]=""#默认为128.0.255.255网
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- HPUX 服务器 常用 操作 命令 汇总