2016年7月6日 星期三

Oracle on Nutanix ABS (Acropolis Block Service)


     Nutanix already release 4.7 last week when .NEXT event.  There are some new features that AOS 4.7 announced. Today , I upgrade my Nutanix NX-1465G4 AOS to version 4.7. The most exciting function I want to test is ABS. 

      I worked for EMC for 7 years. I knew all about SAN, iSCSI, NAS storage. When I was in EMC solution center , I need to maintain all demo environment. I have two brocade SAN switches, two MCdata and one MDS SAN switches. What’s trouble me is the zoning configurations . I need to maintain hundreds of zoning configuration. I need to check WWPN by myself. If something wrong , my demo servers won’t see its’ LUNs. Some of the demo environments will be infected . 

     After iSCSI storage come out , thing’s got easier. I didn’t need to maintain zoning information again. But I still need to take care about multi-path.  I need redundant paths to prevent one of the NICs failed. If I have two NICs in my server and I also have a iSCSI storage with two controller with two front-end ports . One LUN I may get 4-8 paths. So I need some MPIO to help me to manage those paths.  In EMC , will use Powerpath to manage multi-path. 

     Everything seems good , we have multiple path solutions ? But sometimes customers will ask do not install any software (Powerpath, DMP ….) on my servers. Then just one way to resolve this issue , using Native MPIO. 

   This issue just view from the front-end side . In the backend , VNX or other storage . They have active/passive configuration for a LUN. So you need to rebalance the LUNs in the back-end . When I was in VMware , I went an customer site in China . They complained about performance is sucks in VMware. When I check their EMC storage , I found all of their LUNs just using SPA as active , and SPB is standby. 

    Those issues are traditional SAN/iSCSI problem. Until now, traditional storages design still like this. 
   When Nutanix come out the ABS (Acropolis Block Services), I’m wondering why my company go back to support iSCSI SAN solution? Everyday we talked the disadvantage about SAN , and we go support physical servers connect to Nutanix.  After I check Josh Odgers blog ( http://www.joshodgers.com/2016/06/15/whats-next-2016-acropolis-block-services-abs/ ) article about ABS.  We made all iSCSI connections easier and simple then before.  All the ABS internal working knowledge are there. If you have any interesting in ABC, please go Josh Odgers blog.

   My role in Nutanix is BCA (Business Critical Application) , my responsibility is make sure all BCA can run well in Nutanix platform .  The first come to my mind is “high availability” . Most of my customers when they migrate their BCA to Nutanix , the first question is HA. Do Nutanix ABS provide high availability protection ? When the node failed, do Nutanix ABC can failover its LUNs to another node ? The answer is yes . 

   So I did this testing and using Oracle database as my critical application.  
Here is my testing spec- 
   - Nutanix NX-1465G4 with 256 GB RAM each node (Total 4 Nodes)
   - Oracle Linux 6.7 with Oracle 12c Installed
   - Oracle database using ASM configuration 
   - Nutanix AOS 4.7 
   - Swingbench (generate Oracle database loading) 

Scenario 1- Simulated one node failed (failover)
   I was running Swingbench with 300 users connection to generate load. When swingbench TPS keep stable running, then I shutdown Node D. You can see following video , there is no any error generate from swingbench . All the connections are still working fine. There is a short CPU IO wait when failover just few seconds. Node D’s LUN failover to Node A.


Scenario 2 - Simulated fail node back to cluster (failback) 
 Using scenario 1, I power-on the Node D. Simulate the Node D is repaired and join cluster again. You will see ABS will automatic fail back LUN from Node A to Node D. The loading will rebalance between nodes.


Conclusion- 
    ABS make iSCSI simple, and support physical machines connect. It reduce the multi-path issue in traditional iSCSI storage and also automatically load balance between nodes. 
When I shutdown Node D, it’s LUN failover to Node A. This make node A more loads. So you can see the response time and CPU IO wait is changed . But after Node D join back , the performance running as before. That means we can scale-out when your BCA need more I/O or more quick response time. Not like traditional storage , when you have bottleneck in controllers , you need to replace all the storage. Nutanix ABS will be your best iSCSI storage for your critical application. Make simple is the key to success !!

 Albert Chen 2016/07/06  

2016年4月25日 星期一

How to use Nutanix Prism deploy Business Critical Application


How to use Nutanix Prism deploy Business Critical Application


          Recently , Nutanix had announced a new NOS release 4.6 . One of the function is customized script to deploy your virtual machine .
In the Windows guest environment is very easy to prepared . We can use sysprep to deploy Windows guest OS . In Linux guest OS , we using cloud-init package to deploy.
         You can reference Chris Rasmussen site .
http://digitalformula.net/articles/nutanix-vm-customisation-with-cloud-init/
          Most of the steps are same, but some of configuration must be noted.
I use Oracle database and Oracle linux as a example . Oracle version is 11.2.0.4 , Oracle Linux is version 6.7.  Nutanix Acropolis Prism is 4.6.0.2 and we use Acropolis Hypervisor (AHV).


Step 1: Prepare your template image -


      First , we need to create a OS template that for deployment in your environment .  You can install a clean Linux OS environment or just clone from virtual machine. due to Linux OS always assign a new virtual NIC to new virtual machine. So you need to delete the /etc/udev/rules.d/70-persistent-net.rules .  Otherwise , you will have eth1,eth2 ,eth3 ... everytime you clone you get increase number . If you removed this file, after you clone virtual machine  . Linux OS will not increase the ethx number , will keep using eth0 .
     Secondary , you need to install the cloud-init package. Every Linux installation methods maybe not same . Some will use apt , some will use yum . Here is a example that install cloud-init package in Oracle Linux or RedHat, Centos .

  example :

wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
rpm -Uvh epel-release-6-8.noarch.rpm

yum install cloud-init




After installation , just leave everything default . Do not need to configure any setting .Because Nutanix Prism will help everything we need . Simplified cloud-init package setting .
The you need to put your Oracle installation binary in the OS , and also prepare auto-install script .  I create a simple one, and you can reference this. ( Not only Oracle have automatic installation , but also all Business Critical Application have it's owned automatic/silence installation method , you can script them easily)


From my example  - The script I created is called install_demo.sh. After steps , you can shutdown the virtual machine , and start put it into image service .

Step 2 : Create Image for deployment 


Nutanix Acropolis 4.6 provide upload image , you can upload image from the Prism GUI. 


            But if your virtual machine is on the AHV, you don't need to export and import again . Just using single commend to put your image into image service . We will use acli commend to put image into repository. command like this :
image.create autodeploy_oracle clone_from_vmdisk=vm:Goldmaster:scsi.0
** autodeploy_oracle is template name 
** Goldmaster:scsi.0 mean Goldmaster VM it's first scsi disk .







This command is take 1 second to finish . Go back to Prism check the image is successful installed.

Step 3: Deployment your Business Critical Application ( Oracle for ex , others same method)

     First you need to create a new VM- In the Prism , select the VM tab, and start to create a VM.


Give the CPU and Memory values - 


Add disk - Choose Operation , select "CLONE FROM IMAGE SERVICE" ,and select the image "autodeploy_oracle" the template we created.


Add the new NIC -


The key is "Custom Script" , Here are three options we can choose.  "ADFS" or "upload a file" or "Type or paste script". This time we use "Type or paste script". Because we need to change hostname and run the customized scripts. 


Type those text in the text box .

#cloud-config
disable_root: 0
ssh_pwauth:   1
hostname: Oracle112
runcmd:
- [/root/install_demo.sh,once-per-instance] 




Click Save , and wait for 100% create process . Must wait for 100 % ,otherwise you will get a failed ....








Step 4: Power on your VM - 


Just select power-on your Virtual Machine, also open your console . you will see the cloud-init is running. That means will change my hostname , and also automatic install Oracle binary and create database for me . 


I also put all process avi in this blog , you can reference . 




Conclusion :

   
    From my 19 years IT experience , when I talked to customers, they don't want a complicated solutions . They just want some simple and handle their daily job. 
   Some software they create too many object like blueprint , endpoint .. Really complicated solution. Some vender also mentioned they can deploy 10000 VMs in 10 minutes.  I think , in real world , we don't need this kind of software , because we didn't need deploy 10000 VMs everyday or need very complicated processes to deploy a VM .  Nutanix Prism already can help on your daily job to deploy those application for you. Make your life easier. 


















2015年6月21日 星期日

How to install Nutanix CE into ESXi 6.0

How to install Nutanix CE into ESXi 6.0

             Nutanix announce a CE edition and could download from The newest version is ce-2015.06.08-beta.img.gz. If you want install it into ESXi 6.0 , please use this version. So what we need to prepare ? Please reference here Joep wrote for install on the Fusion. Website is here

http://www.virtuallifestyle.nl/2015/06/nextconf-running-nutanix-community-edition-nested-on-fusion/

             But I found some tips we need to know when we installed into ESXi. My idea is put three nodes into one ESXi server. My X86 Server with 32 GB RAM, 480 SSD and 2 TB Seagate HDD. Let's start installing Nutanix CE into ESXi 6.0

 1. ESXi 6.0 Installed - I think I will skip how to install the ESXi 6.0 and vCenter 6.0, you can find many documents talking about how to install VMware software .


 2. Create VM - From the beginning , I thought in a nest environment . So I choose the VM type as ESXi6 . But I got kernel panic when I tried to install Nutanix CE. Then suddenly I think Nutanix original base is linux base, so I choose Centos4/5/6 as my VM OS type . Then the kernel panic issue gone. At least 4 vCPU and 16 GB RAM.





Please also click on "Hardware Virtualization"






 3. Create All VMDK for nest
Nutanix CE used - We need create at least 200 GB SSD, and 500 GB HDD for this VM. If you have enough space to use. You can use thick/eager zeroed thick vmdk format. If you don't have such space , you just use thin format . We also need to attach the Nutanix installation gz file. Untar ce-2015.06.08-beta.img.gz , and you will get a ce-2015.06.08-beta.img file around 7.5 GB rename is as "ce-flat.vmdk. Please also download the ce.vmdk from Joep site. Please those two files in same folder.

 4. Start install - Boot up this VM , and you will see the login prompt . "Do not type install first" , just login using root / nutanix/4u jogin as root permission .  You need to modified some files. If you do not edit  those files , you always get some errors. we need to change some installation check files. Those files are .

 4a. go to /home/install/phx_iso/phoenix find one file called minimum_reqs.py , using vi open and edit it. Find the words like
-->
 checkVtd(dmesg)
 checkSSD() 
 checkDiskModels(param_list)
 checkInstallationDiskSize(param_list)

Change into
-->
 checkVtd(dmesg)
 #checkSSD() 
 checkDiskModels(param_list)
 checkInstallationDiskSize(param_list)

 4b. vi the second file "sysUtil.py" , change the value of these two parameter .

 SSD_rdIOPS_thresh = 50

 SSD_wrIOPS_thresh = 50

logout , and you will get login prompt again . type "install" . The installation took you about 5-10 minutes to complete .

5. Change your network setting in ESXi - Please change your vswitch setting , go security and make Promiscuous mode = Accept . Otherwise your CVM can't ping each other .





6. Create your cluster - I suggest using commend line to create cluster will be easier for you . And all the step you need to do.  I found I need to setup all the steps and make Nutanix CE normal .


nutanix@cvm$ cluster -s cvm_ip_addrs1, cvm_ip_addrs2, cvm_ipaddrs3  create

nutanix@cvm$ cluster start

nutanix@cvm$ ncli cluster edit-params new-name=cluster_name

nutanix@cvm$ ncli cluster add-to-name-servers servers="dns_server"

nutanix@cvm$ ncli cluster get-name-servers Configure the NTP servers.

nutanix@cvm$ ncli cluster add-to-ntp-servers servers="ntp_server"

nutanix@cvm$ ncli cluster set-external-ip-address


    After that you could see you have three nodes running in one ESXi Server . Just like this .

and each node almost take 7 GB RAM , and total need is 21 GB around.  See the picture , why I more than 24 GB, because I have one vCenter take 8 GB..



 Any comments please let me know ..

   Albert


















2011年2月27日 星期日

Galaxy tab 刷機

我的Galaxy Tab是中華電11月15日第一批出的, 也是我的第一個Android平台. 平常在使用上都很好, 遊戲如憤怒小鳥, 水果忍者, , 應用如Titanium Backup, KK Box, 加上市場, 黑市場, N多市場等眾多資源, 因此Tab反而成了全家人共同使用的手機, 也增加了家裡的樂趣.

也因為Tab, 我才從台灣, 對岸, 或國外的一些網站開始了解Android, 什麼是root, Firmware, 刷機, Market等名詞. Tab使用熟一點後, 發現兩個小不滿, 一個是Samsung Apps一直是空白的, 沒有apps可以下載, 看到有人可以下在NFS Shift,及NOVA, 是蠻羨慕的, 可是也沒有辦法. 另一個是, 檢查Firmware資訊, 電話打 *#1234#, 顯示版本怪怪的, 如下圖:

PDA:
PHONE: P1000ZUJJ2
CSC:

Tab首頁, 設定, 關於手機, 如下圖, 基頻是ZUJJ2


雖然使用上Tab功能都正常, 但看其他人的PDA及CSC都會有顯示相關的版本,而且Tab也有新的台版ROM釋出, 因此產生刷機的想法. 於是看了Mobile01平海大的貼文, samfirmware及國外XDA的許多刷機討論, 瞭解了Tab Firmware的檔案及刷機流程. 我只是初學者, 以下把我瞭解的一些整理出來, 分享給大家.

1. Tab firmware的版本: (可參考i9000類似)
- 主要依地區有分歐美版, 亞洲版, 阿拉伯版等, 再依國家或是電信公司, 及更新版本, 分別以不同的代號代表. 其他的不說, 以台灣版而言, 目前知道有三種代號.
- ZU: 中華電信客制版, 例如P1000ZUJJ2, P1000ZUJK1,.. P1000是Tab的產品代號, JJ2, JK1則是版本編號. 而JK1比JJ2新.
- ZF: 遠傳電信客制版, 例如P1000ZFJK1
- ZT: 台灣open版(不含中華或遠傳的一些客制apps), 例如P1000ZTJK1, P1000ZTJL1, 而JL1比JK1新
- 其他代號如ZH是香港版, DX是東南亞版, XX, XW是歐美版, JP, JV是阿拉伯版

2. Tab firmware檔案內容: (可參考i9000類似)
- 完整版的firmware, 會有PDA, PHONE, CSC三類的檔案, 附檔名以.md5或.tar的壓縮檔, 不完整的Firmware, 就可能只有PDA的檔案. Tab電話打 *#1234# 就會顯示每類的版本.
- PDA: 包含Android OS及附加的系統應用程式, 檔案size會很大, 一般會超過200MB以上
- PHONE: 檔名會內含MODEM字樣, 包含規範無線通訊晶片如何運作的檔案, 無線通訊如Wifi, 藍芽Bluetooth, 3G, GSM, CDMA等等, 無線通訊是跟每個國家或地區使用不同的無線規範相關. 檔案size一般在12MB左右.
- CSC: 是 Carrier Specific Customization簡寫, 檔名會內含CSC字樣, 包含如APN設定, 及跟不同國家或電信公司各自的應用設定. 檔案size一般在12MB-81MB左右.
- 完整firmware跟不完整firmware都可以刷機, 只是步驟會有不同.

以上說明漏漏長, 以下進入刷機實作:

刷機前準備手續:
1. 下載平海大的firmware壓縮檔, 或從對岸的網站找- P1000ZUJK1 及 P1000ZTJL1, 是7z壓縮檔, 要解壓縮.

2. 下載刷機所需軟體(Odin3 v1.7), 及PIT檔(P1_add_hidden.pit). 這兩個檔案可以在網路上找到, 或是到samfirmware.com下載. 注意PIT檔一定要是P1_add_hidden.pit, 不能拿其他名字的pit檔代替. PIT檔的作用, 相當於是Windows系統對硬碟進行分區partition. 用錯了就會刷機失敗.

3. Tab要先root, 可用z4root來做. z4root目前在market上已經沒有, 檔案如附件. 要root的目的是要安裝Titanium Backup做程式及資料備份.
附加壓縮檔: 201012/mobile01-99ea44c8fd9d08bd63bd19c9c12998d7.zip

4. 從Market下載Titanium Backup免費版安裝, 在偏好設定的備份設定, 將”備份資料夾名稱”更改為外部SD卡(原資料夾前要加上/external_sd/), 備份時選”所有應用程式與系統資料”. 如果不更改, 預設會備份到內部SD卡上. 改好後先批次備份一次, 然後看看外部SD卡有沒有TitaniumBackup資料夾內有沒有檔案, 就知道有沒有成功. 等刷機完成後, 再用Titanium Backup將應用程式及資料還原安裝回去Tab. 請看下圖 External Storage及備份目錄的地方.


5. 我的打算是將ZUJJ2中華電信版升級刷為ZUJK1中華電信版, 再刷為ZTJL1台灣open版.

補充: 請看我最底下12/23補充2, 刷機前先備份 efs 資料夾, 以免發生刷機失敗 imei 碼不見的情形. 我刷機前是沒做, 還好刷完後imei還在.

刷機過程:
1. Tab先充好電, 首頁, 設定, SD卡和行動電話儲存空間, 卸載SD卡, 來將外部SD卡卸載, 關機後將外部SD卡拿出.

2. 開機做hard reset回復出廠設定(首頁, 設定, 隱私設定, 重設為原廠設定, 或是電話 *2767*3855#), 這個步驟沒做應該也行, 我是要先把檔案清乾淨.

3. 在PC上把刷機軟體Odin3 v1.7及P1000ZUJK1的檔案放在同一資料夾下, 一共有5個檔案: Odin3 v1.7.exe, P1_add_hidden.pit, P1000ZUJK1-REV03-ALL-CL712217.tar.md5, MODEM_P1000ZUJK1_REV_00_CL644164.tar.md5, 及GT-P1000-CSC-CWTJJ3.tar.md5

4. 依照平海大介紹的步驟(http://www.mobile01.com/topicdetail.php?f=568&t=1899849)
- 此時Tab先不連上PC, 在PC上開啟Odin3 刷機軟體, 在Re-partition, Auto Reboot, F. Reset Time打勾, 然後點PIT, 選P1_add_hidden.pit
- PDA選P1000ZUJK1-REV03-ALL-CL712217.tar.md5)
- PHONE選MODEM_P1000ZUJK1_REV_00_CL644164.tar.md5
- CSC選GT-P1000-CSC-CWTJJ3.tar.md5
- 在Tab上同時壓下”音量下鍵”+”開機鍵”,進入”Download mode”, 然後將Tab接上電腦USB
- 等到Odin3抓到COM port後(COM port #視電腦而不同), 按Start開始刷機, 過2-3分鐘後就刷好了.
- 刷機完成出現PASS後, Tab跟電腦斷開, 再做一次hard reset *2767*3855#, reset後輸入*#1234#來確認升級後的版本

5. 我刷好ZUJK1中華電信版後的圖如下:
- 電話 *#1234#, 查詢升級後的版本

- 關於手機的圖, 基頻是ZUJK1

- 首頁的圖, 中間右方有中華電Hami widgets

- 程式頁面, 最上方有四個Hami的widgets

- 點Samsung Apps出現有9個apps可以下載, 其中有NFS Shift, NOVA. 終於可以下載了


6. 接著繼續把ZUJK1刷成ZTJL1(試驗性質, 要把Hami widgets拿掉). 在PC上把刷機軟體Odin3 v1.7及P1000ZTJL1的檔案放在同一資料夾下, 一共有4個檔案: Odin3 v1.7.exe, GT-P1000-CSC-BRIJJ1.tar.md5, MODEM_P1000ZTJL1_REV_00_CL614387.tar.md5, P1000ZTJK1-REV03-ALL-CL712217.tar.md5. 此處沒有P1_add_hidden.pit, 因為在刷ZUJK1時, 已經做過了分區re-partition, 不需要再重做.

7. 刷ZTJL1步驟:
- 此時Tab先不連上PC, 在PC上開啟Odin3 刷機軟體, 因為沒有PIT檔, 所以Re-partition不要打勾, 在Auto Reboot, F. Reset Time打勾. 切記沒有pit檔時, 如果Re-partition打勾, 就會刷機失敗.
- PDA選P1000ZTJK1-REV03-ALL-CL712217.tar.md5
- PHONE選MODEM_P1000ZTJL1_REV_00_CL614387.tar.md5
- CSC選GT-P1000-CSC-BRIJJ1.tar.md5
- 在Tab同時壓下”音量下鍵”+”開機鍵”,進入”Download mode”, 然後將Tab接上電腦USB
- 等到Odin3抓到COM port後(COM port #視電腦而不同), 按Start開始刷機, 過2-3分鐘後就刷好了.
- 刷機完成出現PASS後, Tab跟電腦斷開, 再做一次hard reset *2767*3855#, reset後輸入*#1234#來確認升級後的版本

8. 刷好ZTJL1台灣open版後的圖如下:
- 電話 *#1234#, 查詢升級後的版本

- 關於手機的圖, 基頻是ZTJL1

- 首頁的圖, 沒有中華電Hami widget

- 程式頁面, 上方已經沒有Hami的widget

- 點Samsung Apps出現有9個apps可以下載, 跟刷ZUJK1一樣


9. 程式及資料回復 - 刷好新firmware後, 把外部SD卡插回Tab上, root Tab(使用z4root), 從market下載Titanium Backup免費版安裝, 把”備份資料夾名稱”改到外部SD卡的TitaniumBackup資料夾, 然後按“備份/還原”, 就會列出所有已經備份的程式, 找到你要還原的程式, 輕輕點擊就可以把程式及資料安裝還原回去.

以上是Tab初學者對刷機的研究及實作分享, 大家鼓勵鼓勵.
---------------------------------
12/22補充: 其實是可以直接刷到ZTJL1, 不用中間多刷ZUJK1的. 不過直接刷ZTJL1時, 要用刷ZUJK1的方式.

12/23補充1: 刷完後, 感覺使用上差別不大, 跑Quadrant Standard 是1012, 可能要OCLF後才會更快(arickwu大的分數2244), 重點是 Samsung Apps 終於可以下載遊戲 NFS Shift, 跟NOVA, 這可是免費的.

12/23補充2: 看 macleod 大回文提醒, 及參考 XDA 上 i9000 刷機 efs 備份 的貼文, 最好先備份Tab上 efs 資料夾到外部SD卡上, 以免發生刷機失敗 imei 碼不見的情形. 我自己刷機前是沒有做, 還好 imei 還在. 亡羊補牢, 趕快做備份, 步驟如下:
- 電話打 *#06#, 會顯示imei碼, 一共15碼.
- Tab要root, 到 market 下載 rootexplorer, 或是對岸漢化後叫 R.E.管理器安裝
- 在根目錄下就會看到 efs 資料夾, 按 efs 久一些, 會出現選項, 選copy, 然後下拉到 sdcard 資料夾下, external_sd 資料夾, 點 paste, 就會copy到外部SD卡上.

12/23補充3: 預備安裝OCLF, 讓Tab操作更順. 可到 此 blog , 參考安裝過程, 也還蠻簡單的.
- 在先安裝好Ext2 tools後, 要再按Available做第二步OCLF安裝, 要等幾分鐘, Tab會自動重啟.
- 我安裝後跑 Quadrant Standard, 效能分數由安裝前是1012, 提高到2083.
- 如果以後還要再重新刷機, 需要記得先把 OCLF 反安裝才能去刷機

2011年2月16日 星期三

Linux without rescan disk

As a system admin, I need to use additional hard drives for to provide more storage space or to separate system data from user data. This procedure, adding physical block devices to virtualized guests, describes how to add a hard drive on the host to a virtualized guest using VMWare software running Linux as guest.

It is possible to add or remove a SCSI device explicitly, or to re-scan an entire SCSI bus without rebooting a running Linux VM guest. This how to is tested under Vmware Server and Vmware Workstation v6.0 (but should work with older version too). All instructions are tested on RHEL, Fedora, CentOS and Ubuntu Linux guest / hosts operating systems.

Step # 1: Add a New Disk To Vm Guest

First, you need to add hard disk by visiting vmware hardware settings menu.
Click on VM > Settings

Fig.01: Vmware Virtual Machine Settings

Fig.01: Vmware Virtual Machine Settings

Alternatively you can press CTRL + D to bring settings dialog box.

Click on Add+ to add new hardware to guest:

Fig.02: VMWare adding a new hardware

Fig.02: VMWare adding a new hardware

Select hardware type Hard disk and click on Next

Fig.03 VMware Adding a new disk wizard

Fig.03 VMware Adding a new disk wizard

Select create a new virtual disk and click on Next

Fig.04: Vmware Wizard Disk

Fig.04: Vmware Wizard Disk

Set virtual disk type to SCSI and click on Next

Fig.05: Vmware Virtual Disk

Fig.05: Vmware Virtual Disk

Set maximum disk size as per your requirements and click on Next

Fig.06: Finalizing Disk Virtual Addition

Fig.06: Finalizing Disk Virtual Addition

Finally, set file location and click on Finish.

Step # 2: Rescan the SCSI Bus to Add a SCSI Device Without rebooting the VM

A rescan can be issued by typing the following command:
echo "- - -" > /sys/class/scsi_host/host#/scan
fdisk -l
tail -f /var/log/message

Sample outputs:

Linux Vmware Rescan New Scsi Disk Without Reboot

Fig.01:Linux Vmware Rescan New Scsi Disk Without Reboot


Replace host# with actual value such as host0. You can find scsi_host value using the following command:
# ls /sys/class/scsi_host

2010年12月1日 星期三

NTFS comparison table

NTFS vs FAT

Criteria

NTFS5

NTFS

exFAT

FAT32

FAT16

FAT12

Operating System

Windows 2000
Windows XP
Windows 2003 Server
Windows 2008
Windows Vista
Windows 7

Windows NT
Windows 2000
Windows XP
Windows 2003 Server
Windows 2008Windows Vista
Windows 7

Windows CE 6.0
Windows Vista SP1
Windows 7
WinXP+KB955704

DOS v7 and higher
Windows 98
Windows ME
Windows 2000
Windows XP
Windows 2003 Server
Windows Vista
Windows 7

DOS
All versions of
Microsoft Windows

DOS
All versions of
Microsoft Windows

Limitations

Max Volume Size

264 clusters minus 1 cluster

232 clusters minus 1 cluster

128PB

32GB for all OS.
2TB for some OS

2GB for all OS.
4GB for some OS

16MB

Max Files on Volume

4,294,967,295 (232-1)

4,294,967,295 (232-1)

Nearly Unlimited

4194304

65536


Max File Size

264 bytes (16 ExaBytes)
minus 1KB

244 bytes (16 TeraBytes)
minus 64KB

16EB

4GB minus 2 Bytes

2GB (Limit Only
by Volume Size)

16MB (Limit Only
by Volume Size)

Max Clusters Number

264 clusters minus 1 cluster

232 clusters minus 1 cluster

4294967295

4177918

65520

4080

Max File Name Length

Up to 255

Up to 255

Up to 255

Up to 255

Standard - 8.3
Extended - up to 255

Up to 254

File System Features

Unicode File Names

Unicode
Character Set

Unicode
Character Set

Unicode
Character Set

System
Character Set

System
Character Set

System
Character Set

System Records Mirror

MFT Mirror File

MFT Mirror File

No

Second Copy of FAT

Second Copy of FAT

Second Copy of FAT

Boot Sector Location

First and Last Sectors

First and Last Sectors

Sectors 0 to 11
Copy in 12 to 23

First Sector and
Copy in Sector #6

First Sector

First Sector

File Attributes

Standard and Custom

Standard and Custom

Standard Set

Standard Set

Standard Set

Standard Set

Alternate Streams

Yes

Yes

No

No

No

No

Compression

Yes

Yes

No

No

No

No

Encryption

Yes

No

No

No

No

No

Object Permissions

Yes

Yes

Yes

No

No

No

Disk Quotas

Yes

No

No

No

No

No

Sparse Files

Yes

No

No

No

No

No

Reparse Points

Yes

No

No

No

No

No

Volume Mount Points

Yes

No

No

No

No

No

Overall Performance

Built-In Security

Yes

Yes

Yes
minimal ACL only

No

No

No

Recoverability

Yes

Yes

Yes
if TFAT activated

No

No

No

Performance

Low on small volumes
High on Large

Low on small volumes
High on Large

High

High on small volumes
Low on large

Highest on small volumes
Low on large

High

Disk Space Economy

Max

Max

Max

Average

Minimal on large volumes

Max

Fault Tolerance

Max

Max

Yes
if TFAT activated

Minimal

Average

Average

2010年11月25日 星期四

Create HPUX boot CD/DVE

Create HP-UX 1 1i v3 bootable CD/DVD media for two-step media recovery
On a system with a CD/DVD writer and the same version of Ignite-UX as on your tape, execute
the following command (iso_directory is the target directory for the .iso media file and
the -r option specifies the release, such as B.11.23 or B.11.31):
# make_media_install -r B.11.31 -m iso_directory

Avamar Oracle Can not view on the Backup console

1. make sure the tnsnames.ora copy to /var/opt/oracle with hostname setting .
2. make sure the oratab locate in the /vat/opt/oracle
3. Add the environment parameters
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$ORACLE_HOME/lib: /opt/AVMRclnt/lib
4. run the /opt/AVMRclnt/bin/avoacle --browse

RMAN Archivelog crosscheck

$ rman target /
Recovery Manager: Release 9.2.0.4.0 - 64bit Production
Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.
connected to target database: AVATAR2 (DBID=2480694409)

當archive有刪除的時候要使用,RMAN 的備份才會可以備archive log,之後要設定incarnation numner , list incarnation ,set incarnation

RMAN> crosscheck archivelog all;

using target database controlfile instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=25 devtype=DISK
validation failed for archived log
archive log filename=/opt/oracle/oradata/avatar2/archive/1_2714.dbf recid=2702 stamp=545107659
validation failed for archived log
archive log filename=/opt/oracle/oradata/avatar2/archive/1_2715.dbf recid=2703 stamp=545108268
...........
validation failed for archived log
archive log filename=/opt/oracle/oradata/avatar2/archive/1_2985.dbf recid=2973 stamp=545399327
validation succeeded for archived log

Crosschecked 278 objects

2.使用delete expired archivelog all 命令删除所有過期日誌檔

RMAN> delete expired archivelog all;

released channel: ORA_DISK_1
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=12 devtype=DISK

List of Archived Log Copies
Key Thrd Seq S Low Time Name
------- ---- ------- - --------- ----
376 1 2714 X 23-NOV-04 =/opt/oracle/oradata/avatar2/archive/1_2714.dbf
.....


使用report obsolete命令報告過期備份

RMAN> report obsolete;

RMAN retention policy will be applied to the command
RMAN retention policy is set to redundancy 1
Report of obsolete backups and copies
Type Key Completion Time Filename/Handle
-------------------- ------ ------------------ --------------------
Backup Set 125 01-NOV-04
Backup Piece 125 01-NOV-04 /data1/oracle/orabak/full_1_541045804
Backup Set 131 04-NOV-04
Backup Piece 131 04-NOV-04 /data1/oracle/orabak/full_AVATAR2_20041104_131
....
Backup Set 173 06-DEC-04
Backup Piece 173 06-DEC-04 /data1/oracle/orabak/full_AVATAR2_20041206_173
Backup Set 179 11-DEC-04
Backup Piece 179 11-DEC-04 /data1/oracle/orabak/arch544588206.arc
.....
Backup Piece 189 17-DEC-04 /data1/oracle/orabak/arch545106606.arc
Backup Set 190 17-DEC-04
Backup Piece 190 17-DEC-04 /data1/oracle/orabak/arch545106665.arc
Backup Set 191 20-DEC-04
Backup Piece 191 20-DEC-04 /data1/oracle/orabak/arch_AVATAR2_20041220_194
Archive Log 2973 20-DEC-04 /opt/oracle/oradata/avatar2/archive/1_2985.dbf
Archive Log 2971 20-DEC-04 /opt/oracle/oradata/avatar2/archive/1_2984.dbf
.....
Archive Log 2705 17-DEC-04 /opt/oracle/oradata/avatar2/archive/1_2717.dbf
Archive Log 2704 17-DEC-04 /opt/oracle/oradata/avatar2/archive/1_2716.dbf
Archive Log 2703 17-DEC-04 /opt/oracle/oradata/avatar2/archive/1_2715.dbf
Archive Log 2702 17-DEC-04 /opt/oracle/oradata/avatar2/archive/1_2714.dbf

使用delete obsolete命令删除過期備份檔:

RMAN> delete obsolete;

RMAN retention policy will be applied to the command
RMAN retention policy is set to redundancy 1
using channel ORA_DISK_1
Deleting the following obsolete backups and copies:
Type Key Completion Time Filename/Handle
-------------------- ------ ------------------ --------------------
Backup Set 125 01-NOV-04
Backup Piece 125 01-NOV-04 /data1/oracle/orabak/full_1_541045804
....
Archive Log 2704 17-DEC-04 /opt/oracle/oradata/avatar2/archive/1_2716.dbf
Archive Log 2703 17-DEC-04 /opt/oracle/oradata/avatar2/archive/1_2715.dbf
Archive Log 2702 17-DEC-04 /opt/oracle/oradata/avatar2/archive/1_2714.dbf

Do you really want to delete the above objects (enter YES or NO)? yes
deleted backup piece
backup piece handle=/data1/oracle/orabak/full_AVATAR2_20041206_173 recid=173 stamp=544156241
.....
deleted archive log
archive log filename=/opt/oracle/oradata/avatar2/archive/1_2715.dbf recid=2703 stamp=545108268
deleted archive log
archive log filename=/opt/oracle/oradata/avatar2/archive/1_2714.dbf recid=2702 stamp=545107659
Deleted 286 objects


RMAN> crosscheck archivelog all;

released channel: ORA_DISK_1
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=19 devtype=DISK
specification does not match any archive log in the recovery catalog

2010年8月25日 星期三

Oracle 11gR2 new feature

1.5.1.1 Flashback Data Archive Support for DDLs

Oracle Database 11g Release 2 (11.2) users can now use most DDL commands on tables that are being tracked with Flashback Data Archive. This includes:

  • Add, Drop, Rename, Modify Column

  • Drop, Truncate Partition

  • Rename, Truncate Table

  • Add, Drop, Rename, Modify Constraint

For more complex DDL (for example, upgrades and split table), the Disassociate and Associate PL/SQL procedures can be used to temporarily disable Total Recall on specified tables. The Associate procedure enforces schema integrity after association; the base table and history table schemas must be the same.

This feature makes it much easier to use the Total Recall option with complex applications that require the ability to modify the schema.

1.5.1.2 Instance Caging

Instance Caging allows the DBA to limit the CPU usage of an Oracle instance by setting the CPU_COUNT initialization parameter and enabling CPU resource management.

With Instance Caging, users can partition CPU resources among multiple instances running on a server to ensure predictable performance.

Oracle Enterprise Manager hostname change re-create

/bin/emca -deconfig dbcontrol db -repos drop

/bin/emca -config dbcontrol db -repos create

emctl start dbconsole

2010年8月16日 星期一

Oracle Explain plan

Creating a PLAN_TABLE

CONNECT HR/your_password
@$ORACLE_HOME/rdbms/admin/utlxplan.sql
Table created.

EXPLAIN PLAN FOR
SELECT last_name FROM employees;

  • UTLXPLS.SQL

    This script displays the plan table output for serial processing. Example 13-2, "EXPLAIN PLAN Output" is an example of the plan table output when using the UTLXPLS.SQL script.

  • UTLXPLP.SQL

    This script displays the plan table output including parallel execution columns.

  • DBMS_XPLAN.DISPLAY procedure

    This procedure accepts options for displaying the plan table output. You can specify:

    • A plan table name if you are using a table different than PLAN_TABLE

    • A statement Id if you have set a statement Id with the EXPLAIN PLAN

    • A format option that determines the level of detail: BASIC, SERIAL, and TYPICAL, ALL,

    Some examples of the use of DBMS_XPLAN to display PLAN_TABLE output are:

    SELECT PLAN_TABLE_OUTPUT FROM TABLE(DBMS_XPLAN.DISPLAY());

    SELECT PLAN_TABLE_OUTPUT
    FROM TABLE(DBMS_XPLAN.DISPLAY('MY_PLAN_TABLE', 'st1','TYPICAL'));


2010年8月15日 星期日

2010年8月13日 星期五

2010年8月12日 星期四

REDHAT XDMCP enable

XDMCP Connections to Red Hat Linux 7.0 or Higher
Technical Note 1680
Last Reviewed 08-May-2009
Applies To
Reflection X Advantage
Reflection X version 14.x only
Red Hat Linux version 7.0 or higher
Red Hat Enterprise Linux version 4.0 or higher
Summary

Red Hat Linux versions 7.0 or higher include default security features that prevent Reflection X from establishing an XDMCP connection. This technical note details the steps required to configure Red Hat Linux to allow Reflection X XDMCP connections using the GNOME Display Manager (gdm), KDE Display Manager (kdm), or the XDM Display Manager (xdm). It also provides fixes or workarounds for font-related display manager and terminal client initialization difficulties.

For information about configuring Red Hat version 6.2 for remote XDMCP, see Technical Note 1523.

About the X Display Manager

The X Display Manager provides a graphical replacement for the host's command line login prompt when users connect over the X Display Manager Control Protocol (XDMCP). Red Hat provides support for the Gnome Display Manager (gdm), the KDE Display Manager (kdm), and the X Display Manager (xdm). Each of these display managers can be configured to automatically start the GNOME or KDE X Windows System graphical desktop environment.

Modifying Red Hat Linux for XDMCP Connections

The following sections provide steps for configuring XDMCP connections using gdm, kdm, or xdm:

  • Using GNOME's GDM X Display Manager
  • Using KDE's KDM X Display Manager
  • Using the XDM X Display Manager

Instructions are also provided for defining or changing which desktop environment automatically starts after login: GNOME or KDE.

Note the following:

  • The steps required vary depending on the version of Red Hat. Follow the instructions based on the version of Red Hat you are running. If a step is not applicable to your version, skip to the next step.
  • You must be logged into your Red Hat Linux host as root to make these edits.

You can log on at either the host console or from your PC using the linux.rxc template provided with Reflection X, but you must be logged in as root to make the changes presented in this technical note. (Most Linux hosts do not allow you to log on as root remotely, therefore, if you use the linux.rxc template, first log on using a normal user account, and then use the su command at the xterm command prompt to log in as root.)

  • GNOME or KDE must be installed on your system prior to following these configuration steps, and these directions are based on the original versions of GNOME and KDE that ship with each revision of Red Hat Linux 7.0 - 9.0.

Using GNOME's GDM X Display Manager

To configure Red Hat Linux to use gdm and automatically start the GNOME desktop environment, follow the steps below.

  1. Edit the /etc/sysconfig/desktop file to define GNOME as the X desktop environment that loads on connection.
    1. Open the /etc/sysconfig/desktop file.
    2. Locate the DESKTOP= entry. Note: The entry may need to be created and it is case sensitive.

Change this setting to: DESKTOP="GNOME"

    1. Save the file.
  1. Edit the gdm.conf file.
    1. Open the /etc/X11/gdm/gdm.conf file.

Note: In Red Hat Enterprise Linux version 5, the path is /etc/gdm/custom.conf.

    1. Under the "[xdmcp]" heading, change the default "enable" entry:

In Red Hat version 7.0 - 7.1: change Enable=0 to Enable=1.

In Red Hat version 7.2 - 9.0: change Enable=false to Enable=true.

In Red Hat Enterprise Linux version 5: add Enable=true.

    1. Save the file.
  1. Initialize the Changes.

Stop gdm, xdm, and kdm by entering the following at the command prompt:

In Red Hat version 7.0 - 7.2: killall gdm xdm kdm

In Red Hat version 8.0 - or higher: killall gdm-binary xdm kdm

You should now be able to establish an XDMCP connection using Reflection X (the display manager will restart automatically when a connection is requested).

Additional GNOME Settings

  • By default, GNOME uses TTF fonts with antialiasing. Antialiasing is an effect applied to the edges of characters to make them look smooth. Reflection X does not support antialiasing. If you experience font-related issues, follow these steps to disable GNOME antialiasing.
    1. In GNOME, click Foot/Hat/System > Preferences > Font, and change the font setting to a common font. For example, Fixed, Courier, or Helvetica.
    2. In the Font Rendering box, select Monochrome. Monochrome is the only choice that disables antialiasing. Note: Monochrome font rendering may cause the edges of characters to appear jagged.
    3. Click Close.
  • Desktop background images can affect startup speed and the speed of windows opening and closing. If you are experiencing slow speeds in these areas, navigate to Font > Preferences > Background, and try changing your background to a solid color.

Using KDE's KDM X Display Manager

To configure Red Hat Linux to use kdm and automatically start the KDE desktop environment, follow the steps below.

  1. Edit the /etc/sysconfig/desktop file to define which X desktop environment loads on connection.
    1. Open the /etc/sysconfig/desktop file.
    2. Locate the DESKTOP= entry. Note: This entry may need to be created, and it is case sensitive.

For KDE desktop, change this entry to: DESKTOP="KDE"

    1. Save the file.
  1. Edit the Xaccess file.
    1. Open the /etc/X11/xdm/Xaccess file.

Note: In Red Hat Enterprise Linux version 5, the path is /usr/share/config/kdm/Xaccess.

    1. Verify that the following lines appear as shown below:
* #any host can get a login window
* CHOOSER BROADCAST #any indirect host can get a chooser

Note: The asterisk (*) symbol in front of each line makes the line active. If a pound (#) symbol appears on the line before the * symbol, delete the # symbol.

    1. Save the file.
  1. Edit the kdmrc file.
    1. Open the kdmrc file. (Depending on the version of Red Hat, this file may be located under /usr/share/config, /etc/kde/kdm, or /etc/X11/xdm.)
    2. Under the "[Xdmcp]" heading, change the default entry of Enable=false to Enable=true.

Note: In Red Hat Enterprise Linux version 5, this parameter is set to Enable=true by default.

    1. Save the file.
  1. In Red Hat version 7.0 - 7.1 and 8.0 - 9.0 only, edit the /etc/X11/xdm/xdm-config file.
    1. Open the /etc/X11/xdm/xdm-config text file.
    2. Comment out the requestPort command by inserting an exclamation point (!) in front of the command line, as shown below:
!DisplayManager.requestPort: 0
    1. Save the file.
  1. In Red Hat 8.0 - 9.0 only, edit the prefdm file.
    1. Open the /etc/X11/prefdm file.
    2. Locate the preferred= entry.
    3. Change this entry to: preferred=kdm.
    4. Save the file.
  2. Initialize the Changes.

Stop gdm, xdm, or kdm by entering the following at the command prompt:

In Red Hat 7.0 - 7.2: killall gdm xdm kdm

In Red Hat 8.0 - 9.0: killall gdm-binary xdm kdm

You should now be able to establish an XDMCP connection using Reflection X (the display manager will restart automatically when a connection is requested).

Using the XDM X Display Manager (Versions 7.0 - 9.0)

To configure Red Hat Linux 7.0 - 9.0 to use xdm and automatically start an X desktop environment, follow the steps below.

  1. Edit the /etc/sysconfig/desktop file to define which X desktop environment loads on connection.
    1. Open the /etc/sysconfig/desktop file.
    2. Locate the DESKTOP= entry. Note: This entry is case sensitive.

For the GNOME desktop, change this entry to: DESKTOP="GNOME"

For the KDE desktop, change this entry to: DESKTOP="KDE"

    1. Save the file.
  1. In Red Hat 7.0 - 7.2 only, edit the /etc/inittab file.
    1. Open the /etc/inittab file.
    2. Under the heading "# Run xdm in runlevel", insert a pound (#) at the beginning of the entry to comment out the current command. For example, the edit line should appear as follows
# x:5:respawn:/usr/bin/prefdm -nodaemon
    1. Under the heading "#Run xdm in runlevel", add the following command line:
x:5:respawn:/usr/bin/X11/xdm -nodaemon
    1. Save the file.
  1. In Red Hat 7.0 - 7.2 only, initialize the /etc/inittab changes.

Enter the following command at the UNIX prompt. This causes system to re-examine the inittab file:

/sbin/init q
  1. Edit the /etc/X11/xdm/Xaccess file.
    1. Open the /etc/X11/xdm/Xaccess file.
    2. Verify that the following lines appear as shown below.
* #any host can get a login window
* CHOOSER BROADCAST #any indirect host can get a chooser

Note: The asterisk (*) in front of each line makes that line active. If a pound (#) appears on the line before the * symbol, delete the # symbol because this # symbol comments out the command line.

    1. Save the file.
  1. Edit the /etc/X11/xdm/xdm-config file.
    1. Open the /etc/X11/xdm/xdm-config file.
    2. Comment out the requestPort command by inserting an exclamation point (!) in front of the command line, as shown below:
!DisplayManager.requestPort: 0
    1. Save the file.
  1. In Red Hat version 8.0 - 9.0 only, edit the prefdm file.
    1. Open the /etc/X11/prefdm file.
    2. Locate the preferred= entry.
    3. Change this entry to: preferred=xdm
    4. Save the file.
  2. Initialize the Changes.

Stop gdm, xdm, or kdm by entering the following at the command prompt:

In Red Hat 7.0 - 7.2: killall gdm xdm kdm

In Red Hat 8.0 - 9.0: killall gdm-binary xdm kdm

You should now be able to establish an XDMCP connection using Reflection X.

2010年7月20日 星期二

VMware vmmon compilation issues on 64-bit kernel 2.6.35

The vmmon module in VMware Player 3.x and Workstation 7.x fails to compile on the latest 64-bit linux kernel 2.6.35:
Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-root/modules/vmmon-only'
make -C /lib/modules/2.6.35-2-generic/build/include/.. SUBDIRS=$PWD
SRCROOT=$PWD/. \
MODULEBUILDDIR= modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.35-2-generic'
CC [M] /tmp/vmware-root/modules/vmmon-only/linux/driver.o
CC [M] /tmp/vmware-root/modules/vmmon-only/linux/driverLog.o
CC [M] /tmp/vmware-root/modules/vmmon-only/linux/hostif.o
........
........

make[1]: *** [_module_/tmp/vmware-root/modules/vmmon-only] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.35-2-generic'
make: *** [vmmon.ko] Error 2
make: Leaving directory `/tmp/vmware-root/modules/vmmon-only'



resolve
cd /tmp
tar xvf /usr/lib/vmware/modules/source/vmmon.tar -C /tmp
perl -pi -e 's,_range,,' vmmon-only/linux/iommu.c
tar cvf /usr/lib/vmware/modules/source/vmmon.tar vmmon-only



How to fix Firefox slow problem in ubuntu 10.04(Lucid)

This tutorial will explain how to fix slow problem in ubuntu 10.04(Lucid)

Open your Firefox and type about:config at URL address bar and hit enter. To make a False into True, select the line to change, and double click. On the 2nd option change, right click and select Modify

- network.http.pipelining > Make it True

- network.http.pipelining.maxrequests > Make it 8 or 10

- network.http.proxy.pipelining > Make it True

- network.dns.disableIPv6 > Make it True

I hope this helps for some users

2010年5月11日 星期二

Ubuntu sun Java 6.0

$ locate libnpjp2.so
/usr/lib/jvm/java-6-sun-1.6.0.15/jre/lib/i386/libnpjp2.so
$ ln -s /usr/lib/jvm/java-6-sun-1.6.0.15/jre/lib/i386/libnpjp2.so $HOME/.mozilla/plugins/

2010年5月3日 星期一

好用的AWK SCRIPT

cat iostat_1sec_5min.csv | awk '{RS="hdisk";print "hdisk"$1,$9,$10,$21,$34,$50}' > iostat_1sec_filter.csv