Archive for the ‘FreeBSD’ category

MySQL NDB Cluster

December 14th, 2009

废话不多说,贴个命令以及回显。这种架构很不错!!应该找个机会在生产环境中跑跑。。。

fb00# ndb_mgm -e SHOW
Connected to Management Server at: 172.20.6.200:1186
Cluster Configuration
———————
[ndbd(NDB)]    2 node(s)
id=2    @172.20.6.201  (Version: 5.4.3, Nodegroup: 0, Master)
id=3    @172.20.6.202  (Version: 5.4.3, Nodegroup: 0)

[ndb_mgmd(MGM)]    1 node(s)
id=1    @172.20.6.200  (Version: 5.4.3)

[mysqld(API)]    2 node(s)
id=4    @172.20.6.203  (Version: 5.4.3)
id=5    @172.20.6.204  (Version: 5.4.3)

libpst

March 19th, 2009

这个软件很不错,但是近来Dave Smith老大更新的也太快了。。。。崩溃!!

LibPST 0.6.33 (2009-03-17)
===============================

* fix fedora 11 type mismatch warning (actually an error in this case).
* fix large file support, some sytems require config.h to be included
earlier in the compilation.
* compensate for iconv conversion to utf-7 that produces strings that
are not null terminated.
* don’t produce empty attachment files in separate mode.

policyd2

December 4th, 2008

I ran into a few problems with this port. First of all you had a bad path in
one of your depends (fixed). But, the main problem is docs install. Several
points, the use of %%PORTDOCS%% in the pkg-plist is deprecated and being
removed from all ports. Secondly all ports now must respect NOPORTDOCS,
NOPORTEXAMPLES and NOPORTDATA. I fixed your install to respect these flags and
moved two folders out of ${DOCSDIR} that belong in ${DATADIR}. Try and avoid
using ${CP} and ${MKDIR} in the makefile. Also, it’s not necessary to list
your docs in the pkg-plist at all that’s now all handled by PORTDOCS= in the
Makefile same with PORTEXAMPLES and PORTDATA. If you have many files and
directories you can use the “*” (wildcard) character rather than clutter up
the Makefile. Rule of thumb is 4 lines of filenames max. Another point,  it’s
not a good idea to redefine ${DOCSDIR}. Users expect to find docs under the
portname in /usr/local/share/doc/${PORTNAME}, changing that to “cluebringer”
will only serve to confuse them. And finally, we never include the license in
docs. They are already in the tree and there are  already hundreds of copies

mistakenly put in docs.

Beech老大不厌其烦的解释了我port的这些问题,记录一下,以后注意不再犯错。
我立马改了,并且刚想upload了一个新的,还没来得及,再回头看邮件,发现Beech老大已经把patch发过来了。
服!!老大们总是喜欢直接给 patch!!
于是,又赶紧退回原来版本,测试了一下patch,没有问题,便回信告诉老大ci吧。。。
http://www.freebsd.org/cgi/query-pr.cgi?pr=129385

更新了extmail/extman的ports

November 24th, 2008

在extmail-1.0.5和extman-0.2.5发布之后,我一直忙的忘记更新ports了,今天花了点时间搞定了patch,send-pr了,希望尽快有committer老大帮忙ci了。。。

extmail-1.0.5
http://www.freebsd.org/cgi/query-pr.cgi?pr=129119

extman-0.2.5
http://www.freebsd.org/cgi/query-pr.cgi?pr=129120

FreeBSD6.3-Release

January 19th, 2008

FreeBSD6.3-Release

早上起来看到6.3终于release了,呵呵。对我这儿来说,需要关注以下改动

0. 启动脚本/etc/rc.d/nfslocking被拿走了,取而代之的是/etc/rc.d/lockd/etc/rc.d/statd,看起来似乎更合理了。
1. rpc.lockdrpc.statd可以指定-p参数了
2. top可以用-j参数了,看到jail的ID
3. fdisk支持-p参数了,可以打印出slice表
4. mpt驱动的改进,偶这儿很多dell的机器需在用这个卡的驱动
5. MSI,MSI-x的支持,可以解决在dell2950上不能安装的问题

只记录跟我工作密切相关的,其实别的还有一堆改进。:)

使用FreeBSD6.3 RC1的问题

December 7th, 2007

FreeBSD 6.3 RC1

在使用6.3 rc1的过程中,rsync往其中一块硬盘上同步数据,在同步了一些数据之后,硬盘灯狂闪,停止响应,操作系统踢出这块硬盘(类似人间蒸发了)。对2块300G的SAS硬盘做测试,都是这德性。共测试3次,全部同一效果,不知道是硬件的问题,还是OS的驱动的问题。

之前还是这台机器,跑7.0beta3测试,没有任何问题,ZFS测试也没有出现过掉盘现象。不过没时间折腾了,先装了个RHEL5.1再试试,如果能顶过去,周末用完再继续折腾。:-)

