How to create solaris disk slices corresponding to the Veritas volume manager subdisks.

For the users who deal with Solaris and Veritas VxVM, I believe this is important to know of and lots of people will miss out this steps. For miror the OS disk under VxVM control, we will first encapsulate the boot disk and this will preserve the Sun partition as it is then create the private & public region accordingly.
Consequently, we will initialize another disk using VxVM then use vxrootmir to mirror the root (/) partition. Then use vxassist mirror to mirror the rest of OS partition (var, usr, opt, etc).
Looks perfect? but it actually misses out one steps. Where?

When you use vxassist mirror, VxVM will only create the respective subdisk in public region and update the records in private region. Hence no Sun partition will actually be created (E.g. slice 5, 6, 7). This will prevent the Solaris to mount back the original OS partition when disaster happen and you can't boot up the OS with VxVM startup. Even you revert back the /etc/vfstab.prevm & old /etc/system, it still unbootable because the SUN partition slices are not exists. For the primary copy of OS disk, it doesn't have this problem because we run it using encapsulation.

vxmksdpart [-f] [-g diskgroup] subdisk sliceno [tags flags]

According to the fmthard manual, the tags and flas are as below:

tag       description

0x00 UNASSIGNED
0x01 BOOT
0x02 ROOT
0x03 SWAP
0x04 USR
0x05 BACKUP
0x06 STAND
0x07 VAR
0x08 HOME

flag      description
0x00 MOUNTABLE
0x01 UNMOUNTABLE
0x10 READ-ONLY

Assume we have below config, root partition at s0, swap at s1 and var at s4. No need to run for root partition because vxrootmir will create the slice 0.
dg rootdg default default 0 1036078650.1025.pegasus
dm rootdisk c0t0d0s2 sliced 6463 17683680 -
dm rootmirror c0t1d0s2 sliced 6463 17683680 -

v rootvol - ENABLED ACTIVE 13423200 ROUND - root
pl rootvol-01 rootvol ENABLED ACTIVE 13423200 CONCAT - RW
sd rootdisk-01 rootvol-01 rootdisk 0 13423200 0 c0t0d0 ENA
pl rootvol-02 rootvol ENABLED ACTIVE 13423200 CONCAT - RW
sd rootmirror-01 rootvol-02 rootmirror 0 13423200 0 c0t1d0 ENA

v swapvol - ENABLED ACTIVE 2100000 ROUND - swap
pl swapvol-01 swapvol ENABLED ACTIVE 2100000 CONCAT - RW
sd rootdisk-02 swapvol-01 rootdisk 13423200 2100000 0 c0t0d0 ENA
pl swapvol-02 swapvol ENABLED ACTIVE 2100000 CONCAT - RW
sd rootmirror-02 swapvol-02 rootmirror 13423200 2100000 0 c0t1d0 ENA

v var - ENABLED ACTIVE 2100000 ROUND - fsgen
pl var-01 var ENABLED ACTIVE 2100000 CONCAT - RW
sd rootdisk-03 var-01 rootdisk 15523200 2100000 0 c0t0d0 ENA
pl var-02 var ENABLED ACTIVE 2100000 CONCAT - RW
sd rootmirror-03 var-02 rootmirror 15523200 2100000 0 c0t1d0 ENA

First create the swap on the secondary disk (e.g. c0t1d0),
# /usr/lib/vxvm/bin/vxmksdpart rootmirror-02 1 0x03 0x01
 
Then create the var on the secondary disk,
# /usr/lib/vxvm/bin/vxmksdpart rootmirror-03 4 0x07 0x00
 
At this point of time, you have the slices created. You may also want to update the changes on /etc/vfstab and /etc/vfstab.prevm.
 
# /usr/lib/vxvm/bin/vxprtvtoc -f /tmp/v1  /dev/rdsk/c0t1d0s2
# cat /tmp/v1 > /etc/vtoc

塔洛牌 - 十一、公正牌 (Justice)



