当需要将两块网卡trunk的时候,我们需要做双网卡绑定的操作,其实就是新建了一块虚拟网卡bond0,将两块实际网卡做了它的从设备。从而实现双网卡的trunk模式。trunk是端口汇聚的意思。

# cd /etc/sysconfig/network-scripts/
# cat /etc/sysconfig/network-scripts/ifcfg-bond0

DEVICE=bond0  
BOOTPROTO=none  
ONBOOT=yes  
IPADDR=192.168.5.88  
NETMASK=255.255.255.0  
GATEWAY=192.168.5.1  
USERCTL=no  

阅读全文


我们这个平台使用的是HP的小机rx6600,因为跑java程序,所以选用了oracle公司的oc4j这个中间件,顺便吐槽一下,这个oc4j真的太麻烦,太讨厌了,搞不懂公司当初在实施的时候,为什么不采用weblogic或者是websphere这类的中间件。

前几天因为服务器双机出现故障,硬件厂家来了工程师处理好了双机问题。我这边因为修正了一个接口地址,本想重启应用,可应用死活启动不了。

故障一:

故障现象:

control.sh.log内容,报如下错误:

opmnctl: starting opmn and all managed processes...  
RCV: Permission denied  
Communication error with the OPMN server local port.  
Check the OPMN log files  

之后打开opmn.log,查看日志内容,发现如下错误:

12/11/16 19:22:14 [ons-internal] ONS server initiated
12/11/16 19:22:14 [pm-internal] PM state directory exists: /oracle/oracle10g/product/10.1.3.1/OracleAS_1/opmn/logs/states
12/11/16 19:22:14 [pm-internal] OPMN server ready. Request handling enabled.
12/11/16 19:22:14 [ons-listener] 127.0.0.1,6100: BIND (Address already in use)
12/11/16 19:22:14 [ons-connect] Local connection 127.0.0.1,6100 invalid form factor<unknown>  

阅读全文


TCMalloc (google-perftools) 是用于优化C++写的多线程应用,比glibc 2.3的malloc快。这个模块可以用来让MySQL在高并发下内存占用更加稳定。

安装步骤:

The glibc built-in stack-unwinder on 64-bit systems has some problems with the perftools libraries. (In particular, the cpu/heap profiler may be in the middle of malloc, holding some malloc-related locks when they invoke the stack unwinder. The built-in stack unwinder may call malloc recursively, which may require the thread to acquire a lock it already holds: deadlock.)

For that reason, if you use a 64-bit system, we strongly recommend you install libunwind before trying to configure or install gperftools. libunwind can be found at here

Even if you already have libunwind installed, you should check the version. Versions older than this will not work properly; too-new versions introduce new code that does not work well with perftools (because libunwind can call malloc, which will lead to deadlock).

阅读全文


自即日起,本站启用新域名 www.bestzhou.org 域名,bestzhou.net域名因所有权问题,导致续费困难,放弃了。唉。一年一换,完全没有好处,搜索引擎又要重新添加。


昨天晚上在自己的笔记本上用LVM,尝试一下linux使用lvm的效果,结果grub的安装上就存在问题,安装不了。grub2.0是支持全盘lvm的,但是我不知道为什么,总是安装不成功。目前查阅了一些文章,两种方案:

  • /boot分区单独分出来。
  • 如果全部是lvm的话,使用lilo。

即便这样,还是会出现同样的问题。启动的时候,会出现一个错误信息

no volume groups found(没有找到卷组),然后启动就停止了。很显然,卷组没有被激活,挂载不了。

这时候,必须要modprobe dm-mod,然后lvm vgchange -ay,然后再退出exit,启动就能进行下来。很奇怪的问题。按照官方文档的方法,已经在rc.confUSELVM=yesmkinitcpio.conf的hooks里面添加了LVM2,但是依旧存在问题。

我看arch论坛的人修改hooks脚本,来达到使lvm卷组被激活。

阅读全文