Chinaunix首页 | 论坛 | 博客
  • 博客访问: 82949
  • 博文数量: 20
  • 博客积分: 627
  • 博客等级: 上士
  • 技术积分: 180
  • 用 户 组: 普通用户
  • 注册时间: 2010-02-11 18:03
文章分类
文章存档

2011年(20)

我的朋友

分类: 系统运维

2011-06-29 23:49:31

AIX中的常用命令
平时在aix中做一些操作,把常用的一些命令记录在此。
一、磁盘与文件系统
mkvg时没有-B参数时,一个VG最多255个逻辑卷和32个物理卷,加上这个参数后,可以达到512个逻辑卷128个物理
卷。
1.镜像rootvg
extendvg rootvg hdisk1
mirrorvg -c2 rootvg
bootlist -m normal -o hdisk0 hdisk1
bootlist -m normal ent2 gateway=192.168.32.94 bserver=192.168.32.11 client=192.168.32.117 hdisk0
#在hdisk1上建立一个引导逻辑卷(BLV)
bosboot -ad hdisk1
修改bootlist
bootlist -m normal hdisk0 hdisk1 rmt0
fd
显示boolist
bootlist -m normal -o
chvg -Qn rootvg
lsvg datavg 中QUORUM 2
rootvg 要关闭QUORUM

2.激活PV
chdev -l pvname -a pv=yes
3. VG操作
删除vg
varyonvg dbvg03
reducevg -df dbvg03 hdiskpower4
hdiskpower5
导出、导入vg
exportvg dbvg01
importvg -y'dbvg01' -c -n
importvg -V 50
-y'dbvg01' 50为 major number
查看可以分配的major number
lvlstmajor
建vg,-f
-n为启动进不varyon,-c 为concurrent
mkvg -f -y'dbvg01' -s'64' '-n'
'-c' hdiskpower0 hdiskpower1
mkvg -B -t 32 -y'dbvg01' -s'64' -c -n hdiskpower0 hdiskpower1
mkvg -B -t 32 -y'dbvg01' -s'64' -c -n hdiskpower0 hdiskpower1
mkvg -B -t 32 -y'dbvg02' -s'64' -c -n hdiskpower2 hdiskpower3
mkvg -B -t 32 -y'dbvg03' -s'64' -c -n hdiskpower4 hdiskpower5
mkvg -B -t 32 -y'dbvg04' -s'64' -c -n hdiskpower6 hdiskpower7
mkvg -B -t 32 -y'dbvg05' -s'64' -c -n hdiskpower8 hdiskpower9
mkvg -B -t 32 -y'dbvg06' -s'64' -c -n hdiskpower10 hdiskpower11
6. chvg -t 6 vg_name
这时PP的数目可为1016*6
7. 添加pvid
chdev -l hdisk3 -a pv=yes
mkvg -B -t 16 -s 128 -y
vgcx200raid5 hdisk3
chvg -a'y' -Q'y' vgcx200raid5
chdev -l hdisk2 -a pv=yes
mkvg -B -t 16 -s 128 -y vgcx200raid10
hdisk2
chvg -a'y' -Q'y' vgcx200raid10
8.存储
添加power盘。
powermt config
IBM存储
7133操作
smitty ssaraid
FastT700操作
#lsdev -C |grep da
dar0
Available
1742 (700) Disk Array
Router
dac0 Available
00-08-02 1742 (700) Disk
Array Controller
dac1 Available
0B-08-02 1742 (700) Disk
Array Controller
# fget_config -l dar0
dac0 ACTIVE dac1 ACTIVE
hdisk2
dac0
hdisk3 dac0
hdisk4 dac1
hdisk5
dac1
synclvodm
20. lv与文件系统操作:
mklv -y'tsm_fs' -c 2 -t jfs2 rootvg 8
crfs -v jfs2
-d'tsm_fs' -m'/usr/tivoli/' -A y -p'rw' -a agblksize='4096'
chfs -a
size=4096M /usr
//修改mount点
chfs -m /newmountpoint /oldmountpoint
查看lv中的文件系统信息
getlvcb -TA fslv00
lslv -m lv_name
查看lv的块情况
碎片整理:defragfs
defragfs -r /usr
reorgvg
//把fslv00上的第55个pp移动到hdisk7上
migratelp fslv00/55 hdisk7
//对lv_tangtest加镜像
mklvcopy lv_tangtest 2 hdisk3
//同步lv
syncvg -l lv_tangtest
//去除镜像
rmlvcopy lv_tangtest 1 hdisk3
//给lv改名,需要先umount上面的文件系统
chlv -n'lv_newname' lv_oldname
25.检查文件系统
fsck -y /dev/hd1
必须umount fs
syncvg 修复 stale
用lsvg -l
vg_name 看LV STATE 有没有stale
35、swap操作:
lsps -a
chps -s 44 -a y hd6
chps -s 28 -a y hd6
二、
[url=javascript:;][u][b]安装[/b][/u][/url]
与补丁操作
emgr
-l看补丁
instfix -ik IY74018
lppchk -v 检查
lppchk -c cluster*
补丁情况
hacmp 5.2的一个关键补丁IY73556一定要安装,另外aix的一个关键补丁IY77690也要安装。
//安装补丁
inutoc .
smitty installp
#/usr/sbin/emgr -P
此命令检查是否有补丁预警
#/usr/sbin/emgr -r -L
iy73556
移除补丁
下载最新的HACMP5.2补丁
smitty installp-->Update Software by
Fix (APAR)
完成补丁安装后
#smitty installp-->Update Installed Software to
Latest Level (Update All)
将HACMP更新至最新
BOS AIX5303 or above+IY74018+IY77690
HA HACMP
5205+IY71815+IY73556(efix)
JDK IBM SDK 1.4.2 32-bit
DB Oracle
Enterprise Edition_9.2_for AIX +
[url=javascript:;][u][b]oracle[/b][/u][/url]
5.2.0.5 Patch or
above
BEA Bea Weblogic
[url=javascript:;][u][b]Server[/b][/u][/url]
Premium
Edition 8.1 + SP3
A3的环境是Aix5304,Hacmp 5205+IY73556,Oracle 9207 Rac,Powerpath 4.5.3.1