6.3 release notes

December 6th, 2007

FreeBSD 6.3 Release的发行注释

偶翻译了少部分,make出来的结果在这儿可以看到:
http://www.delphij.net/r6/6.3-RELEASE/relnotes/i386/

看到翻译错误的,请到cnproj-cvs@lists.cn.freebsd.org里叫一下。

DELL2950不能安装FreeBSD6.2amd64 Release

December 3rd, 2007

MSI

在一台dell2950上装FreeBSD6.2amd64,死活装不上,在往硬盘上拷贝文件的时候,死机,对BIOS做了一些调整,换System Interrupts Assignment为Distruibuted,仍然不行。试了一下安装7.0amd64,则没有任何问题,怪了。。。

前后折腾了几天,下载了6.3RC1-amd64来试,仍然不行,向delphij老大请教,建议我打开msi。安装时选择6,然后:
set hw.pci.enable_msi=1
set hw.pci.enable_msix=1

继续安装,ok了。原来是MSI的问题。

FreeBSD6.2根本没有msi的支持,因此装不上。
6.3加入了MSI的支持,但是不是默认的,需要加入loader.conf。
7.0默认即有MSI扩展的支持,因此安装起来没有任何问题。

MSI–Message Signaled Interrupts
http://people.freebsd.org/~jhb/papers/bsdcan/2007/article/article.html

ZFS测试

November 23rd, 2007

ZFS

折腾了一周多时间,粗略的测试了FreeBSD7.0下的ZFS+NFS,几点体会。

0,打开ZFS的时候会报这样一句话:”WARNING: ZFS is considered to be an experimental feature in FreeBSD.” ,我要提醒,多读一遍。:)

1,直接使用下载的FreeBSD7.0 CD安装系统,配置好ZFS+NFS,然后拿3个NFS client和2个local的iozone来跑,会导系统不稳定,异常发生,一段时间后系统panic。抛出这个panic信息后,系统死掉。
“panic: kmem_malloc(114688): kmem_map too small: 417947648 total allocated cpuid=1″

2,重启后,升级src到beta3,然后重新配置kernel,继续像1那样的环境测试,结果也跟1差不多,仍然是不稳定+panic。

3,delphij老大给了一个patch,打上后重新make world&kernel,然后类似1、2那样的环境继续测试,跑了大概1天多点的时间,表现比原来好些,系统没有panic,但是仍然有异常。NFS服务非常不稳定,报如下信息。
nfs server 172.168.1.204:/tank/nfs: not responding
nfs server 172.168.1.204:/tank/nfs: not responding
nfs server 172.168.1.204:/tank/nfs: not responding
nfs server 172.168.1.204:/tank/nfs: is alive again
nfs server 172.168.1.204:/tank/nfs: not responding
nfs server 172.168.1.204:/tank/nfs: is alive again
nfs server 172.168.1.204:/tank/nfs: not responding

4,ZFS打开压缩和不打开压缩,性能相差非常明显,不过我这儿的前提是CPU性能足够好。压缩推荐使用lzjb,效果比较好。建议一定要打开压缩。

5,IO表现不行,或者是因为我的硬盘少的原因(只有3块,做的raidz1),zpool iostat看到的最大IO是124M,应该已经很高了,多数时候只10-20M左右,磕死老大跟我说的是能到100M左右。

6,网卡流量没跑起来,最高跑到几十兆,就不提了。看看我另外一台生产服务器(FreeBSD6.2)上的流量,就知道偶为啥不提了,:D。
if_bce0-day.png

结论: 鉴于稳定性和性能上的考虑,暂时不考虑在生产服务器上采用ZFS,等到7.0 Release出来之后再测试测试再说。

ZFS文档

November 12th, 2007

qingran老弟发的ZFS相关文档,相当全。另外强烈推荐一个ZFS视频看看,哈哈
http://youtube.com/watch?v=o3TGM0T1CvE

ZFS介绍:
Sun 
ZFS Learning Center

http://www.opensolaris.org/os/community/zfs/whatis/
http://www.opensolaris.org/os/community/zfs/
http://www.sun.com/2004-0914/feature/
http://en.wikipedia.org/wiki/ZFS
http://blog.ccw.com.cn/article-htm-itemid-13017-type-blog.html

ZFS development on FreeBSD:
Porting
ZFS file system to FreeBSD – paper

Porting
ZFS file system to FreeBSD – slides

ZFS
in the FreeBSD base announce


ZFS howto on FreeBSD:

ZFS – Quick start
guide

Root on ZFS configuration
Tuning Guide for ZFS

Live demos of ZFS on FreeBSD:
zpool
add/replace example

ZFS
compression example

ZFS
self-healing example

ZFS
snapshot example

UFS
on ZVOL example