正牌
這是愚人見的第十張牌了,在看見了各種人和事後,公正和公義是很重要的一環。無論你領悟了多少人生真理和多成功,但是你沒有了對社會的不平發出公義的聲音,你還是不完整的。接下來的十張牌都是比較玄和超自然的(Metaphysical)圖形。這張牌給人的感覺就像是法庭,冷酷卻公正無私地給與判決。有時候判決不會令所有人開心但卻是公平的,這不一定是張好牌卻絕對是有智慧的牌。理性的右手舉起雙刃劍代表不帶偏私地切下去、不拖泥帶水,不管決定有多困難和阻礙,也要達到公正。感性的左手拿天平代表這裁決背後的思考和邏輯,要想天平一樣平均分配。在她的前面沒有東西可以被隱瞞、真相會被發掘,要為所作的事承擔後果。跟女祭師教皇一樣,她也是坐在兩根柱子中間,一塊布把背後的世界遮住了。能不能開啓而通往背後的世界就要看你的造化了。





反牌
她失去了劍和天平,再也無法做公正的判決。整個的司法制度崩潰了。

塔洛牌 -- 十、幸運之輪 (Wheel of Fortune)























正牌
還記得多年前的紅牌節目The wheel of Fortune?同樣的這就像是從天而降的幸運,當幸運之輪轉動時,你永遠不會知道什麽會掉下來,幾時會掉下來。每個人的一生總會有些時刻非常幸運的得到意外的好運。我想這就是有趣的地方,好好把握和享受這一刻吧,因爲你不知道它幾時會走開。
幸運之輪上外圈有T.O.R.A的字眼和希伯來文的Y.H.V.H(Yod Heh Vav Heh) - 神之名。中間有四個符號代表了水銀、鹽、水、硫磺(四种古元素)。内圈是空白和無法得知的。如果你去過印尼的婆羅浮屠,你就會知道最後那一個佛像是沒有形象的,因爲這是人類無法表現出來的。所以應該是同理。
輪上的人面獅身(sphinx)代表守護。
(snake - Typhon)代表邪惡和墜落物質世界的誘惑。
狼頭人(Anubis - Jackal-headed god,Hermes)代表智慧的提升。
左上角的飛人代表水瓶座
左下角的牛代表金牛座
右上角的飛鷹代表天蠍座
右下角的飛獅代表獅子座
他們都在讀著TORA的書。
幸運之輪是圓的,無上無下。人生也是、好的時候可以變不好、不好又可以變好,就是在一種循環中。掌握變的機會、新生的人生,別氣餒、別驕傲。



反牌
幸運之輪無上下之分,但卻有好運和坏運的差別。這是禍從天降的預示。

回居鑾的小小記事

這次3月27日返居鑾本是爲了爸爸的生日。才發現了原來居鑾自過年除夕的停水停電,到現在的每過兩天制水一天,情況根本沒有好轉。在吉隆坡的天天下雨,居鑾竟是滴水難求。埃爾尼洛的現象在此算是深刻體會到了。在大自然回報人類的惡性,跟本沒有人能提出什麽有效的方法解決問題。清明時節雨紛紛到這裡變成了笑話。
另一個消息是對面那個三嵗的調皮小男孩,竟然被診斷出患了血癌。過年時還活潑亂跳的,怎麽現在就遭逢不幸?從媽的口中才得知原來他有一個哥哥也是六嵗診斷出同樣的病而去世的。這也有遺傳嗎?

夢 @ 25/3 Dream@25/3

發了一個這樣的夢,夢裏我那有凹洞和刮痕的車 (實際上,前兩個禮拜自己不小心撞到一根柱子而留下一道深深的刮痕)。好像當時是跟燕薇一起(不記得爲了什麽),我就躦到車底用手輕輕推推摸摸,竟然就把車修好了。還一次過把其他刮痕修好了。真開心!