五、网络操作
1.查看网卡的位置:
# lsslot -c pci
#
Slot
Description
Device(s)
U7879.001.DQDPPGP-P1-C1 PCI-X capable, 64 bit, 133MHz
slot fcs0
U7879.001.DQDLPPK-P1-C1 PCI-X capable, 64 bit, 133MHz
slot fcs1
U7879.001.DQDPPGP-P1-C2 PCI-X capable, 64 bit, 133MHz
slot Empty
U7879.001.DQDLPPK-P1-C2 PCI-X capable, 64 bit, 133MHz
slot Empty
U7879.001.DQDPPGP-P1-C3 PCI-X capable, 64 bit, 133MHz
slot pci10 lai0
U7879.001.DQDLPPK-P1-C3 PCI-X capable, 64 bit,
133MHz slot sa0
U7879.001.DQDPPGP-P1-C4 PCI-X capable, 64 bit,
133MHz slot ent2 ent3
U7879.001.DQDLPPK-P1-C4 PCI-X capable, 64
bit, 133MHz slot sisscsia3
U7879.001.DQDPPGP-P1-C5 PCI-X capable,
64 bit, 133MHz slot ent4 ent5
U7879.001.DQDLPPK-P1-C5 PCI-X
capable, 64 bit, 133MHz slot Empty
U7879.001.DQDPPGP-P1-C6 PCI-X
capable, 64 bit, 133MHz slot Empty
U7879.001.DQDLPPK-P1-C6 PCI-X
capable, 64 bit, 133MHz slot Empty
2.看网线是否插好
entstat -d ent0
3.
加两个IP
假设SCH数据库(10.0.0.50)出现问题了,需要切换到10.0.0.32上,
a.先把10.0.0.50的网线拔掉
b.
到10.0.0.32机器上
ifconfig en0 10.0.0.50 netmask 255.255.255.0
alias
这样就在网卡en0上加上个第二个ip地址10.0.0.50
c.
重启动10.0.0.32上的监听,激活standby数据库。
以后要去掉这个IP可以:
ifconfig en0 10.0.0.50 netmask
255.255.255.0 delete
4. cifs
mount -v cifs -n 10.0.4.11/user/password /E /mnt
mount -v cifs -o uid=203,gid=204 -n 10.0.1.83/username/password /share_dir
/home/oracle/testdir
#filesystems中的内容
/script/mksysb:

