Archive for 2008年十二月月

call mum!

十二月 31, 2008

today, being the last day of 2008,  when I finished my day and stepped out the office,  a plane was writing above words on the sky.

I took a picture and attached it here as a reminder that when you are less busy and have a moment, give your parents a ring, let them know you are going well everything.

31122008

two years already

十二月 31, 2008

By today, I had been here, Sydney for two years.

on 31st, Dec 2006, I arrived in Sydney in the morning,  everying is still so fresh in my mind. My brother-in-law picked me up and drove me back his home, we live in his house for 20 days, then we rent another townhouse, and later on we bought a townhouse.

Then we got a baby, and now my baby is already nearly 4 months  old.

how time flies!!!

problem with disk capacity

十二月 31, 2008

Yesterday, I was tasked to configure some new LUNs that allocated to a M500o server.  All luns worked very well except one.

syminq command showed the disk is with 18G space, luxadmin showed the same result as well.  But format command only recognize it as 9G.  

 

bash-3.00# syminq | grep -i 195E

/dev/rdsk/c3t60060480000290100478533031393545d0s2 M(2) EMC SYMMETRIX 5771 780195E008 17677440 (here 18G)

bash-3.00# luxadm display /dev/rdsk/c3t60060480000290100478533031393543d0s2

DEVICE PROPERTIES for disk: /dev/rdsk/c3t60060480000290100478533031393543d0s2

Vendor: EMC

Product ID: SYMMETRIX

Revision: 5771

Serial Num: 10047895C008

Unformatted capacity: 17263.125 Mbytes <—————–18G

Read Cache: Enabled

Minimum prefetch: 0×0

Maximum prefetch: 0xffff

Device Type: Disk device

Path(s):

/dev/rdsk/c3t60060480000290100478533031393543d0s2

/devices/scsi_vhci/ssd@g60060480000290100478533031393543:c,raw

Controller /devices/pci@12,600000/SUNW,qlc@0/fp@0,0

Device Address 5006048452a53fb9,6a

Host controller port WWN 2100001b320f2023

Class primary

State ONLINE

Controller /devices/pci@12,600000/SUNW,qlc@0,1/fp@0,0

Device Address 5006048452a53fb6,6a

Host controller port WWN 2101001b322f2023

Class primary

State ONLINE

 

But, with format

55. c3t60060480000290100478533031393545d0 <EMC-SYMMETRIX-5771 cyl 18412 alt 2 hd 15 sec 128>

/scsi_vhci/ssd@g60060480000290100478533031393545

56. c3t60060480000290100478533031393543d0 <EMC-SYMMETRIX-5771 cyl 9205 alt 2 hd 15 sec 128> default4 <— only 9205 cylinders

/scsi_vhci/ssd@g60060480000290100478533031393543

57. c3t60060480000290100478533031343033d0 <EMC-SYMMETRIX-5771 cyl 36826 alt 2 hd 30 sec 128>

/scsi_vhci/ssd@g60060480000290100478533031343033

partition> p

Volume: default4

Current partition table (original):

Total disk cylinders available: 9205 + 2 (reserved cylinders)

Part Tag Flag Cylinders Size Blocks

0 unassigned wu 0 0 (0/0/0) 0

1 unassigned wu 0 0 (0/0/0) 0

2 backup wu 0 – 9204 8.43GB (9205/0/0) 17673600 <—– 9G

3 unassigned wu 0 0 (0/0/0) 0

4 unassigned wu 0 0 (0/0/0) 0

5 unassigned wu 0 0 (0/0/0) 0

6 unassigned wu 0 0 (0/0/0) 0

7 unassigned wu 0 0 (0/0/0) 0

partition>

 

This is becuase the disk got wrongly labelled before, we just need to manually destroy the label and re-label it.

dd if=/dev/zero of=/dev/rdsk/c3t60060480000290100478533031393543d0s2 bs=512k count=1

then go back to format and re-label the disk,  afterwards, format reported it as 18G emc disk.

圣诞节还是来了

十二月 24, 2008

因为对圣诞节没有太多的感受,因此没有选择在圣诞节期间休假。还是选择这段时间工作好阿,每天support  电话就响有限大几次,比较轻松。今天经理过来,说今天下午大家要是没事,可以提前走,让我想到了国内的时候,每次大年30的时候,领导都是说,没事的时候,大家可以早点走,而且,公司的班车都是1:30  就发车。

