2011年1月24日 星期一

XenServer mount Gluster問題

最近在玩Gluster,而在Xen的環境上,想用Gluster環境當底層storage。

而因為Xen是使用XenServer,只支援幾項連接方式(NFS、iSCSI..等),故在XenServer上大概就只能用NFS方式去使用....

但在架設好Gluster環境後,一般的Server去mount都沒有問題,但用XenServer的sr-create就是怎樣不成功,如下圖,故將解決辦法記錄如下,以免忘記.





1. port問題
---------------
XenServer無論CLI或是Console介面的sr-create NFS Scan方式,似乎是走2049 port,與Gluster所聽的port不太一樣。
網路上有人以iptable的方式用forwarding去轉port,也有人用改Gluster port的方式解決,我採用後者,相關參考來源
首先修改server上的nfs-server.vol檔,加上option nfs.port 2049


再重起Gluster NFS Daemon,重起方式我是使用kill 原本的nfs pid,再依原本process的指令內容重新issue


這樣port的問題就解決了,不過要注意,此種方式只是暫時,當server重起或service重起,是會套用回原本的default值的..

2. Gluster 版本問題
--------------------------------
在上述port問題解決後,XenServer雖然可以成功下達sr-create,但create過後發現狀態會是Broken,每個實體XenServer是無法連線到Gluster,這個問題似乎是所謂的subdirectory mount問題,XenServer在NFS mount到Storage後,似乎是在底下以UUID建了一個資料夾,再將這個子資料夾share mount給各實體機Server,故Gluster在3.1.2以前的版本,似乎是不支援subdirectory mount,故解決方式就是升版到3.1.2 = =


在上述兩個問題解決後,我的Gluster環境就正常可以給XenServer使用了

....繼續閱讀

2010年7月7日 星期三

利用ethtool對網卡限速

因架設Lustre環境,想確認分散式架構對performance是否真的有助益,但沒有10G或InfiniBand等架構,效能都卡在網路頻寬,故想到用降低網路速率來測分散式是否真有助益...


