Log file ေတြထဲမွာ လိုခ်င္တာရွာရတာ အခက္ဆုံးနဲ႕ စိတ္ညစ္စရာ အေကာင္းဆုံးက auth.log ျဖစ္မယ္ထင္တယ္။ Internet facing server ေတြမွာ ( Internet ကတိုက္႐ိုက္သုံးလို႕ရတယ့္ ၊ company အတြင္းပဲသုံးတာမဟုတ္တယ့္ server မ်ိဳးကိုေျပာခ်င္တာပါ) တစ္နာရီမွာ failed login attempt က 500 ေလာက္ရွိတတ္ပါတယ္။ ေျပာရရင္ေတာ့.. ဒါပံုမွန္ပါ။ တကယ္ target ထားျပီး လုပ္တာမ်ိဳးမဟုတ္ပါဘူး။ Botnet တစ္ခုက IP range တစ္ခုအတြင္း ရွိသမွ် server ေတြကို dictionary ေသးေသးတစ္ခုနဲ႕ attempt လုပ္ၾကည့္တာေလာက္ပဲရွိမယ္။ ရည္ရြယ္ခ်က္ရွိရွိေတာင္မဟုတ္ဖူး၊ ဒီလိုပဲ ေရာေကာေသာေကာပါသြားတာေတာင္ ဒီေလာက္ေတာ့ရွိမယ္။ ဟုတ္တယ္ တစ္ခါတစ္ေလ ကံေကာင္းရင္ တစ္နာရီေလာက္အတြင္း attempt ေလး ငါးေသာင္းေလာက္လဲျဖစ္ႏိုင္တယ္။ Failed attempt ပဲ ျပသနာမဟုတ္ပါဘူးလို႕ေျပာလို႕ရေပမယ့္ attempt လုပ္ခံရတာဟာ cracked ျဖစ္ဖို႕ တစ္ဆင့္နီးတာပဲ။ ( က်ေနာ္အတြက္ကေတာ့ ဘာပဲျဖစ္ျဖစ္ မ်က္စိေနာက္ပါတယ္။)
SSH service ရွိေနသမွ် ဒါမ်ိဳးေတြရွိမွာပဲ၊ SSH service disable လိုက္တာေကာင္းမယ္။ ဟုတ္တာေပါ့။ ဒါဆို attacker တင္မဟုတ္ဖူး ကိုယ္ပါဝင္လို႕မရေတာ့ဘူး ဟဲဟဲ၊ ဒါဆိုအလုပ္နည္းတာေပါ့။ အမွန္က SSH service run ထားရင္ သတိထားသင့္တာေလးေတြ ေရးမလို႕ပါ။ က်ေနာ္လို failed attempt ေတြကိုမ်က္စိေနာက္တဲ့သူအတြက္ ၊ ဒါမ်ိဳးေတြ နည္းသြားေအာင္လို႕ လုပ္လို႕ရတဲ့ နည္းေလးေတြေပါ့။
1. Root login
SSH ကေန direct root login ကို disable လုပ္ထားသင့္ပါတယ္။ Normal user နဲ႕ပဲဝင္ျပီး sudo သုံးတာျဖစ္ျဖစ္ ၊ root user နဲ႕သုံးရမွ ေက်နပ္ရင္လည္းေနာက္မွ su ျပန္ေျပာင္းျပီးျဖစ္ျဖစ္သုံးသင့္ပါတယ္။ ဘာလို႕လည္းဆို အေၾကာင္းျပခ်က္တစ္ခုက ၊ bot ေတြရဲ့ အဓိက target က known user account ေတြကိုပါ။ Linux / Unix မွန္ရင္ root ဆိုတယ့္ နာမည္နဲ႕ user ကရွိမွာပါပဲ။ အဲေတာ့ username မွန္းစရာမလိုပဲ password ေလာက္ပဲမွန္းရေတာ့မွာေပါ့။ အဲဒါမ်ိဳးမျဖစ္ေအာင္ root login ကို disable ထားျပီး admin ဆိုျပီး user account လုပ္ျပီးသုံးရင္လည္း သိပ္မထူးဘူးေပါ့။ ျဖစ္ႏိုင္ရင္ အဲလို username မ်ိဳးကိုလည္း မသုံးသင့္ပါဘူး။
2. SSH service port
ဒါက မထင္မွတ္စရာ အသုံးတဲ့ပါတယ္။ SSH attempt အေတာ္မ်ားမ်ားက port 22 ကိုပဲ ၾကိဳးစားၾကတာမ်ားပါတယ္။ Port scan တစ္ခါဖတ္၊ တစ္ခါ attempt လုပ္ဆိုတာမ်ိဳးက bot နဲ႕ random စမ္းတယ့္သူမ်ိဳးက သိပ္မၾကိဳးစားပါဘူး။ SSH port ကို တျခား port တစ္ခုေျပာင္းသုံးသင့္ပါတယ္။
3. public-key authentication
ျဖစ္ႏိုင္ရင္ public-key authentication only သုံးသင့္ပါတယ္။ Password နဲ႕ authenticate လုပ္တာကို လံုေလာက္တဲ့ security measure လို႕ မသတ္မွတ္ေတာ့တာ ၾကာပါျပီ။ SSH tunnel ေဆာက္တယ့္အခ်ိန္ username / password အဆင့္မေရာက္ခင္မွာ key အရင္စစ္ပါတယ္။ ( ssh -v နဲ႕ စမ္းၾကည့္ပါ။) တကယ္လို႕ public key authentication only ဆိုရင္ rsa / dsa key မမွန္ရင္၊ မေတြ႕ရင္ကို authentication break out ျဖစ္သြားပါျပီ ။ Username / password အဆင့္ကို မဆက္ေတာ့ပါဘူး။ အဲေတာ့ Security ပိုေကာင္းတယ္ေပါ့။ Log ကေတာ့ တက္အုန္းမွာပါ။
ေျပာလက္စနဲ႕မို႕လို႕ပါ။ Account password ေတြကို လြယ္လြယ္ကူကူမေပးသင့္ပါဘူး။ Username = admin , password = admin ဆိုတာမ်ိဳးကေတာ့ ပါသြားရင္နည္းေတာင္ နည္းေသးတယ္ေျပာရမွာပါပဲ။
ဆယ္မိနစ္မၾကာတယ့္ implementation ပါ။ ဒါေပမယ့္ security အရေတာ့ အမ်ားၾကီးကို ကြာသြားပါတယ္။ SSH brute force ကိုလည္း အတိုင္းအတာ တစ္ခုထိ ကာကြယ္ျပီးသားျဖစ္ပါတယ္။ တစ္ခါတစ္ေလေတာ့လည္း သိပ္မပ်င္းတာ ေကာင္းပါတယ္ :D
Divinity
Showing posts with label System. Show all posts
Showing posts with label System. Show all posts
Thursday, February 7, 2013
Thursday, June 2, 2011
Copy ကူးတာကိုလည္း တစ္ခါတေလ backup လုပ္တယ္လို႕ေခၚတယ္
တစ္ခ်ိဳ႕ေတြေပါ့၊ လိုခ်င္ေတာ့ ၾကီးၾကီးက်ယ္က်ယ္ ။ Daily full backup ၊ one month cycle တဲ့။ Backup software ေတာ့မဝယ္ခ်င္ဘူး ၊ ဘယ္လိုပဲရရတဲ့ backup ျဖစ္ရင္ျပီးေရာတဲ့။ File ေတြမွားမွားဖ်က္ၾက overwrite ေတြ မွားမွားလုပ္ၾကလြန္းလို႕တဲ့။ ဒီလိုလား ၊ ရပါတယ္။ xcopy နဲ႕ပဲ လုပ္လို႕ရပါတယ္။ အဲဒါနဲ႕ပဲ ဒီေန႕ သုံးေၾကာင္း bat script ေလးတစ္ခုေရးျဖစ္တယ္။ အမွန္က ဘယ္မွာေတြ့ဖူးမွန္းမသိတာတစ္ခုကို မွီညမ္းျပီး ဟိုးအရင္တစ္ခါက ေရးထားတာပါ။ နည္းနည္းေလးပဲျပင္လိုက္ရတယ္။
ဒုတိယ တစ္ေၾကာင္းက ပံုမွန္ဆိုမလိုပါဘူး။ ဒီ user ေတြက ဘာေတြလုပ္မွန္းမသိ မၾကာမၾကာ recycle bin corrupted error ျဖစ္တယ္။ ဘာလို႕ျဖစ္လည္း သူတို႕ဘာလုပ္လည္းဆိုတာ သူတို႕ကိုတိုင္လည္းမသိဘူး။ Recycle bin ကအေရးမၾကီးဘူး၊ ရတယ္တဲ့။ ဟုတ္တယ္ေလ မွားဖ်က္မိလို႕ ျပန္လိုခ်င္ရင္ backup ေတြရွိေနမွာပဲ။ အဲဒါနဲ႕ က်ေနာ့ script ထဲမွာ အဲ quickfix ေလးထဲ့ေရးလိုက္တာ။
ပထမလိုင္းကေတာ့ အလကား output ေတြေပၚေပၚလာရင္ မ်က္စိေနာက္လို႕ echo off လိုက္တာ ။ Bat ေရးဖူးတဲ့သူတိုင္း သိပါတယ္။
ဒုတစ္ယလိုင္းကေတာ့ recycle bin error ကို quickfix အေနနဲ႕ Empty recycle bin လုပ္လိုက္တာ။ အမွန္က Recycle.Bin directory ကို ဖ်က္လိုက္တာပါ။ ဒါေပမယ့္ တစ္ခုခု delete လုပ္ရင္ျဖစ္ျဖစ္၊ logout / login လုပ္ရင္ျဖစ္ျဖစ္ recycle.bin folder က ျပန္ create ျဖစ္ပါတယ္။ အဲေတာ့ ဒါ command line က empty recycle bin လုပ္လိုက္တာပဲလို႕ သေဘာထားပါတယ္။ :D
ေနာက္ဆုံးလိုင္းကေတာ့ Windows ရဲ့ အသုံးတည့္ command ေလးတစ္ခုျဖစ္တဲ့ xcopy နဲ႕ files ေတြကို ကူးဖို႕ပါ။ ဒီမွာ ျပသနာ နည္းနည္းရွိပါတယ္။ က်ေနာ္တို႕က one month cycle လိုခ်င္တာပါ။ ဆိုလိုတာက ေန႕စဥ္ overwrite မလုပ္ခ်င္ပါဘူး။ ေန႕စဥ္ new backup set ထားသြားျပီး တစ္လၾကာမွ ပထမေန႕က backup set ကို overwrite ခ်င္တာပါ။ အဲဒါေၾကာင့္ ေနာက္က destination မွာ %date~:4,2% ဆိုတာေလးပါေနတာပါ။ Windows မွာ %date% environmental variable က system date ကို ကိုယ္စားျပဳပါတယ္။ %date% ကမွ ေလးလုံးေျမာက္ကေန ငါးလုံးေျမာက္အထိ ( ႏွစ္လုံးထဲ) လိုခ်င္လို႕ %date~:4,2% လို႕ေရးတာပါ။ ကိုယ္ယူထားတယ့္ date / time format ေပၚမွာ မူတည္ပါလိမ့္မယ္။ mm-dd-yyyy ဆိုရင္ေတာ့ 7,2 လို႕ယူရပါလိမ့္မယ္။ အေနာက္က /Y ကေတာ့ overwrite ဖို႕ yes / no prompt ေတြမွာ အကုန္ yes လို႕သတ္မွတ္ျပီး overwrite သြားဖို႕၊ /Q ကေတာ့ process output မျပဖို႕နဲ႕ ၊ /S ကေတာ့ subdirectories ေတြပါ ကူးဖို႕ ထဲ့ထားတာပါ။
Diskspace ပိုးဆိုးပက္စက္တက္တာကလြဲရင္ သူတို႕လိုခ်င္သလိုျဖစ္ပါတယ္။ Diskspace ကေတာ့ အမွန္ဆို compress ေလးေလာက္လုပ္သင့္တာေပါ့ေနာ္။ ဒါေပမယ့္ user က ဒီတိုင္းက သူတို႕အတြက္ ပိုေကာင္းတယ္၊ ဘာမွမလုပ္ရပဲ backup file ေတြကို ျမင္ရတာ ပိုသေဘာက်တယ္ဆိုလို႕ ျဖစ္သလိုပဲ လုပ္ေပးလိုက္ပါတယ္။ အမွန္က backup လုပ္တာလို႕ ေျပာဖို႕ေတာင္ ခက္ပါတယ္၊ တစ္ျခားတစ္ေနရာရာကို copy ကူးထားလိုက္တာပါပဲ။ ကိုယ့္ဟာကို compression လုပ္ခ်င္ရင္ေတာ့ winrar command line tools ေလးနဲ႕ လုပ္လို႕ရပါတယ္။
Divinity
@Echo off
rd /s /q E:\$Recycle.bin
xcopy D:\Company\* E:\Serverbackp\Company\%date:~4,2%\* /Y /Q /S
ဒုတိယ တစ္ေၾကာင္းက ပံုမွန္ဆိုမလိုပါဘူး။ ဒီ user ေတြက ဘာေတြလုပ္မွန္းမသိ မၾကာမၾကာ recycle bin corrupted error ျဖစ္တယ္။ ဘာလို႕ျဖစ္လည္း သူတို႕ဘာလုပ္လည္းဆိုတာ သူတို႕ကိုတိုင္လည္းမသိဘူး။ Recycle bin ကအေရးမၾကီးဘူး၊ ရတယ္တဲ့။ ဟုတ္တယ္ေလ မွားဖ်က္မိလို႕ ျပန္လိုခ်င္ရင္ backup ေတြရွိေနမွာပဲ။ အဲဒါနဲ႕ က်ေနာ့ script ထဲမွာ အဲ quickfix ေလးထဲ့ေရးလိုက္တာ။
ပထမလိုင္းကေတာ့ အလကား output ေတြေပၚေပၚလာရင္ မ်က္စိေနာက္လို႕ echo off လိုက္တာ ။ Bat ေရးဖူးတဲ့သူတိုင္း သိပါတယ္။
ဒုတစ္ယလိုင္းကေတာ့ recycle bin error ကို quickfix အေနနဲ႕ Empty recycle bin လုပ္လိုက္တာ။ အမွန္က Recycle.Bin directory ကို ဖ်က္လိုက္တာပါ။ ဒါေပမယ့္ တစ္ခုခု delete လုပ္ရင္ျဖစ္ျဖစ္၊ logout / login လုပ္ရင္ျဖစ္ျဖစ္ recycle.bin folder က ျပန္ create ျဖစ္ပါတယ္။ အဲေတာ့ ဒါ command line က empty recycle bin လုပ္လိုက္တာပဲလို႕ သေဘာထားပါတယ္။ :D
ေနာက္ဆုံးလိုင္းကေတာ့ Windows ရဲ့ အသုံးတည့္ command ေလးတစ္ခုျဖစ္တဲ့ xcopy နဲ႕ files ေတြကို ကူးဖို႕ပါ။ ဒီမွာ ျပသနာ နည္းနည္းရွိပါတယ္။ က်ေနာ္တို႕က one month cycle လိုခ်င္တာပါ။ ဆိုလိုတာက ေန႕စဥ္ overwrite မလုပ္ခ်င္ပါဘူး။ ေန႕စဥ္ new backup set ထားသြားျပီး တစ္လၾကာမွ ပထမေန႕က backup set ကို overwrite ခ်င္တာပါ။ အဲဒါေၾကာင့္ ေနာက္က destination မွာ %date~:4,2% ဆိုတာေလးပါေနတာပါ။ Windows မွာ %date% environmental variable က system date ကို ကိုယ္စားျပဳပါတယ္။ %date% ကမွ ေလးလုံးေျမာက္ကေန ငါးလုံးေျမာက္အထိ ( ႏွစ္လုံးထဲ) လိုခ်င္လို႕ %date~:4,2% လို႕ေရးတာပါ။ ကိုယ္ယူထားတယ့္ date / time format ေပၚမွာ မူတည္ပါလိမ့္မယ္။ mm-dd-yyyy ဆိုရင္ေတာ့ 7,2 လို႕ယူရပါလိမ့္မယ္။ အေနာက္က /Y ကေတာ့ overwrite ဖို႕ yes / no prompt ေတြမွာ အကုန္ yes လို႕သတ္မွတ္ျပီး overwrite သြားဖို႕၊ /Q ကေတာ့ process output မျပဖို႕နဲ႕ ၊ /S ကေတာ့ subdirectories ေတြပါ ကူးဖို႕ ထဲ့ထားတာပါ။
Diskspace ပိုးဆိုးပက္စက္တက္တာကလြဲရင္ သူတို႕လိုခ်င္သလိုျဖစ္ပါတယ္။ Diskspace ကေတာ့ အမွန္ဆို compress ေလးေလာက္လုပ္သင့္တာေပါ့ေနာ္။ ဒါေပမယ့္ user က ဒီတိုင္းက သူတို႕အတြက္ ပိုေကာင္းတယ္၊ ဘာမွမလုပ္ရပဲ backup file ေတြကို ျမင္ရတာ ပိုသေဘာက်တယ္ဆိုလို႕ ျဖစ္သလိုပဲ လုပ္ေပးလိုက္ပါတယ္။ အမွန္က backup လုပ္တာလို႕ ေျပာဖို႕ေတာင္ ခက္ပါတယ္၊ တစ္ျခားတစ္ေနရာရာကို copy ကူးထားလိုက္တာပါပဲ။ ကိုယ့္ဟာကို compression လုပ္ခ်င္ရင္ေတာ့ winrar command line tools ေလးနဲ႕ လုပ္လို႕ရပါတယ္။
Divinity
Friday, May 20, 2011
OpenSource ေတြသုံးၾကည့္ရေအာင္ (1) ( Openfiler - Opensource NAS)
ဒီေန႕ေခတ္က OpenSource ရဲ့ေခတ္လို႕ေျပာရင္ေတာင္ လြန္မယ္မထင္ဘူး။ Commercial products ေတာ္ေတာ္မ်ားမ်ားအတြက္ alternative အေနနဲ႕ Opensource product ေတြရွိေလ့ရွိပါတယ္။ Microsoft Office ေလာက္မေကာင္းဘူးလို႕ေျပာလို႕ရေပမယ့္ OpenOffice.org ဆိုလည္း သုံးလို႕ အဆင္ေျပပါတယ္။ Firewall မွာလည္း Fortinet တို႕ Checkpoint တို႕ကို မမွီေပမယ့္ home and small office users ေတြေလာက္အတြက္ လံုေလာက္တယ့္ capability ကိုေပးႏိုင္တယ့္ Opensource firewall ေတြအမ်ားၾကီးပါ ။ Licensed version လည္း ဝယ္သုံးရတာ သက္သာတာ က်ေနာ္တို႕ႏိုင္ငံမွာပဲရွိပါတယ္။တျခားႏိုင္ငံေတြက က်ေနာ္တို႕ေလာက္ License version မသုံးႏိုင္လို႕ Opensource ေတြကို အားကိုးရတယ္။ EMC ကိုဖို႕မျဖစ္ႏိုင္ေပမယ့္ budget cut down ျဖစ္ျပီး အသုံးတဲ့တယ့္ Opensource NAS တစ္ခုအေၾကာင္း သတင္းေပးခ်င္ပါတယ္။
Small office တစ္ခုအေနနဲ႕ centralized file storage တစ္ခုေတာ့ထားခ်င္တယ္၊ ဒါေပမယ့္ storage server license ဝယ္ရမွာလည္း ေစ်းၾကီးတယ္။ Office မွာကမွ လူက ဆယ္ေယာက္ေလာက္ရွိတာ၊ server license ေတာ့မဝယ္ခ်င္ဖူးဆိုရင္ Opensource nas ေတြအမ်ားၾကီးရွိပါတယ္။ အဲဒီထဲမွာေတာ့့ OpenNAS နဲ႕ Openfiler က stable ျဖစ္ျပီး လူသုံးမ်ားတယ္။ Small office မဟုတ္ေပမယ့္လည္း budget cut down လုပ္ခ်င္ရင္ stable ျဖစ္လို႕ သုံးလို႕ အဆင္ေျပႏိုင္ပါတယ္။ ဒီ post မွာ က်ေနာ္တို႕ Openfiler ရဲ့ capability ကို ၾကည့္ၾကည့္ရေအာင္ ။
Overview
Linux based ပါပဲ။ OpenLDAP ၊ NFS ၊ NIFS ၊ SAMBA ၊ iSCSI initiator အစရွိသျဖင့္ NAS တစ္ခုအတြက္ လိုအပ္တာေတြျပန္ ေပါင္းထဲ့ထားတယ့္ Linux based တစ္ခုပါပဲ။ Software RAID ၊ Hardware RAID ႏွစ္ခုလုံးကို support လုပ္ပါတယ္။ WebUI ပါလို႕ administration လြယ္ကူပါတယ္။ ဒါေပမယ့္ UI ကေနမရတယ့္ configuration အတြက္လည္း ကိုယ့္ဟာကိုယ္ console terminal ကေန ျပင္လို႕ troubleshoot လုပ္လို႕ရတာမို႕ သုံးရတာ flexible ျဖစ္ပါတယ္။ WebUI မွာတင္ Java servlet တစ္ခုနဲ႕ console access ထဲ့ေပးထားပါတယ္။ ( init 1 ႐ိုက္ဖို႕လိုရင္ေတာ့ သုံးလို႕မရႏိုင္ေပမယ့္ ေတာ္ရုံေတာ့ အသုံးတဲ့ပါတယ္)
Storage Flexibility
Openfiler မွာ iSCSI configure လုပ္လို႕ရလို႕ iSCSI capable external enclosure တစ္ခုခုနဲ႕ ခ်ိတ္ဆက္သုံးလို႕ရပါတယ္။ Storage တိုးခ်င္ရင္ enclosure ထဲမွာ hard disk ေတြထပ္တိုးျပီး Openfiler က Volume Group expend လုပ္လိုက္ရင္ရျပီ ။ အဲေတာ့ အျမဲတိုးတက္လာတယ့္ storage space လိုအပ္ခ်က္ကို အမွီလိုက္ႏိုင္ပါတယ္။ လက္ရွိ version မွာ 60 TB အထိ support လုပ္ပါတယ္။ Online volume resizing လုပ္လို႕ရတာမို႕ space expend လုပ္ခ်င္ရင္ေတာင္ downtime မရွိ လုပ္ႏိုင္ပါတယ္။
User Account Control
OpenLDAP ပါတာမို႕ local ldap server configure လုပ္ျပီး user acct control လုပ္လို႕ရပါတယ္။ တကယ္လို႕ network ထဲမွာ authentication server ရွိျပီးသားဆိုလည္း ရွိေနျပီးသား LDAP server သို႕မဟုတ္ AD ကိုခ်ိတ္ဆက္အသုံးျပဳႏိုင္ပါတယ္။ ဘယ္ user / group က ဘယ္ share ကို အသုံးျပဳႏိုင္သလည္းဆိုတာကိုလည္း configure လုပ္ရတာ လြယ္ကူပါတယ္။
Quota control
User ေတြကို quota သတ္မွတ္လို႕ရသလို ၊ share တစ္ခုခ်င္းကိုလည္း ဘယ္ share က ဘယ္ေလာက္ space ထိပဲ grow လုပ္ခြင့္ျပဳမယ္ဆိုျပီး သတ္မွတ္လို႕ရပါတယ္။ Company အတြင္းက ဘယ္ department က ဘယ္ေလာက္ space ပဲသုံးလို႕ရမယ္ဆိုျပီး သက္မွတ္တာမ်ိဳးအတြက္ အဆင္ေျပပါတယ္။
Rich Communication methods
SSH ၊ SMB ၊ CIFS ၊ NFS ၊ FTP အကုန္ support လုပ္လို႕ Unix ၊ Linux ၊ Mac ၊ Windows မေရြး ခ်ိတ္ဆက္အသုံးျပဳႏိုင္ပါတယ္။
High Availability
Openfiler မွာ HA cluster setup လုပ္လို႕ရပါတယ္။ တစ္လုံးထက္ပိုတယ့္ Openfiler server ေတြကေတာ့ Cluster တစ္ခုအေနနဲ႕ serve လုပ္ႏိုင္တာမို႕ single point of failure ကိုေရွာင္ႏိုင္ပါတယ္။ (ဒါကလည္း iSCSI လိုမ်ိဳးနဲ႕ တြဲမွ အဆင္ေျပမွာပါ။ )
Snapshot
Openfiler ရဲ့ volume တစ္ခုခ်င္းကို snapshot ႐ိုက္ျပီးတစ္ေနရာရာ ျပန္သြားထားလို႕ရပါေသးတယ္။ Storage server ကို backup ျပန္လုပ္တာေပါ့။ Revert ျပန္လုပ္ရတာလည္း လြယ္လြယ္ကူကူပဲ။
Easy Administration
ခုနကေျပာသလို ႐ိုးရွင္းျပီး ျပည့္စံုတယ့္ WebUI ေၾကာင့္ administrate လုပ္ရတာ လြယ္ကူလြန္းပါတယ္။ Volume group ေတြ၊ User / group quota ေတြနဲ႕ မစိမ္းဖူးဆိုရင္ ဘာမွ အထူးအစမ္းမရွိႏိုင္ပါဘူး။
Openfiler ရဲ့ ေကာင္းတယ့္အခ်က္ေတြအမ်ားၾကီးရွိပါေသးတယ္။ အလကားရတာမို႕ Cost effective ျဖစ္တယ္လို႕ေျပာရင္ လြန္မယ္မထင္ပါဘူး။ Exchange server ၊ VMware စတာတို႕နဲ႕တြဲျပီး storage အျဖစ္သုံးလို႕လည္းရပါတယ္။ Opensource တို႕ရဲ့ထုံးစံအတိုင္း documentation ကေတာ့ သိပ္အားမေကာင္းပါဘူး။ ဒါေပမယ့္ feature ေတာ္ေတာ္မ်ားမ်ားက ဘာ technical skills မွမလိုပဲ လြယ္လြယ္ကူကူပဲ သုံးလို႕ရပါတယ္။
က်ေနာ့္ ပတ္ဝန္းက်င္မွာ က်ေနာ္ေန႕စဥ္အမွ် ထိေတြ႕ေနရတယ့္ Opensource product ေတြအေၾကာင္း တစ္ခုခ်င္း ေရးပါအုန္းမယ္ ။ ( ေျပာျပန္ျပီ)
Divinity
Small office တစ္ခုအေနနဲ႕ centralized file storage တစ္ခုေတာ့ထားခ်င္တယ္၊ ဒါေပမယ့္ storage server license ဝယ္ရမွာလည္း ေစ်းၾကီးတယ္။ Office မွာကမွ လူက ဆယ္ေယာက္ေလာက္ရွိတာ၊ server license ေတာ့မဝယ္ခ်င္ဖူးဆိုရင္ Opensource nas ေတြအမ်ားၾကီးရွိပါတယ္။ အဲဒီထဲမွာေတာ့့ OpenNAS နဲ႕ Openfiler က stable ျဖစ္ျပီး လူသုံးမ်ားတယ္။ Small office မဟုတ္ေပမယ့္လည္း budget cut down လုပ္ခ်င္ရင္ stable ျဖစ္လို႕ သုံးလို႕ အဆင္ေျပႏိုင္ပါတယ္။ ဒီ post မွာ က်ေနာ္တို႕ Openfiler ရဲ့ capability ကို ၾကည့္ၾကည့္ရေအာင္ ။
Overview
Linux based ပါပဲ။ OpenLDAP ၊ NFS ၊ NIFS ၊ SAMBA ၊ iSCSI initiator အစရွိသျဖင့္ NAS တစ္ခုအတြက္ လိုအပ္တာေတြျပန္ ေပါင္းထဲ့ထားတယ့္ Linux based တစ္ခုပါပဲ။ Software RAID ၊ Hardware RAID ႏွစ္ခုလုံးကို support လုပ္ပါတယ္။ WebUI ပါလို႕ administration လြယ္ကူပါတယ္။ ဒါေပမယ့္ UI ကေနမရတယ့္ configuration အတြက္လည္း ကိုယ့္ဟာကိုယ္ console terminal ကေန ျပင္လို႕ troubleshoot လုပ္လို႕ရတာမို႕ သုံးရတာ flexible ျဖစ္ပါတယ္။ WebUI မွာတင္ Java servlet တစ္ခုနဲ႕ console access ထဲ့ေပးထားပါတယ္။ ( init 1 ႐ိုက္ဖို႕လိုရင္ေတာ့ သုံးလို႕မရႏိုင္ေပမယ့္ ေတာ္ရုံေတာ့ အသုံးတဲ့ပါတယ္)
Storage Flexibility
Openfiler မွာ iSCSI configure လုပ္လို႕ရလို႕ iSCSI capable external enclosure တစ္ခုခုနဲ႕ ခ်ိတ္ဆက္သုံးလို႕ရပါတယ္။ Storage တိုးခ်င္ရင္ enclosure ထဲမွာ hard disk ေတြထပ္တိုးျပီး Openfiler က Volume Group expend လုပ္လိုက္ရင္ရျပီ ။ အဲေတာ့ အျမဲတိုးတက္လာတယ့္ storage space လိုအပ္ခ်က္ကို အမွီလိုက္ႏိုင္ပါတယ္။ လက္ရွိ version မွာ 60 TB အထိ support လုပ္ပါတယ္။ Online volume resizing လုပ္လို႕ရတာမို႕ space expend လုပ္ခ်င္ရင္ေတာင္ downtime မရွိ လုပ္ႏိုင္ပါတယ္။
User Account Control
OpenLDAP ပါတာမို႕ local ldap server configure လုပ္ျပီး user acct control လုပ္လို႕ရပါတယ္။ တကယ္လို႕ network ထဲမွာ authentication server ရွိျပီးသားဆိုလည္း ရွိေနျပီးသား LDAP server သို႕မဟုတ္ AD ကိုခ်ိတ္ဆက္အသုံးျပဳႏိုင္ပါတယ္။ ဘယ္ user / group က ဘယ္ share ကို အသုံးျပဳႏိုင္သလည္းဆိုတာကိုလည္း configure လုပ္ရတာ လြယ္ကူပါတယ္။
Quota control
User ေတြကို quota သတ္မွတ္လို႕ရသလို ၊ share တစ္ခုခ်င္းကိုလည္း ဘယ္ share က ဘယ္ေလာက္ space ထိပဲ grow လုပ္ခြင့္ျပဳမယ္ဆိုျပီး သတ္မွတ္လို႕ရပါတယ္။ Company အတြင္းက ဘယ္ department က ဘယ္ေလာက္ space ပဲသုံးလို႕ရမယ္ဆိုျပီး သက္မွတ္တာမ်ိဳးအတြက္ အဆင္ေျပပါတယ္။
Rich Communication methods
SSH ၊ SMB ၊ CIFS ၊ NFS ၊ FTP အကုန္ support လုပ္လို႕ Unix ၊ Linux ၊ Mac ၊ Windows မေရြး ခ်ိတ္ဆက္အသုံးျပဳႏိုင္ပါတယ္။
High Availability
Openfiler မွာ HA cluster setup လုပ္လို႕ရပါတယ္။ တစ္လုံးထက္ပိုတယ့္ Openfiler server ေတြကေတာ့ Cluster တစ္ခုအေနနဲ႕ serve လုပ္ႏိုင္တာမို႕ single point of failure ကိုေရွာင္ႏိုင္ပါတယ္။ (ဒါကလည္း iSCSI လိုမ်ိဳးနဲ႕ တြဲမွ အဆင္ေျပမွာပါ။ )
Snapshot
Openfiler ရဲ့ volume တစ္ခုခ်င္းကို snapshot ႐ိုက္ျပီးတစ္ေနရာရာ ျပန္သြားထားလို႕ရပါေသးတယ္။ Storage server ကို backup ျပန္လုပ္တာေပါ့။ Revert ျပန္လုပ္ရတာလည္း လြယ္လြယ္ကူကူပဲ။
Easy Administration
ခုနကေျပာသလို ႐ိုးရွင္းျပီး ျပည့္စံုတယ့္ WebUI ေၾကာင့္ administrate လုပ္ရတာ လြယ္ကူလြန္းပါတယ္။ Volume group ေတြ၊ User / group quota ေတြနဲ႕ မစိမ္းဖူးဆိုရင္ ဘာမွ အထူးအစမ္းမရွိႏိုင္ပါဘူး။
Openfiler ရဲ့ ေကာင္းတယ့္အခ်က္ေတြအမ်ားၾကီးရွိပါေသးတယ္။ အလကားရတာမို႕ Cost effective ျဖစ္တယ္လို႕ေျပာရင္ လြန္မယ္မထင္ပါဘူး။ Exchange server ၊ VMware စတာတို႕နဲ႕တြဲျပီး storage အျဖစ္သုံးလို႕လည္းရပါတယ္။ Opensource တို႕ရဲ့ထုံးစံအတိုင္း documentation ကေတာ့ သိပ္အားမေကာင္းပါဘူး။ ဒါေပမယ့္ feature ေတာ္ေတာ္မ်ားမ်ားက ဘာ technical skills မွမလိုပဲ လြယ္လြယ္ကူကူပဲ သုံးလို႕ရပါတယ္။
က်ေနာ့္ ပတ္ဝန္းက်င္မွာ က်ေနာ္ေန႕စဥ္အမွ် ထိေတြ႕ေနရတယ့္ Opensource product ေတြအေၾကာင္း တစ္ခုခ်င္း ေရးပါအုန္းမယ္ ။ ( ေျပာျပန္ျပီ)
Divinity
Friday, May 6, 2011
Geez, what hardware spec i've got there ?
တစ္ခါတစ္ေလ Server ေတြရဲ့ Hardware spec ျပန္ၾကည့္ခ်င္တယ္၊ Serial Number ျပန္ၾကည့္ခ်င္တယ္၊ Server ကလည္း အနားမွာမရွိဘူး ၊ က်ေနာ္လို႕ documentation ေကာင္းရင္ ဘာ server သုံးခဲ့မိမွန္းေတာင္ မမွတ္မိေတာ့ဘူးဆိုရင္ command line ကေန ၾကည့္လို႕ရပါတယ္။ အမ်ားဆုံးျဖစ္တတ္တာက က်ေနာ္တို႕ဆို memory upgrade လုပ္ခ်င္တာ၊ memory type သိခ်င္ရုံနဲ႕လည္း Data center အထိမသြားခ်င္၊ သြားျဖစ္လည္း ဒါေလးအတြက္နဲ႕ BIOS ထဲဝင္မၾကည့္ခ်င္ရင္ အသုံးတဲ့ပါတယ္။
Linux မွာေတာ့ dmidecode command က ေတာ္ေတာ္အသုံးဝင္ပါတယ္။
Serial number ေလာက္ျပန္ၾကည့္ခ်င္တာဆို
လို႕႐ိုက္လိုက္ရင္ Chassis က serial number ကိုျပေပးပါတယ္။ Memory slot ေတြနဲ႕ ပတ္သက္တယ့္ information က type 16 ျဖစ္ေလ့ရွိပါတယ္။ Slot အေရအတြက္နဲ႕ Max capacity ျပပါလိမ့္မယ္။ အခုလက္ရွိတပ္ထားတယ့္ memory ကိုၾကည့္ခ်င္ရင္ေတာ့ Server အဖုံးဖြင့္ၾကည့္ရပါတယ္။ အခုလက္ရွိ တပ္ထားတယ့္ memory ရဲ့ information ေလာက္ပဲၾကည့္ခ်င္ရင္ေတာ့ 'dmidecode --type 17' ဆိုရင္ရပါတယ္။ DDR အမ်ိဳးအစားနဲ႕ speed ကိုျပပါလိမ့္မယ္။
Type နံပါတ္မေသခ်ာရင္လည္း dmidecode ရဲ့ output တစ္ခုလုံးကို output pipe နဲ႕ more ဒါမွမဟုတ္ less ဆိုျပီး ၾကည့္ရင္လည္းရပါတယ္။ Output ကရွင္းပါတယ္ ၊ လိုတယ့္ information ကိုရွာလို႕ လြယ္ပါတယ္။ ဒါဆို command က ဒါမ်ိဳးေပါ့။
Linux ရဲ့ dmidecode ကေတာ့ hardware info ကိုပဲ အဓိကျပပါတယ္။
Windows မွာဆိုရင္ေတာ့ wmic ဆိုတယ့္ command တစ္ခု ပါပါတယ္။ Windows Management Instrumentation ေပၚမွာ အေျခခံထားတယ့္ command ပါ။ wmic command output ကရွုပ္လို႕ တစ္ခါမွ လိုက္မၾကည့္ဖူးပါဘူး။ လိုတာပဲမွတ္ထားမိတယ္။ ဒါေပမယ့္ သူကေတာ့ ပိုျပီး information မ်ားမ်ား retrieve လုပ္ႏိုင္ပါတယ္။
Serial number ကေတာ့ BIOS မွာရွိပါတယ္ ။
ဆိုရင္ မ်က္စိေနာက္စရာ output နဲ႕ျပပါတယ္။ လိုခ်င္တာေလးျပန္ ျဖတ္ၾကည့္ရတယ္။
ဒါမွ လိုခ်င္တာေလးျပတယ္။
Memory speed ကေတာ့ memorychip ထဲမွာပါ။
ဒါမွမဟုတ္ပဲ တျခားဘာေတြရွိေသးလည္းၾကည့္ခ်င္ရင္ ေနာက္က get speed ျဖဳတ္႐ိုက္ေပါ့။ အဲ Memory capacity က်ေတာ့ memphysical ထဲမွာ ။
ဆိုရင္ maximum capacity ျပျပီး ၊
ဆိုရင္ slot ဘယ္နခုရွိလည္း ျပပါတယ္။
WMIC က hardware info retrieve လုပ္ဖို႕ေလာက္ လုပ္ထားတာမဟုတ္ပဲ current system ရဲ့ info ေတာ္ေတာ္မ်ားမ်ား process info ေတြ ၊ partition table ေတြပါၾကည့္လို႕ရပါတယ္။ WMIC အေၾကာင္းထပ္သိခ်င္ေသးရင္ ဒီ link မွာ ရွိပါေသးတယ္။ အေသးစိတ္ကေတာ့ Google ကရွာျပီး Microsoft technet article သာရွာဖတ္ၾကည့္ေပါ့။
Divinity
Linux မွာေတာ့ dmidecode command က ေတာ္ေတာ္အသုံးဝင္ပါတယ္။
Serial number ေလာက္ျပန္ၾကည့္ခ်င္တာဆို
# dmidecode --type 1
လို႕႐ိုက္လိုက္ရင္ Chassis က serial number ကိုျပေပးပါတယ္။ Memory slot ေတြနဲ႕ ပတ္သက္တယ့္ information က type 16 ျဖစ္ေလ့ရွိပါတယ္။ Slot အေရအတြက္နဲ႕ Max capacity ျပပါလိမ့္မယ္။ အခုလက္ရွိတပ္ထားတယ့္ memory ကိုၾကည့္ခ်င္ရင္ေတာ့ Server အဖုံးဖြင့္ၾကည့္ရပါတယ္။ အခုလက္ရွိ တပ္ထားတယ့္ memory ရဲ့ information ေလာက္ပဲၾကည့္ခ်င္ရင္ေတာ့ 'dmidecode --type 17' ဆိုရင္ရပါတယ္။ DDR အမ်ိဳးအစားနဲ႕ speed ကိုျပပါလိမ့္မယ္။
Type နံပါတ္မေသခ်ာရင္လည္း dmidecode ရဲ့ output တစ္ခုလုံးကို output pipe နဲ႕ more ဒါမွမဟုတ္ less ဆိုျပီး ၾကည့္ရင္လည္းရပါတယ္။ Output ကရွင္းပါတယ္ ၊ လိုတယ့္ information ကိုရွာလို႕ လြယ္ပါတယ္။ ဒါဆို command က ဒါမ်ိဳးေပါ့။
# dmidecode | less
Linux ရဲ့ dmidecode ကေတာ့ hardware info ကိုပဲ အဓိကျပပါတယ္။
Windows မွာဆိုရင္ေတာ့ wmic ဆိုတယ့္ command တစ္ခု ပါပါတယ္။ Windows Management Instrumentation ေပၚမွာ အေျခခံထားတယ့္ command ပါ။ wmic command output ကရွုပ္လို႕ တစ္ခါမွ လိုက္မၾကည့္ဖူးပါဘူး။ လိုတာပဲမွတ္ထားမိတယ္။ ဒါေပမယ့္ သူကေတာ့ ပိုျပီး information မ်ားမ်ား retrieve လုပ္ႏိုင္ပါတယ္။
Serial number ကေတာ့ BIOS မွာရွိပါတယ္ ။
> wmic bios
ဆိုရင္ မ်က္စိေနာက္စရာ output နဲ႕ျပပါတယ္။ လိုခ်င္တာေလးျပန္ ျဖတ္ၾကည့္ရတယ္။
> wmic bios get serialnumber
ဒါမွ လိုခ်င္တာေလးျပတယ္။
Memory speed ကေတာ့ memorychip ထဲမွာပါ။
> wmic memorychip get speed
ဒါမွမဟုတ္ပဲ တျခားဘာေတြရွိေသးလည္းၾကည့္ခ်င္ရင္ ေနာက္က get speed ျဖဳတ္႐ိုက္ေပါ့။ အဲ Memory capacity က်ေတာ့ memphysical ထဲမွာ ။
>wmic memphysical get maxcapacity
ဆိုရင္ maximum capacity ျပျပီး ၊
>wmic memphysical get memorydevices
ဆိုရင္ slot ဘယ္နခုရွိလည္း ျပပါတယ္။
WMIC က hardware info retrieve လုပ္ဖို႕ေလာက္ လုပ္ထားတာမဟုတ္ပဲ current system ရဲ့ info ေတာ္ေတာ္မ်ားမ်ား process info ေတြ ၊ partition table ေတြပါၾကည့္လို႕ရပါတယ္။ WMIC အေၾကာင္းထပ္သိခ်င္ေသးရင္ ဒီ link မွာ ရွိပါေသးတယ္။ အေသးစိတ္ကေတာ့ Google ကရွာျပီး Microsoft technet article သာရွာဖတ္ၾကည့္ေပါ့။
http://www.robvanderwoude.com/ntadmincommands.phpအသုံးတဲ့မယ္ထင္ပါတယ္။ မတဲ့လည္း သုံးၾကည့္ေပါ့ ။ :D
Divinity
Wednesday, April 27, 2011
Religion : Googlism
Google သာမရွိရင္ က်ေနာ္တို႕ engineer ျဖစ္ပါ့မလား ? Google သာမရွိရင္ က်ေနာ္လည္း mechanical engineer ပဲလုပ္ျဖစ္မယ္ထင္တယ္။ အခုလို IT ျဖစ္လာမွာမဟုတ္ဖူး။ က်ေနာ္တို႕ အတြက္ Google က ဘဝပဲ ဟဲဟဲ။ ဒါလည္း ေျပာရရင္ေတာ့ မေကာင္းဘူး။ က်ေနာ္တို႕ မွတ္ဉာဏ္ထက္ Google docs ေတြ Google bookmarks ေတြ ကိုပိုအားကိုးလာရင္ မေကာင္းဘူးလို႕ထင္တာပဲ။ အတိုင္းအတာ တစ္ခုထိ သုံးရေပမယ့္ ဒီေပၚမွာပဲ depends မလုပ္မိသင့္ပါဘူး။ က်ေနာ္ဒီေန႕ MySQL cluster setup လုပ္ျဖစ္လို႕ က်ေနာ္ရဲ့ ပထမဆုံး setup လုပ္ျဖစ္တယ့္ အေတြ႕အၾကံုနဲ႕ ျပန္ယွဥ္စဥ္းစားမိပါတယ္။
က်ေနာ္တို႕ ဒီက Telecom တစ္ခုအတြက္ application တစ္ခု setup လုပ္တုန္းကပါ၊ က်ေနာ္က servers setup လုပ္ရပါတယ္။ Solaris 8 ေပၚမွာ။ သူတို႕ server ေတြထားတယ့္ server room ေတြမွာ က်ေနာ္တို႕အတြက္ internet access မရွိပါဘူး။ အဲ server ကိုတိုင္လည္း IP က approve မျဖစ္ေသးလို႕ link activate မျဖစ္ေသးပါဘူး။ အဲေတာ့ ေျပာရင္ ဘာ network connection မွမရွိပါဘူး။ Documentation ျပင္ဆင္သြားေပမယ့္ ရွန္းတတ္တယ့္က်ေနာ္ documentation မွာအဆင့္ေက်ာ္သြားပါတယ္။ ရွာစရာ internet လည္းမရွိဘူး။ အဲတုန္းက iphone မေပၚေသးဘူး။ :D Windows mobile မေကာင္းေၾကာင္းကေတာ့ က်ေနာ္မေျပာေတာ့ဘူး။ က်ေနာ္တို႕မွာ internet ကေန ရွာဖို႕ phone မွာရွာ လိုက္ဖတ္ ၊ ေနာက္မွ က်ေနာ္ အဆင့္ေက်ာ္သြားတာမွန္းသိတယ္။ အဲတုန္းကဘာပဲလိုလို Google မွာရွာ ေတြ႕တယ့္ အတိုင္းလုပ္လိုက္တာပဲ။ ရရင္ရ ၊ မရရင္ ဆက္ရွာ။ ဒါပဲလုပ္တတ္တယ္။ အဲဒါကိုပဲ လုပ္တတ္ေနျပီလို႕ ကိုယ့္ဟာကို ထင္တာ။ Internet မရွိတယ့္ ေနရာမွာ အလုပ္လုပ္ဖူးျပီးမွ ငါေတာ္ေတာ္လိုေသးတယ္လို႕ သိတာ။ ဒါေတာင္ compilation မလုပ္ရလို႕။
Internet က ေလ့လာၾကတာ အလြန္ေကာင္းေပမယ့္ internet ရွိမွ ျဖစ္ရင္ေတာ့ မေကာင္းဘူး။ Howto ေတြရွာၾကရင္လည္း ဘာေၾကာင့္ ဒီ howto မွာ ဒီလို လုပ္သလည္းဆိုတာကို ေလ့လာဖို႕ သိပ္မလုပ္ၾကဖူး။ Ubuntu howto ကို Fedora ေပၚမွာ ျပန္အသုံးမခ်ႏိုင္တယ့္ linux ဆရာေတြ ေတြ႕ဖူးပါတယ္။ ဒီ command ကရွိမွ မရွိတာ ဆိုျပီး fedora version howto ရေအာင္ လိုက္ရွာတာမ်ိဳး။ ေနာက္ေတာ့ က်ေနာ္ README file ေတြ ဖတ္ျဖစ္လာတယ္။ ဘာပဲ compile လုပ္လုပ္ README အရင္ဖတ္တယ္။ ျပီးမွ internet မွာရွာတယ္။ ဒါလည္း reference အေနနဲ႕ပါ။ Linux မွာ source file ေတြမွာပါတယ့္ text file ေတြမွာ compilation / installation အတြက္ ရွင္းျပထားတာမ်ိဳး ပါေလ့ရွိပါတယ္။ က်ေနာ္လည္း ေနာက္မွေတြ႕တယ္။ MySQL source file ထဲမွာ INSTALL-BINARY ဆိုတယ့္ file တစ္ခုမွာ အဆင့္လိုက္ရွင္းျပထားပါတယ္။ အဲတုန္းကေတာ့ 20C temperature အခန္းထဲ ေခြၽးေတြပ်ံလို႕။
အျမဲတန္း အလုပ္ျဖစ္သြားရုံထက္ explore လုပ္ၾကည့္ပါ အမွားမရွိပါဘူး။ ဒီလို စကားမ်ိဳး Zero ေရးတယ့္ post ေတြမွာ ပါေလ့ရွိပါတယ္။ တစ္ခုကို ေကာင္းေကာင္းနားလည္ထားရင္ မသိေသးတာတစ္ခုကို ရွာေဖြဖတ္ရင္လည္း နားလည္လြယ္ပါတယ္။ Google က က်ေနာ္တို႕ရဲ့ ကိုးကြယ္ရာ မဟုတ္ပဲ ခိုင္းစားရုံေလာက္ပဲ ခိုင္းစားၾကရေအာင္။
Divinity
က်ေနာ္တို႕ ဒီက Telecom တစ္ခုအတြက္ application တစ္ခု setup လုပ္တုန္းကပါ၊ က်ေနာ္က servers setup လုပ္ရပါတယ္။ Solaris 8 ေပၚမွာ။ သူတို႕ server ေတြထားတယ့္ server room ေတြမွာ က်ေနာ္တို႕အတြက္ internet access မရွိပါဘူး။ အဲ server ကိုတိုင္လည္း IP က approve မျဖစ္ေသးလို႕ link activate မျဖစ္ေသးပါဘူး။ အဲေတာ့ ေျပာရင္ ဘာ network connection မွမရွိပါဘူး။ Documentation ျပင္ဆင္သြားေပမယ့္ ရွန္းတတ္တယ့္က်ေနာ္ documentation မွာအဆင့္ေက်ာ္သြားပါတယ္။ ရွာစရာ internet လည္းမရွိဘူး။ အဲတုန္းက iphone မေပၚေသးဘူး။ :D Windows mobile မေကာင္းေၾကာင္းကေတာ့ က်ေနာ္မေျပာေတာ့ဘူး။ က်ေနာ္တို႕မွာ internet ကေန ရွာဖို႕ phone မွာရွာ လိုက္ဖတ္ ၊ ေနာက္မွ က်ေနာ္ အဆင့္ေက်ာ္သြားတာမွန္းသိတယ္။ အဲတုန္းကဘာပဲလိုလို Google မွာရွာ ေတြ႕တယ့္ အတိုင္းလုပ္လိုက္တာပဲ။ ရရင္ရ ၊ မရရင္ ဆက္ရွာ။ ဒါပဲလုပ္တတ္တယ္။ အဲဒါကိုပဲ လုပ္တတ္ေနျပီလို႕ ကိုယ့္ဟာကို ထင္တာ။ Internet မရွိတယ့္ ေနရာမွာ အလုပ္လုပ္ဖူးျပီးမွ ငါေတာ္ေတာ္လိုေသးတယ္လို႕ သိတာ။ ဒါေတာင္ compilation မလုပ္ရလို႕။
Internet က ေလ့လာၾကတာ အလြန္ေကာင္းေပမယ့္ internet ရွိမွ ျဖစ္ရင္ေတာ့ မေကာင္းဘူး။ Howto ေတြရွာၾကရင္လည္း ဘာေၾကာင့္ ဒီ howto မွာ ဒီလို လုပ္သလည္းဆိုတာကို ေလ့လာဖို႕ သိပ္မလုပ္ၾကဖူး။ Ubuntu howto ကို Fedora ေပၚမွာ ျပန္အသုံးမခ်ႏိုင္တယ့္ linux ဆရာေတြ ေတြ႕ဖူးပါတယ္။ ဒီ command ကရွိမွ မရွိတာ ဆိုျပီး fedora version howto ရေအာင္ လိုက္ရွာတာမ်ိဳး။ ေနာက္ေတာ့ က်ေနာ္ README file ေတြ ဖတ္ျဖစ္လာတယ္။ ဘာပဲ compile လုပ္လုပ္ README အရင္ဖတ္တယ္။ ျပီးမွ internet မွာရွာတယ္။ ဒါလည္း reference အေနနဲ႕ပါ။ Linux မွာ source file ေတြမွာပါတယ့္ text file ေတြမွာ compilation / installation အတြက္ ရွင္းျပထားတာမ်ိဳး ပါေလ့ရွိပါတယ္။ က်ေနာ္လည္း ေနာက္မွေတြ႕တယ္။ MySQL source file ထဲမွာ INSTALL-BINARY ဆိုတယ့္ file တစ္ခုမွာ အဆင့္လိုက္ရွင္းျပထားပါတယ္။ အဲတုန္းကေတာ့ 20C temperature အခန္းထဲ ေခြၽးေတြပ်ံလို႕။
အျမဲတန္း အလုပ္ျဖစ္သြားရုံထက္ explore လုပ္ၾကည့္ပါ အမွားမရွိပါဘူး။ ဒီလို စကားမ်ိဳး Zero ေရးတယ့္ post ေတြမွာ ပါေလ့ရွိပါတယ္။ တစ္ခုကို ေကာင္းေကာင္းနားလည္ထားရင္ မသိေသးတာတစ္ခုကို ရွာေဖြဖတ္ရင္လည္း နားလည္လြယ္ပါတယ္။ Google က က်ေနာ္တို႕ရဲ့ ကိုးကြယ္ရာ မဟုတ္ပဲ ခိုင္းစားရုံေလာက္ပဲ ခိုင္းစားၾကရေအာင္။
Divinity
Note : က်ေနာ္ MySQL cluster setup လုပ္ရင္း စဥ္းစားမိတာ ေရးလိုက္တာပါ။ MySQL cluster setup ကေတာ့ ဆက္ပါအုန္းမယ္။ MySQL cluster အတြက္ လိုအပ္တယ့္ ndbd က CentOS repo ထဲမွာ မရွိပါဘူး။ Mysql-max က Redhat မွာ enterprise subscriber ေတြအတြက္ပဲရွိပါတယ္။ အျပင္ rpm ကို download မွာထက္ေတာ့ MySQL site က tgz ေလး download ျပီး ကိုယ့္ဟာကို setup လုပ္တာ က်ေနာ့္အတြက္ ပို အဆင္ေျပပါတယ္။ ဒီည game မေဆာ့ျဖစ္ရင္ mysql cluster ေရးပါအုန္းမယ္။ :D
Tuesday, April 19, 2011
VMware vCenter Converter
http://www.vmware.com/products/converter/
Go green ဖို႕ လက္ရွိသုံးေနတယ့္ server ေတြကို Virtualize လုပ္ခ်င္တယ္။ ခက္တာက Downtime မရွိခ်င္ဘူး ။
Server ေသးေသးေလးေတြ အမ်ားၾကီး run ရတာ မီတာကုန္တယ္၊ အားလုံးကို ေပါင္းျပစ္ခ်င္တာ။
ျဖစ္ပါတယ္။ က်ေနာ့္အတြက္ အသုံးအတဲ့ဆုံး ျဖစ္ေနတယ့္ tools တစ္ခုပါ။ အဓိက သုံးျဖစ္တယ့္ အေၾကာင္းရင္းက Power on machine တစ္ခု၊ actual server တစ္ခုကို ၊ downtime မလိုပဲ VMware server image အျဖစ္ ေျပာင္းေပးႏိုင္လို႕ပါ။ ေျပာင္းတယ့္အခါမွာလည္း လိုအပ္ရင္ disk space ကိုျခံု႕လို႕ရပါတယ္။ Spec ကိုျပန္ configure လုပ္လို႕ရပါတယ္။
အရင္က office မွာ project ေတြျပီးသြားရင္ Code ေတြ Data ေတြ backup လုပ္သလို တစ္ခ်ိဳ႕ project မွာက် သုံးခဲ့တယ့္ HDD ကိုသိမ္းထားပါတယ္။ လိုအပ္ရင္ demo ျပန္ျပဖို႕ပါ။ ျပန္ setup မလုပ္ရပဲ လိုအပ္ရင္ ခ်က္ျခင္း ျပန္ run ျပႏိုင္ေအာင္လို႕။ အဲေတာ့ က်ေနာ္မွာ အျမဲတမ္း Hard disk ေတြအပိုကုန္တယ္။ ေနာက္ေတာ့ အဲ HDD ေတြအကုန္ VM image ေျပာင္းျပစ္လိုက္တယ္။ Storage ေပၚကို အကုန္ပို႕ထားလိုက္တယ္။ ေနာက္ျပီး office ထဲမွာ ဘယ္တုန္းကတည္းက run ထားမွန္းမသိတယ့္ P3 server ေတြရွိပါတယ္။ အလကား power ကုန္ heat တက္ပါတယ္။ အဲေကာင္ေတြ အကုန္လုံးလည္း ESXi တစ္လုံး setup ျပီး အကုန္ေျပာင္းလိုက္တယ္။ Server ခန္းထဲက desktop အားလုံး လႊင့္ျပစ္ေရးၾကိဳးစားမႈမွာ ဒီ tool က ေတာ္ေတာ္ အေထာက္အကူျဖစ္ပါတယ္။ တစ္ခါတစ္ေလ UAT မွာ အားလုံးေကာင္းျပီး Production က်မွ ျဖစ္ေနတာဆိုတယ့္ ခက္ဆိုးဆိုး bug မ်ိဳးကို troubleshoot ဖို႕လည္း Production environment ကို downtime မရွိပဲ clone ပြါးလို႕ရပါတယ္။
က်ေနာ္လို႕ မၾကာမၾကာ server ေတြ format ခ် development အတြက္ ျပင္ဆင္ေပး၊ ျပီးရင္ ျပန္ format လုပ္ သံသရာလည္သူေတြအတြက္ VMware product ေတြက ေတာ္ေတာ္အဆင္ေျပပါတယ္။ အလကားလည္း ရပါတယ္။ ပ်င္းပ်င္းရွိရင္ အခု ဒီ blog ကိုဖတ္ေနတယ့္ computer / laptop ကို VM image အျဖစ္ ေျပာင္းၾကည့္ပါလား။ သူ႕ wizard ေလးအတိုင္း လိုတယ့္ username / password ေလးျဖည့္ျပီး next next သြားရုံပါပဲ။ လြယ္ပါတယ္။ :D
Divinity
Thursday, July 22, 2010
RAID is not *Backup*
Well,I've heard of this since a few years back. It could never protect from Human errors, e.g, mistakenly issued a DROP database command. :)
Some people believe RAID 1 could save them from the risk of data looses due to hardware failure since they have 2 copies of every things. That's partially true. RAID 1 could save you from data looses due to 'a hard drive failure', not any of hardware failure. In a RAID 1 system, it includes 2 hard drives minimum ( could be 3 with a hot-spare) and a RAID controller card. Everything on a primary HDD is mirrored across on secondary one. So even if the primary HDD is failed, we could still continue our business since every bits of data are still exist on the secondary HDD. Probability of failing both HDDs at the same time is a very rare chance, approximately 0.01% chances only. Looks promising, right ?
But as I've said above, RAID controllers are involved in RAID systems and they play the main role in it. In most cases, when a RAID controller fails, it might make some improper I/O onto the hard drives which can bring your system into file system corruption. The chances of failing RAID controller is a bit high if we are dealing with integrated raid cards. Dedicated RAID controllers are much better in this case.
...................................
I've had this problem one time a year ago on Windows System running on RAID 5. It makes my system hang and gives BSOD on next reboot ( still BSOD even on the other known good machines). At that time I got a few luck to copy out all data using a Linux Live CD and it was a development server which is not too critical.
Just in a few days ago, one of our client gives us a call and says their payment gateway system is not accessible. What a generic report from a user 'not accessible' with no specific details. I could browse to their admin web UI and ssh in and looks around. But when i tried to create a file using 'touch' I got an error. Well, this's it. Initially, I was totally clam as I know this system is running on 2 mirrored HDDs. If a HDD fails, I can just swap it with a new HDD and bingo. That is what I've in my mind while travelling down to data center.
But it was not that fortunate. I was surprised to see both HDD having the same IO issue. Magic fsck could not help me this time. Try those HDDs with another spare identical machine, Kernel panic. I whispers "that's good. you give me something interesting bullsh*t for today". By running ServeRAID on the problematic machine, I could see it can't detect the HDDs all the the time even to the new HDD I just brought from office. Only thing I can do is I can backup databases and some data from linux rescue mode. Yes, some lib directories are not even browsable at this point.
I've left with no choice but to prepare a new server to replace. This existing system has self compiled Apache and some modules, including openssl and some libraries which supports TLS. It's not a difficult things, but it takes time. It's 11pm already when I started installing a new server. Well, that's an almost overnight working day.
...................................
When a RAID controller's gone, it has a chance all your data could be gone/corrupted too. So backup is a 'must' even if you are running on RAID 50. Be planned, be prepared.
Divinity
Some people believe RAID 1 could save them from the risk of data looses due to hardware failure since they have 2 copies of every things. That's partially true. RAID 1 could save you from data looses due to 'a hard drive failure', not any of hardware failure. In a RAID 1 system, it includes 2 hard drives minimum ( could be 3 with a hot-spare) and a RAID controller card. Everything on a primary HDD is mirrored across on secondary one. So even if the primary HDD is failed, we could still continue our business since every bits of data are still exist on the secondary HDD. Probability of failing both HDDs at the same time is a very rare chance, approximately 0.01% chances only. Looks promising, right ?
But as I've said above, RAID controllers are involved in RAID systems and they play the main role in it. In most cases, when a RAID controller fails, it might make some improper I/O onto the hard drives which can bring your system into file system corruption. The chances of failing RAID controller is a bit high if we are dealing with integrated raid cards. Dedicated RAID controllers are much better in this case.
...................................
I've had this problem one time a year ago on Windows System running on RAID 5. It makes my system hang and gives BSOD on next reboot ( still BSOD even on the other known good machines). At that time I got a few luck to copy out all data using a Linux Live CD and it was a development server which is not too critical.
Just in a few days ago, one of our client gives us a call and says their payment gateway system is not accessible. What a generic report from a user 'not accessible' with no specific details. I could browse to their admin web UI and ssh in and looks around. But when i tried to create a file using 'touch' I got an error. Well, this's it. Initially, I was totally clam as I know this system is running on 2 mirrored HDDs. If a HDD fails, I can just swap it with a new HDD and bingo. That is what I've in my mind while travelling down to data center.
But it was not that fortunate. I was surprised to see both HDD having the same IO issue. Magic fsck could not help me this time. Try those HDDs with another spare identical machine, Kernel panic. I whispers "that's good. you give me something interesting bullsh*t for today". By running ServeRAID on the problematic machine, I could see it can't detect the HDDs all the the time even to the new HDD I just brought from office. Only thing I can do is I can backup databases and some data from linux rescue mode. Yes, some lib directories are not even browsable at this point.
I've left with no choice but to prepare a new server to replace. This existing system has self compiled Apache and some modules, including openssl and some libraries which supports TLS. It's not a difficult things, but it takes time. It's 11pm already when I started installing a new server. Well, that's an almost overnight working day.
...................................
When a RAID controller's gone, it has a chance all your data could be gone/corrupted too. So backup is a 'must' even if you are running on RAID 50. Be planned, be prepared.
Divinity
Thursday, March 18, 2010
NTFS Filesystem support on Linux
Ubuntu တို႕ Fedora တို႕မွာေတာ့ NTFS support က အစကတည္းကပါလာလိမ့္ရွိပါတယ္။ ဒါေတာင္တခါတစ္ေလၾက read ပဲရျပီး write မရပဲျဖစ္တက္ေသးတယ္။ က်ေနာ္က CentOS အသုံးမ်ားေတာ့ CentOS မွာက NTFS write support မပါတက္ဖူး။ Kernel recompile ရင္ေတာ့ရေပမယ့္ NTFS write ေလးရဖို႕ kernel ေတာ့ recompile မလုပ္ခ်င္ဖူး။ NTFS read/write ရေအာင္ NTFS-3G ဆိုတယ့္ FS module ရွိတယ္။ RPMforge repository မွာရွိပါတယ္။ လြယ္လြယ္ကူကူ အဲဒါေလးပဲ install လိုက္တာေကာင္းပါတယ္။
အရင္ဆုံး rpm-forge repo ကို yum repo ထဲမွာထဲ့ဖို႕လိုပါတယ္။ ဒါမွ yum နဲ႕ install လုပ္ရင္ သူ႕ဟာသူ dependency resolving လုပ္သြားမွာ။ မဟုတ္ရင္ ကိုယ့္ဟာကိုယ္ dependency ေတြ install ေနရမယ္။ CentOS လို႕ယူဆျပီးပဲ ေျပာပါမယ္။ ဒါေပမယ့္ RPM အလုပ္လုပ္တယ့္ Linux တိုင္းမွာ ရမွာပါ။
1. rpmforge rpm ေလးအရင္ download မယ္။ (wget ကေတာ့ ရွိျပီးသားလို႕ ယူဆလိုက္ပါတယ္။ မရွိရင္ေတာ့ wget အရင္ သြင္းပါ။)
2. GPG key import လုပ္မယ္။ မဟုတ္ရင္ RPM ကို install လုပ္လို႕မရပဲျဖစ္ေနပါလိမ့္မယ္။ 3rd party RPM ျဖစ္ေနလို႕ပါ
3. RPM ကိုအရင္စစ္
4. RPMforge repo install လုပ္မယ္
ဒီလို လုပ္လိုက္ျခင္းအားျဖင့္ ေနာက္ install လုပ္တိုင္း CentOS repo က တင္မဟုတ္ပဲ RPMforge repo ကပါ package ေတြကိုရွာပါလိမ့္မယ္။
5. RPMforge repo မွာရွိတယ့္ package ေတြရဲ့ list ကို အရင္ build လုပ္ရပါအုန္းမယ္။
6. Kernel version ေလး တစ္ခ်က္ ၾကည့္ရေအာင္။ ဒါအေရးၾကီးပါတယ္။ Kernel version နဲ႕ kernel-devel version က တူဖို႕လိုပါတယ္
7. Kernel-devel install လုပ္မယ္။
တကယ္လို႕ Kernel devel နဲ႕ Kernel နဲ႕ version မတူရင္ kernel ပါျပန္ install လုပ္ျပီး restart တစ္ခါခ်ရပါလိမ့္မယ္။ Kernel အသစ္နဲ႕ boot လုပ္ျပီးမွ က်န္တာ ဆက္လုပ္ပါ။
8. လိုအပ္တယ့္ Package ေတြကို တစ္ခါထဲ install လုပ္ရေအာင္
9. NTFS partition ကို Linux ေပၚမွာ mount လို႕ရပါျပီ
Mount point ကေတာ့ ကိုၾကိဳက္ရာနဲ႕ အစားထိုးေပါ့။ အစကတည္းက ၾကိဳျပီး create မထားရင္လည္း အခု create လို႕ရပါတယ္။ Windows partitions ကိုမသိရင္ေတာ့ fdisk နဲ႕ၾကည့္ပါ။
ၾကလာတယ့္ table ထဲက NTFS file system နဲ႕ partition ကိုမွတ္ထား။ ဆိုၾကပါေတာ့ /dev/hda2 ဆိုရင္ အေပၚက /windows-partition ေနရာမွာ /dev/hda2 ကို အစားထိုးလိုက္ပါ။ စမ္းၾကည့္ပါ အဆင္ေျပမွာပါ။
Divinity
အရင္ဆုံး rpm-forge repo ကို yum repo ထဲမွာထဲ့ဖို႕လိုပါတယ္။ ဒါမွ yum နဲ႕ install လုပ္ရင္ သူ႕ဟာသူ dependency resolving လုပ္သြားမွာ။ မဟုတ္ရင္ ကိုယ့္ဟာကိုယ္ dependency ေတြ install ေနရမယ္။ CentOS လို႕ယူဆျပီးပဲ ေျပာပါမယ္။ ဒါေပမယ့္ RPM အလုပ္လုပ္တယ့္ Linux တိုင္းမွာ ရမွာပါ။
1. rpmforge rpm ေလးအရင္ download မယ္။ (wget ကေတာ့ ရွိျပီးသားလို႕ ယူဆလိုက္ပါတယ္။ မရွိရင္ေတာ့ wget အရင္ သြင္းပါ။)
#wget http://apt.sw.be/redhat/el5/en/i386/RPMS.dag/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
2. GPG key import လုပ္မယ္။ မဟုတ္ရင္ RPM ကို install လုပ္လို႕မရပဲျဖစ္ေနပါလိမ့္မယ္။ 3rd party RPM ျဖစ္ေနလို႕ပါ
#rpm --import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt
3. RPM ကိုအရင္စစ္
#rpm -K rpmforge-release-0.3.6-1.el5.rf.i386.rpm
4. RPMforge repo install လုပ္မယ္
#rpm -i rpmforge-release-0.3.6-1.el5.rf.i386.rpm
ဒီလို လုပ္လိုက္ျခင္းအားျဖင့္ ေနာက္ install လုပ္တိုင္း CentOS repo က တင္မဟုတ္ပဲ RPMforge repo ကပါ package ေတြကိုရွာပါလိမ့္မယ္။
5. RPMforge repo မွာရွိတယ့္ package ေတြရဲ့ list ကို အရင္ build လုပ္ရပါအုန္းမယ္။
#yum check-update
6. Kernel version ေလး တစ္ခ်က္ ၾကည့္ရေအာင္။ ဒါအေရးၾကီးပါတယ္။ Kernel version နဲ႕ kernel-devel version က တူဖို႕လိုပါတယ္
#uname -r
7. Kernel-devel install လုပ္မယ္။
#yum install kernel-devel
တကယ္လို႕ Kernel devel နဲ႕ Kernel နဲ႕ version မတူရင္ kernel ပါျပန္ install လုပ္ျပီး restart တစ္ခါခ်ရပါလိမ့္မယ္။ Kernel အသစ္နဲ႕ boot လုပ္ျပီးမွ က်န္တာ ဆက္လုပ္ပါ။
8. လိုအပ္တယ့္ Package ေတြကို တစ္ခါထဲ install လုပ္ရေအာင္
#yum install fuse fuse-ntfs-3g dkms dkms-fuse
9. NTFS partition ကို Linux ေပၚမွာ mount လို႕ရပါျပီ
#mount -t ntfs-3g /mount_point /windows_partition
Mount point ကေတာ့ ကိုၾကိဳက္ရာနဲ႕ အစားထိုးေပါ့။ အစကတည္းက ၾကိဳျပီး create မထားရင္လည္း အခု create လို႕ရပါတယ္။ Windows partitions ကိုမသိရင္ေတာ့ fdisk နဲ႕ၾကည့္ပါ။
#fdisk -l
ၾကလာတယ့္ table ထဲက NTFS file system နဲ႕ partition ကိုမွတ္ထား။ ဆိုၾကပါေတာ့ /dev/hda2 ဆိုရင္ အေပၚက /windows-partition ေနရာမွာ /dev/hda2 ကို အစားထိုးလိုက္ပါ။ စမ္းၾကည့္ပါ အဆင္ေျပမွာပါ။
Divinity
Subscribe to:
Posts (Atom)