昨天还碰到一件有意思大事情,下班回家,开到 delhi  路和  epping  路交界处,等红灯,绿灯一亮,大家都准备发动,但是有个吉普车,超级强悍,它发出了我所见过大最强烈的大浓烟,导致它后面大5量车都不敢动地方,估计这车是烧柴禾的,而且还是那种湿柴禾。

还是关于修改主机名,也要照顾VCS的感受!

十二月 17, 2008

上周末,成功将一个cluster中的两个节点替换了。原有系统是一个四节点的cluster,节点app1和app2  是两台 v480, db1和db2 是两台F6800。用两台M4000替换app1和app2。两台M4000分别命名为app11, app21,建立一个2节点的cluster,测试成功后,rename app11, app21 to app1,app2。 修改/etc/llttab /etc/llthosts,  相应的修改了main.cf 后,新节点加入后,一直显示节点app11加入,真是气人啊。

后来仔细看看文档, 发现还有个文件需要修改 /etc/VRTSvcs/conf/sysname, 如果该文件存在,cluster中的节点名字就来自它,如果不存在,就来在”uname -n”, 修改了这个文件后,成功将节点app1,app2重新加入到cluster中。

修改主机名,要考虑vxvm的感受

十二月 12, 2008

一些时候,需要修改主机名,对于vcs,相应的配置比较明了,不再累叙。对于vxvm,可以

1.  collect a copy of vxexplorer

2. vxdg -h <new-hostname> deport dgname 

    这步是修改vxvm disk上的信息

3. vxdctl hostid <newhostname>

    这步是修改/etc/vx/volboot 文件,以便将来有新盘加入的时候,写入新的hostname信息。

4. Change the hostname and IP address of the system

5. reboot server
但是在vxvm4.1 以及 5.0上,未做如上修改,主机重启后,disk groups 也都全部被自动import进来了。所以,估计除了hostname,vxvm肯定还是在disk上写了其他的信息,主机重启后,能自动识别disk 就是应该属于本机,就自动import进来了。

利用live upgrade 可以split 或者merge 文件系统

十二月 9, 2008

live upgrade除了可以用来在线升级操作系统,还可以用来split或者merge文件系统。

假如原有系统为solaris 10, 而且有两个硬盘 c0t0d0 &c0t1d0。 系统运行在 c0t0d0上,而且系统只有 根 (/) 和 swap 文件系统,现在想把 /usr 单独分离成一个文件系统,可以采取以下步骤分离

1. mount -F lofs /usr /usr

2. lucreate -c “sol10_old” -m /:/dev/dsk/c0t1d0s0:ufs \

                                                    -m -:/dev/dsk/c0t1d0s1:swap\

                                                    -m /usr:/dev/dsk/c0t1d0s3:ufs -n “sol10_new”

3. luactivate sol10_new

经过以上步骤就成功在c0t1d0上,将 /usr 分离出来,形成单独的文件系统了。 这里的技巧就是一定要 将 /usr mount成文件系统,因此 原来的/usr 只是个目录,因此可以用loopback 文件系统来愚弄 live upgrade

 

反之,我们也可以用 live upgrade 来merge文件系统。假如sol10运行在 c0t1d0上,有/  /usr swap 三个文件系统, 通过一下步骤,可以将/usr 合并到 / 中。

1. lucreate -c “sol1o_old” -m /:/dev/dsk/c0t0d0s0:ufs \

                                                   -m -:/dev/dsk/c0t0d0s1:swap -n “sol10_new”

2. luactivate sol10_new

VCS/VXVM upgrade & downgrade

十二月 9, 2008

公司的一个两节点的VCS 5.0  为了测试即将到来的应用系统升级,因此拿这个系统开刀,进行测试。虽然这个套系统一直还未投入使用,但上面也有1T的生产数据,所以操作还是很小心的,而且用BCV做了备份。

原有系统是solaris 9 + vcs/vxvm 5.0, 整个操作经过了以下阶段

1. vcs/vxvm downgrade to 4.1

2. 操作系统升级到 sol10 11/06 & vcs/vxvm 4.1 re-install

3. 操作系统升级到 sol10 05/08

4. vcs/vxvm 4.1 升级到 5.0mp1

整个过程波澜不惊,没什么可圈可点,只是第一步vcs/vxvm 从5.0 downgrade 到4.1 值得提一下。