dream my car with dented and scratch (the fact is I hit my car last 2 weeks and left a deep scratch on it). so I was together with yen wey (I can't remember why), I climb under my car and use my hand to repair it. so I just push it then the scratch disappear. Damn happy!!

緣起。。。it begins....

這是我第三個部落格,前兩個都是有點專業性質的。一個是電腦科技、一個是命理的。所以在想是不是該寫些隨性的東西,輕鬆一點。。。分享生活的點滴和經驗。比如旅行、食物、小故事等等瑣碎的事。
希望小小的分享可以有機會幫到別人,也就足夠了。哈哈。

This is my 3rd blog. The previous two blogs are bit proffesional, IT & Tarot. Therefore I am thinking "should I write a blog to just simply share experience?", making the life relax... sharing the experience and story encouter such as travel, food, small little things...
Hope there is one day my sharing can help someone... then it is enough. haha.

How to salvage your CVM cluster node if one node is crash?

Background: This is the real experience that the node is crashed and unbootable after the kernel patch activity. Unfortunately, no backup is performed and no mirror is break before the activity. This cluster is running Veritas VCS and CVM for NFS file sharing purpose.

Solution overview : Clone the OS disk from working node and modified the configuration to revert back the host information.

Detailed solution:
1. Use ufsdump to perform clone from the working node to a new harddisk. Also touch the install-db to prevent the VxVM startup, modify the /newdisk/etc/system & /newdisk/etc/vfstab, remove the root-done file.
2. Unplug all the network & FC connection on the crashed node.
3. Boot up the crashed node with the new harddisk. However it is exactly like the working node therefore hostname & IP, etc must be changed.
Some files must change to revert back the corrent host information.
/etc/hostname.[interface]
/etc/nodename
/etc/hosts
/etc/llttab
/etc/llthosts
/etc/gabtab
Other files if neccessary.

4. Start up VxVM manually.
    # vxconfigd -m disable
    # vxdctl hostid [crashnode]
    # vxdctl enable
    # rm /etc/vx/reconfig.d/state.d/install-db
5. Disable whatever rc2.d and rc3.d script (SFHA) to prevent the applications you don't want them to be started up on next reboot. Then reboot the crashed node.
6. Connect back the FC cable.
    # format (you should see the SAN storage)
    # vxdctl enable
    # vxdisk list (you should see the SAN storage)
7. Freeze the crashed node (running commands on working node)

    # haconf -makerw
    # hasys -freeze -persistent [crashnode]
    # haconf -dump -makero

8. Connect the network cable (include heartbeat) and perform ping test.

9. copy the /etc/VRTSvcs/conf/config/main.cf from working node to crash node.

10. Bring up the llt & gab.
     # /etc/rc2.d/S70llt start
     # /etc/rc2.d/S92gab start
     # lltstat -vvn
     # gabconfig -a (should see port a and membership should join correctly)
11. Unfreeze the cluster
     # haconf -makerw

     # hasys -unfreeze -persistent [crashnode]
     # haconf -dump -makero
12. Bring up the HA
     # hastart (perform on crash node, the crash node should back to running)
13. Bring up the CVM
     # hagrp -online cvm -sys [crashnode]
     the CVM group should become online.
     # vxdctl -c mode (the crash node should be slave)
14. Bring the rest of resource groups.

塔洛牌 - 九、隱士(The Hermit)























正牌
隱士站在雪地的高峰(遠離人群),提著真理的燈,指引人的方向(或許隱士更在意自己未來的方向)。愚人經過重重考驗和難關,回到他最初的原點,站在另一個高點看著以前的種種。他已經完成了生命中的一個輪回。同時你也可感覺到這牌好像隱藏著深深的孤寂(或許孤單才能讓人深刻的審視自己),在指引他人的同時,其實愚人也在思考著未來的路,他將會踏上另一個世界的征途。
真理的燈-内裏有六角星,也稱大衛之星。代表神的愛所以也是神的光。它是由正三角形和反三角形拼成的,表示男和女、平衡的力量。
左手握杖-左手表示潛意識的、杖是能力和旅行。所以隱士有能力控制意識來走他的路。























反牌
隱士丟失了他的燈,陷入了黑暗中。再也找不到他的道路。
Related Posts with Thumbnails

Saving The Seahorse Means Saving The Sea