網路上查了一下,可以使用ethtool工具進行..
---------------------
#ethtool
Settings for eth0:
Supported ports: [ TP ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised auto-negotiation: Yes
Speed: 1000Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 1
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: umbg
Wake-on: g
Current message level: 0x00000003 (3)
Link detected: yes
----------------------

目前的網路速度為1000Mb/s。

於是下達
ifdown eth0;ethtool -s eth0 speed 10;ifup eth0

結果失敗,速度仍為1000。
於是修改網卡配置文件
#vi /etc/sysconfig/network-scripts/ifcfg-eth0
添加一行
ETHTOOL_OPTS="speed 10 duplex full autoneg off"

就搞定.
--------------------
Settings for eth0:
Supported ports: [ TP ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supports auto-negotiation: Yes
Advertised link modes: Not reported
Advertised auto-negotiation: No
Speed: 10Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 1
Transceiver: internal
Auto-negotiation: off
Supports Wake-on: umbg
Wake-on: g
Current message level: 0x00000003 (3)
Link detected: yes
--------------------

參考至Lyychee's Blog


....繼續閱讀

2010年2月16日 星期二

今天嘗鮮灌了win7+ubuntu 9.10來玩,ubuntu在首次開機並設定透過wireless連線pppoe後,重新開機後,GNOME的NetworkManager發現就不work了, 點擊NM, 是show "裝置無法管理",
google了一下...參閱自MacBlog
---------------------------------------------------------------------
因為 Debian and Ubuntu 有改過 NetworkManager 的程式碼,所以…
因此,傳統的 ifconfig or NetworkManager 只能二選一
若要用 ifconfig 來設定網路,那在 /etc/network/interfaces 裡就會有:

auto eth0
iface eth0 inet dhcp
auto eth1
iface eth1 inet dhcp
wireless-essid myap

若這樣,NetworkManager 就不會去管 eth0 eth1 這兩張網卡了

因此,若你想要讓 eth1 這張無線網卡交給 NetworkManager 來管理
就要把 eth1 的部份註解掉

#auto eth1
#iface eth1 inet dhcp
#wireless-essid myap

Debian and Ubuntu modified NetworkManager so that it would not manage any devices listed in /etc/network/interfaces. If you open this file and comment out the lines for the interfaces you want to manage and reboot NetworkManager will see them. **Do not comment out l0**

Devices which are automatically configured on boot will not be available in NetworkManager. To allow network manager to use all of your devices remove instances of auto in /etc/network/interfaces. (apart from the “auto lo” line, which is needed for the loopback interface)

....繼續閱讀

2009年7月24日 星期五

ORA-01031: insufficient privileges

Arcsight安裝完arcsight db後,要安裝arcsight manager..
但出現

SQL> conn /
ERROR:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux Error: 2: No such file or directory


網路上找了一些解決方法,簡單的有為重起instance..
但我重起的時候發生

ORA-01031: insufficient privileges




後來發現arcsight db安裝oracle 預設的user/group是oracle/oracle..
但大概我在安裝arcsight db前就先把oracle環境用好(包含add oracle user),所以設到oracle user group為oinstall...

故後續更改了oracle user group就解決了~~

....繼續閱讀

2009年7月13日 星期一

OC4J Configuration issue.

前些日重灌oracle環境,下達emctl status dbconsole看oem狀態~
出現

[oracle@localhost bin]$ ./emctl start dbconsole
TZ set to ROC
OC4J Configuration issue. /home/oracle/product/10.2.0/db_1/oc4j/j2ee/OC4J_DBConsole_localhost.localdomain_ORCL not found.




結果原因為$ORACLE_SID變數未設定,而且預設的orcl db為小寫的
,設成大寫的會有問題,記錄一下。

....繼續閱讀

2009年7月6日 星期一

adump、bdump.....etc

*.audit_file_dest='/export/home/oracle/admin/ora10g/adump'
*.background_dump_dest='/export/home/oracle/admin/ora10g/bdump'
*.core_dump_dest='/export/home/oracle/admin/ora10g/cdump'
*.user_dump_dest='/export/home/oracle/admin/ora10g/udump' ....繼續閱讀

2009年6月30日 星期二

Linux Oracle 10gR2 OEM 按鈕亂碼

參考自椰子殼
以CentOS為平台安裝Oracle Linux..
安裝完發現OEM的按鈕都是亂碼...
搜尋了一下google,看到上述網頁的解決方案...
順便記錄一下...

先停止oem
emctl stop dbconsole
分別進入以下三個路徑

$ORACLE_HOME/jdk/jre/lib
$ORACLE_HOME/jre/1.4.2/lib
$ORACLE_HOME/javavm/lib/ojvmfonts

在每個目錄都透過以下指令覆蓋檔案
cp font.properties.zh_TW.Redhat font.properties
進入 OEM 的圖示路徑,清除之前的檔案

cd $ORACLE_HOME/oc4j/j2ee/oc4j_applications/applications/em/em/cabo/images/cache/zht
rm *.gif
rm *.imx

啟動 OEM
emctl start dbconsole

做完上述..還是失敗了...
後來發現是沒有該字形的關係~
font.properties.zh_TW.Redhat 的最後一行:
filename.-arphic_technology_co.-ar_pl_mingti2l_big5-medium-r-normal--*-%d-*-*-c-*-iso10646-1=/usr/share/fonts/zh_TW/TrueType/bsmi00lp.ttf

PS:在文章 http://tw.myblog.yahoo.com/bullock0425/article?mid=464&prev=467&next=462 有提到: bsmi00lp.ttf 字體可以在 http://cle.linux.org.tw/fonts/Arphic/bsmi00lp.ttf 下載。

下載完放置該指定目錄...再做一次上述rm *.gif等動作,重新啟動OEM即可了~~
....繼續閱讀