vcs 的downgrade很简单,比较straightforward.

倒是vxvm 的downgrade比较tricky,因此veritas disk group 是不支持从5.0到4.1的downgrade,我特意与symantec 开了个case,他们也确认了这点。没办法,只有自己想招了。

无论4.1 还是 5.0 , dg肯定还是不变的分为private &public region,只要保持privgate &public region 的大小,可以重建dg,来恢复数据,本着这个想法,经过摸索,终于成功讲vxvm downgrade 到4.1

1. backup vx dg information under v5

    vxprint -Qqmhspv -g sftg_datadg > dg1.txt

    verify configuration

    vxprint -D – -ht < dg1.txt

1.5

   check disk info

   vxprint -qd -g <dg_name>

 

 

2. destroy dg under vxvm v5.

    vxdg destory sftg_datadg

 

3. downgrade vxvm software from v5 to v4.1

    

4. Verify configuration under v4.1

vxprint -D – -ht < dg1.txt

 

delete those features that are not supported by v4.1 from dg1.txt, until dg1.txt is accepted by vxprint command

proxy_rid=0.1029

readonly=off

cons_reattach=off

fmr_rec_needed=off

voltype=off

siteconsistent=off

allsites=off

export=

site=

sd_name=

uber_name=

tentmv_src=off

tentmv_tgt=off

tentmv_pnd=off

 

5. create dg under vxvm 4.1

   vxdg -T 110 init sftg_datadg disk01=EMC0_1

 

5. recreate volume with configuration above

    vxmake -g sftg_datadg -d dg1.txt

6. start dg/vol

    vxvol -g sftg_datadg init active sftg

    mount /dev/vx/dsk/sftg_datadg/sftg /export/sftg

写在这里,便于自己查找,也希望能帮到其他人。

快过年的感觉来了。

十二月 7, 2008

快到圣诞节了,假期也多起来了,工作也没那么忙了。

圣诞节日可以连续休息4天,而且29日又是公司的picnic day,休息一天,然后马上是新年,休息一天,1月底又是过中国年了,我又申请了一周的假期,二月的第三个星期,又休息一周,

因此接下来的一段时间,会比较轻闲一些。

公司也挺有意思,年假超过20天,hr就陆续发信,劝大家休假,咨询了一下老人,公司曾经发生过一下子有5,6个人,连续休假7,8个星期,给工作的运维造成了一定的不便,因此现在公司的政策是超过20天就开始劝休。 我去年休的假期基本都是用的personal leave, 因此年假还是很多的。

仔细算算,

每年公众假日9天,公司额外给一天带薪picinic day,

10天的带薪事假

20天的带薪年假,

总共是40天,

也就是可以休息8周,接近2个月,算下来还是比较满意的。

在solaris10 zone环境下部署VCS5

十二月 7, 2008

几个月前,自己设计并实施了solaris10 zone环境下VCS5的应用。整个系统框架如下:

vr2

系统为solaris10 05/08,两个节点,每个节点分别建3个zone,其中2个运行应用软件,1个运行oracle 10 数据库,运行数据库的zone内,运行三个oracle实例。应用程序和每个数据库实例都要求可以在两个节点内进行切换。集群软件采用veritas storage foundation5 MP1。 整个安装配置过程比较顺利,这里把需要注意的地方罗列一下
1. 由于三个local zone均采用exclusive-ip,也就是每个zone都分配了2个网卡,两个网卡都dedicated给相应的local zone。VCS5自带的IP agent只支持shared-ip local zone, 因此自己写了ZoneVip agent,通过zonecfg进行动态的配置ip。因为采用了exclusive-ip, local zone内有独立的ip stack,因此IPMP都是部署在local zone内,而且为了节省ip,采用link-based IPMP.

2. 由于VCS daemon必须运行在global zone内,而应用程序运行在local zone内,为了确保agent能够监测运行在local zone内的resource,而且在必要的时候进行相应的动作,inter-zone 的通信必要要建立起来,方法是在global zone内,建立好相应的vcs 用户,付好权限,在local zone内,首先通过环境变量VCS_HOST 指向global zone,然后执行 halogin username password, 进行登录操作,如果成功,会在local zone的跟下生成 .vcspwd 文件。

3. 一定要先建好local zone,挂接好 /opt 文件系统,然后在global zone内进行VCS/VXVM 安装,这样 veritas的相应package就都自动安装到了non-global zone 了。