dev =
"/aixmksysb"

vfs =
cifs

nodename =
10.0.1.83/aixmksysb/aixosbk

mount =
true

options =
rw

account = false
5. etherchannel
//删除网卡:
/usr/lib/methods/ethchan_config -d ent4
ent2
//增加备用网卡
/usr/lib/methods/ethchan_config -a -b ent4 ent2
#To add the adapter ent0 as the backup adapter in the EtherChannel called
ent7, type:
/usr/lib/methods/ethchan_config -a -b ent7 ent0
#To change the address to ping attribute of an EtherChannel called ent7 to
10.10.10.10, type:
/usr/lib/methods/ethchan_config -c ent7 netaddr
10.10.10.10
#To force a failover of an EtherChannel called ent7 from the currently active
channel to the idle
channel, type:
/usr/lib/methods/ethchan_config -f ent7
#查看ether_channel工作在哪个网卡上。
entstat -d ent4 |grep "Active"
Active
channel: backup adapter
/usr/lib/methods/ethchan_config -f ent4
entstat -d
ent4 |grep "Active"
Active channel: primary channel
6.mail
配置文件/etc/sendmail.cf修改或增加一行
DSsmtp:[10.0.15.22]
其中10.0.15.22是邮件服务器的地址。
六、查看错误日志
errpt -d H 列出硬件
errpt -d S 列出软件
errpt -aj ERROR_ID
根据ERROR_ID看详细信息
errpt -aj 0502f666
错误代码,3位查看系统论断手册 8位、4位查看系统服务手册
七、Cluster操作.
初始时启动clcomdES
startsrc -g
clcomdES
查看cluster进程
lssrc -g
cluster
查看cluster状态
/usr/es/sbin/cluster/clstat -a
日志:
/usr/adm/cluster.log
/tmp/hacmp.out
八、微码
看微码版本
lsmcode -A
lscfg -vl ssa1 中ROS Level and ID 7201
7202即微码版本
升级微码
rpm -Uvh --ignoreos -f xxxxx
cd
/tmp/fwupdate
/usr/lpp/diagnostics/bin/update_flash -f xxxxx
九、其它操作
lsattr -El
lsattr -El mem0

看硬盘
lsdev -Cc disk
lsdev -Cc disk -F'name class subclass type'
lsattr -El hdisk2
lscfg -vpl hdisk2
查看class分类
lsdev -P -r class
lsattr -El sys0 |grep realmem

chuser account_locked=TRUE oracle
cd /var/adm
who wtmp
who
/etc/utmp
who -t wtmp #修改系统时间
who -pH 显示系统中由init创建的进程
who -dH
当前系统中已经死亡但又没有被init进程重新创建的进程
who -a 显示/etc/utmp中所有信息
重建/dev/null
mknod /dev/null c 2 2
chmod 666 /dev/null
查看微码
lscfg -vp | grep alterable
查看HBA卡的ID:
lscfg -vl fcs0
查看CPU的运行频率
# pmcycles
This machine runs at 500 MHz
-m
显示每颗CPU得主频。
# pmcycles -m
Cpu 0 runs at 500 MHz
Cpu 1 runs at 500
MHz
Cpu 2 runs at 500 MHz
Cpu 3 runs at 500 MHz
bootinfo -b检测上次正确引导的设备
bootinfo -K 查看系统内核 操作系统内核
bootinfo -y
查看系统硬件所能支持的内核
prtconf -k 系统内核
prtconf -c cpu位数 硬件位数
bootinfo -r
查看系统内存
bootinfo -e 查看系统能否从磁带启动,1为可以,0为不能
lsattr -E -l sys0 -a ncargs
光纤卡
dlnkmgr
查看方法:lsattr -El sys0 |grep maxuproc
修改方法: chdev -l sys0 -a
maxproc=1500
阅读(5807) | 评论(0) | 转发(0) |
0

上一篇:安装HACMP后会修改那些AIX 系统文件

下一篇:没有了

给主人留下些什么吧!~~