Planet OSCC Alumni

March 16, 2010

Jaja

double celebration...

suka boss di apit dayang2 cun UKG..
hehe..hepi befday boss..
moga panjang umur + murah rezeki
and stay cool..
(boss mmg cool.. :))


joe malu2 nk tiup lilin dgn boss..
seb baik xmakan durian sebelum tuh..
hepi befday joe...
hadiah thn lps masih terpakai utk arini...


KPP LG bersama boss LG...



ni plak perpisahan legend ridha dan zizie...si drama queen ukg..
hahaha..zizie mmg suke drama..mengong mung..huhu..
di taman warisan..
makan mcm xmakan 2 minggu..hehehe


menci muke aku berminyak+gemuk..eiiii...camane nk kurus nie..
aduihlaa..apepun asal hepi dgn kawan2 makan sate 7 pun xpe..
(tibe2 lidi sate aku jd berbelas2...herannn...haha)


to all kawan2 UKG :
dimana pun anda berada..kita berada..
kita ttp bersaudara..
yg masih di UKG, marilah hadapi bersama
dengan senyuman dan ketabahan...hehe..
yg dah kuar UKG...
hamboi hamboi..sukelah korang kan.. :p
hahahahahah

by dazzling 948 (noreply@blogger.com) at March 16, 2010 01:20 PM

Haris

PDF Converter

PDF Converter

Im looking for a PDF converter in Linux specially in Linux Ubuntu that can do one particular thing. Convert the link to symlink that can be click in the pdf converter file. My search lead to tools that really usefull but not has function that I want.

(1) Gnome-print


In print dialog "Print To File"

(2) Using cups-pdf

Cups-pdf

Turn your Linux box into a PDF-making machine

For Ubuntu 9.04 I'm install cups-pdf from Synaptic Package Manager, search for cups-pdf. One problem, you need to create directory in your home directory called PDF. Example /home/haris/PDF (PDF capital letters)

ps. This bug already reported


(3) OpenOffice.org

$ unset DISPLAY
$ soffice -headless -accept="socket,host=127.0.0.1,port=8100;urp;" -nofirststartwizard

Extending OpenOffice.org: Turning OpenOffice.org into a document conversion tool.

jodconverter

(4) Others

pdftops by xpdf (used with cups)

by LinuxMalaysia (noreply@blogger.com) at March 16, 2010 12:30 PM

Abdullah

Dive into Java

Recently a friend of mine asked me to help him develop a small web application to be run on a tomcat server. So that would mean I have to develop the application using Java, which I have not used ever since my student days. But because the requirements were pretty small, I took up the challenge just for the opportunity to learn something new.

The system was meant to capture the answers of a questionnaire and calculate the score they got. Then display back the past scores. It's pretty small involving just CRUD and a small amount of business logic to calculate the scores. Could probably be done in a bit over an hour if using tools I'm already familiar with like CakePHP or Django. But with Java, it was a completely different story.

My experience with CakePHP when developing MyMeeting made me quite reluctant to ever not use a framework ever again. Unless it's just a small trial program to understand a new language, it's better to use a framework. In the framework usually there is already quite a lot of thought put into how things should be organised and what's the best way to achieve our goals. So you get the benefit of quite a lot of wisdom without having to go through acquiring it. So that was the first thing I did. I googled for a 'java framework' and BOOM. Despair. There was tons of them. So many I had no idea what to choose. So I started to search for reviews and comparisons. You basically can't read about Java framework without struts being mentioned. Tapestry was pretty popular too. But they all seemed to have quite a high learning curve and you read a lot about the DREAD of configuring xml files and all. Finally I tumbled on wicket. Reading reviews and presentations about it got me pretty excited. And when I started developing I realised this framework is just for the UI. It made it pretty easy to do quite ajaxy stuff, but there's nothing about database connection and stuff. And there was no tutorial on how to get CRUD even. So after more googling I finally found Databinder. It is basically using Wicket as UI framework and either Hibernate, ActiveObjects or Cayenne for the database abstraction and interaction. Alhamdullillah. With plenty of examples to copy and paste from (hey, I didn't have a lot of time okeh.. :P) , I was finally able to get simple CRUD working.

Of course by then I met with a lot of the things which made programming in Java a pain. The dependencies, all the declaration, putting in setters and getters for almost every variable. UGH!!!! But in the examples they showed how to set up your project to easily work in Eclipse. And I followed it. And now I understand why Java developers swear by their Eclipse IDE. It's way freaking cool. I mean want to put in all the setters and getters for every variable even though you've got around 50 of them? Forget about typing it, how about just right clicking on the file and choose 'source->generate getters and setters' and it will all be done for you. How cool is that? What's it? You just copied from one file to another a bunch of lines which declared types you've got to import? No problem. Eclipse will automatically copy the imports too if it's already resolved. It's way seriously cool. If only it had vim keybinding.. :P

Anyhow. That took most of my weekends recently but it was very well worth it. I'm not 100% comfortable with it yet, but at least now I can do dev in Java. And if someone was to read my resume and ask me do I know Java I won't have to answer 'Well.. I did a few assignments with it when I was a student'... :P So now the only languages I'd really really like to have a serious go at it is ruby (probably with Rails) and Lisp. Maybe the opportunity would present itself in the future. In the mean time, I still got to polish my Java-fu.

by noreply@blogger.com (Abdullah Zainul Abidin) at March 16, 2010 10:13 AM

Khairil

Network media status and settings

Network Switch Lights

Most of us now work with relatively large amounts of data, whether it be media or data. I've been on a Gigabit Ethernet switch now for a few years, because transferring data or virtual machine images of several gigabytes over the network is painfully slow at 100Mb/s (12.5MB/s max). If you see this limit when transferring files with GigE equipment and Cat5e/6 cables, chances are auto-negotiation is setting a conservative limit.

One usually thinks of wired connections as relatively plug and play, and that's true for the most part. Unfortunately, I found out recently, that at least on my Ubuntu Linux workstation, with cheap networking equipment such the RealTeks, the Lantecs and what not that you have at home, the defaults may set your media speed to 100Mb/s (Fast Ethernet) and not 1000Mb/s (Gigabit Ethernet).

These days you do not need to look at blinking lights to see if stuff is connected (usually).

Checking and Ethernet setting media status on Linux

sudo ethtool eth0 (or your ethernet device):

Settings for eth0:
    Supported ports: [ TP MII ]
    Supported link modes:   10baseT/Half 10baseT/Full
                            100baseT/Half 100baseT/Full
                            1000baseT/Half 1000baseT/Full
    Supports auto-negotiation: Yes
    Advertised link modes:  10baseT/Half 10baseT/Full
                            100baseT/Half 100baseT/Full
                            1000baseT/Half 1000baseT/Full
    Advertised auto-negotiation: Yes
    Speed: 1000Mb/s
    Duplex: Full
    Port: MII
    PHYAD: 0
    Transceiver: internal
    Auto-negotiation: on
    Supports Wake-on: pumbg
    Wake-on: g
    Current message level: 0x00000033 (51)
    Link detected: yes

You'll notice that Speed here is at 1000Mb/s. Initially it was at 100Mb/s by default on mine.

Setting it is rather straight forward, with speed defined in Mb/s:

sudo ethtool -s eth0 speed 1000

The man page for ethtool is actually friendly with examples, something that often isn't the case in Linux.

You probably want to set this as default on startup, in something like rc.local.

Checking and Ethernet setting media status on FreeBSD

ifconfig command on FreeBSD generally provides all this info for you:

re1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 7200
    options=389b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_UCAST,WOL_MCAST,WOL_MAGIC>
    ether 00:13:f7:3a:80:f3
    inet 192.168.1.1 netmask 0xffffff00 broadcast 192.168.1.255
    inet 10.1.1.1 netmask 0xffffff00 broadcast 10.1.1.255
    inet 10.1.1.2 netmask 0xffffffff broadcast 10.1.1.2
    inet 10.1.1.3 netmask 0xffffffff broadcast 10.1.1.3
    inet 10.1.1.4 netmask 0xffffffff broadcast 10.1.1.4
    inet 10.1.1.5 netmask 0xffffffff broadcast 10.1.1.5
    inet 10.1.1.6 netmask 0xffffffff broadcast 10.1.1.6
    inet 10.1.1.7 netmask 0xffffffff broadcast 10.1.1.7
    media: Ethernet autoselect (1000baseT <full-duplex>)
    status: active

No problems here, 1000baseT as default.

A bit of tuning and jumbo frames

More on jumbo frames (Wikipedia) and their benefits.

By default in this case I get an increase in speed from Fast Ethernet (~25MB/s), but you can tune things further. One of these is to enable jumbo frames. The default MTU is only 1500. Most of us at home are likely to be using some sort of RealTek card. Usually MTU of jumbo frames is 9000, but RealTek cards only support a max MTU of 7422. On Linux the max is 7200 and on FreeBSD 7422 for RealTek. So I set both at 7200.

Setting the MTU can be done graphically or via ifconfig on both operating systems.

Now I'm getting around 40MB/s which is about 330% increase in speed from initial default setting of 100Mb/s on Linux.

by kaeru at March 16, 2010 03:04 AM

March 15, 2010

Hisham

Logging your terminal activity

When typing on the terminal, sometimes we need to record what commands we have typed for later reference. Sure, we can simply copy the .bash_history file, but that file only shows what you have typed and not the result of the commands that you have typed. To do these kind of jobs, there are two applications that you can use:


1. script

To use script, simply run script before you start using your terminal

# script -f logfile.log

where -f is to flush output after each write, and logfile.log is the file to write whatever script has recorded.

After finish using script, simply type exit or logout to quit script


2. rootsh

Please install rootsh first if it is not installed. To use rootsh, run rootsh before start using your terminal similar to script

# rootsh -f logfile.log --no-syslog

where -f is to show which file will be used to record the session, in this case logfile.log and --no-syslog is to tell rootsh not to log to /var/log/messages. To quit from rootsh, type exit or logout. All the commands and output will be written to logfile.log.closed to show that rootsh has closed the session.

To view the output file of rootsh and script, more command can be used.


by blackorga (noreply@blogger.com) at March 15, 2010 10:10 AM

March 14, 2010

Jaja

gasing raju...

cuba sedaya upaya buat muke kiut di depan rumah
makcik pakai kaften kaler kuning ni...
dengan harapan die ada anak lelaki bujang yang ensem..
hahahaha.. 
walaupun hakikatnya mcm ilang kaki penatnye
menakluk bukit gasing itu..
(xdelah penat sgt cume part hopeless tu mmg hopeless sangat la..
 plusidung yg sroksrek nie..mmg xtahan..
tpi zil kalau idung aku dh ok..
nescaya kite boleh buat new record..bawah 1 jam ok?? heheheh)




muka puas dapat menuju puncak..
(series shit aku xtau mane puncak die...
sbb die xde view mcm broga
atau terisik atau perfume pagoda...hahaha)



muka puas no 2...
sila perhatikan kasut gadis berseluar hitam...
hehehehe



ni muka puas + hepi yg sebenar-benarnya..
yela..ade org tu turun laju siap menjerit2 nama raju..
nmpk sgtla yg mane major yg mane minor interestnye..
huhuhu..


turut excited di raju.. :))


terbaek dari raju!!!

by dazzling 948 (noreply@blogger.com) at March 14, 2010 11:31 PM

March 11, 2010

Jaja

yang dirindui.....


yang dirindui teh ais sharipah..
rasanya dah mcm 3 bulan kot tak minum...
di zaman2 kejatuhan yang sebulan tu mmg xjengah langsung la..
sebok bersedeh..huhuhu...
lgpun sebulan tu jugakla si sharipah ni nak renovate nye..
adehhh..xde time lain ke..
n sebulan tu jugakla futsal asyik kensel..
hmm...mcm malang bertimpa2..huhuhu...
lantas (wuhuu lantas tu...) malam ini..
dengan tekad tabah dan kentalnye abih futsal 915..
menapau teh ais sharipah secara solo..gigih nie..
kurang ais kurang manis...
perghhh bestnye...
TAPIIIIIIIIII
sungguh agak keji..HARGA TELAH MELONJAK NAIK!!
aku tgk menu die pun semua dah naik!!
average 50sen ke RM1...cehh..
sape suruh korang pasang airkon..ktrg xsuruh pun renovate 
pasang airkon..pastu saje je naik harga.. nk byr airkon la tu..hehe..
kitorang pemain2 futsal yg busuk ni xkesah pun la bang/kak
xde airkon..aishhh...xleh jadi nie..
kembalikan hak kami...cewahhh...
teh ais sharipah kini RM2.50!!!
TAPIIII..seb baik msih kelasss dan meletoppp!!!
fewwww...bestttt!!!
(xsedar diri batuk!!!)

by dazzling 948 (noreply@blogger.com) at March 11, 2010 11:20 PM

seman si transformer

for me transformasi adalah suatu proses evolusi, penambahbaikan yang berterusan yg lahir dari inisiatif dan kesedaran diri yg tinggi... ermmm bukan nk citer pasal transformasi sektor awam yg mampu duk buat tu ye.. ni cerita kedai kopi je..ttg seorang sahabat baek.. yg esok akan berangkat pergi menunaikan umrah... seriously, kalau saya tgk die mase die jadi anak buah saya dulu..hmmm..mmg tak terlintas dlm pikiran ni at the age of 29 ni die akan pegi umrah.. ya Allah..dulu dielah setan.. opsss xlah setan sangat.. mcm ali setan tulah.. nakal xhengat... melawan lak tu.. minum air bungkus sangkut tiang..(hahahaha) pastu mmg mcm xde hala tuju laa..(budak mampu yg kenal seman taulah die mcmane kan..heheh)  

tp sejak kawin mak aii.. mmg transformasi.. series seman..(opsss tersebut nama plak..) aku sgt kagum dgn ko.. mmg jelas perubahan2 positif dlm idup ko lepas ko kawin kecuali ko ttp suke ngata aku...hehe.. and sejak jadi ayah org ko laaaagi transform...huhu.. syabbass bette.. mmg ko boleh jadi idola kecil laa.. :p and siapa sangka, esok ko dah nak berangkat ke tanah suci.. sedangkan orang2 yg kite nmpk lebih baik.. lebih ade mase dpn dr ko (dulu laa) masih terkontang kanting.. hehehe.. contoh plg dekat, nihaaa x-superior ko nie.. camni lagi.. idup xde arah tuju lagi...huhuhu... tapi xpe man.. aku doakan ko dgn maz sekeluarga selamat menjalani ibadah and selamat pergi & kembali ke tanah air... :) jgn lupe doakan aku ok.. :) insya Allah satu hari nanti aku ikut jejak ko dgn azral nie... Insya Allah..mudah-mudahan dipermudahkan.. :) 

by dazzling 948 (noreply@blogger.com) at March 11, 2010 10:49 PM

Haris

VOIP Project Using Trixbox

Friends VOIP Project using Trixbox. He shared this document for comments and feedback If you have any interested about the VOIP project contact the author directly, organizer and leader of the project by email address sheikh1976@gmail.com


and


by LinuxMalaysia (noreply@blogger.com) at March 11, 2010 12:58 AM

March 09, 2010

Jaja

hari yang terang....

pagi td rasa mcm ade bob ku2 atas kepala.. rasa sangat xlarat dah... sungguh unstable.. tp 1 thing that i always kagum dgn diri sendiri adalah kerana saya tidak tahu marah/geram/sedeh/kecik ati/kecewa dgn lama... maybe sbb i know life worths more than that and i learnt a lot from experience and semua mistakes made before.. so i just decided to move on and malas la nk pk benda2 yg x best tuh kan.. lantakla..as i said b4 hidup ni mmg karma.. what goes around comes around.. so..mcm..biarlah... mak xkoser nk layan noqqq..nak fitnah ke ngata ke membusukkan mak ke,menikam mak ke.. mak xlayan tu semua noq...huhuhu..

but itu bukanlah story that i want to highlight arini... arini maybe hari ini dalam sejarah for me.. i fight for this silently for about a month.. i really wanted to gather all those big gun and make them listen to what i did here and support all the efforts been done.. sgt usaha utk make sure the top 1 dtg..and Alhamdulillah.. despite of her hectic schedule, die sudi luangkan masa...TQ Dr.. and all the jusa also sangat supportive..

and my presentation..adi kata bagus despite of tekak yg gatal giller and menahan batuk and hingus.. bukan nak puji diri sendiri..tp mampu has taught me alot la kot dr segi self confident and communication skills.. tq mampu juger.. :) it was going so well.. tot akan ada byk perdebatan dan hangat.. tp semua seems so supportive and bg komen2 membina untuk penambahbaikan..which is so mcm +ve.. and the moment my superior open his mouth.. i just could write to adi who sat next to me.. "sangat hebat en.A" and "kagum!!".. series sangat ada karisma, point yang teratur and sangat bernas... wahh...i adore la my boss.. :) tq juga boss kerana always bimbing kami and believing in us...

so, kesimpulannya.. hari2 dlm idup kita ni mmg mcm cuaca.. ade mendung ade hujan ade ribut petir ade panas terik dan ade banjir juge.. nak tak nak kite kene harungi jugak.. kitelah yg kene adapt dgn perubahan cuaca ni semua... kalau hujan pakailah payung.turn off astro (sbb xde siaran..hehehe)... kalau panas sangat pasang kipas sampai maximum and pakai sexy2 bile tido..hehehe.. tp idup ni putaran.. kite akan lalui setiap satu tuh sepanjang bernyawa.. saya sgt harap.. saya akan sentiasa cube jadi manusia yang boleh adapt.. akan sentiasa cuba jadi lebih baik... sbb kebaikan mcm magnet.. bila kita buat baik.. akan dtg kebaikan pada kita...walaupun bukan dr org yg kita buat baik tu.. mungkin dr org lain... :) tapi sesekali org balas buruk pada kita.. terima ajelah.. adelah hikmahnya.. or mebi karma jugak utk kite..huhuhu.. peace!!

by dazzling 948 (noreply@blogger.com) at March 09, 2010 06:51 PM

Nicholas

ThunderBird 2.0 Add-ons

Thunderbird 2.0 reached EOL Aug 2009 but Thunderbird 3.0 still does not have all the stuff and attractions for an upgrade, so here I am still using Thunderbird 2.0. What is Thunderbird?

Its an Email client, Calendering, Task and Contact Management. Allows access to Email accounts via POP or IMAP. It also supports GMail accounts, Unix mailbox and Newsgroup account access. A really great application to work with.

Some of the must have add-ons for my Thunderbird 2:
  1. Contacts Sidebar 0.7 - Allows me to forward VCards and access via F4 the addresses, copy and paste info of the VCard into email.
  2. Lightning 0.9 - The calendar and task Manager
  3. FG Printers 0.4.4 - Format printing if the calendars
  4. VCS Support 0.6.3.1 - Allows me to import/export VCS calendars
  5. Automatic Export 0.3.0 - Allows automatic backup of the calendars



Other optional add-on:
  1. Provider for Google Calendar
  2. Bidi Mail UI
  3. PGP
  4. ThunderbrowseLink
There is a great forum at MozillaZine for updates and help.

by noreply@blogger.com (Tboxmy) at March 09, 2010 03:34 PM

Jaja

harapan jaja....

harapan jaja minggu lepas...


isnin : puasa + badminton (7-9)
hmmm...puasa tidak...badminton yess...
selasa : puasa + jogging
tidak dapat buat ape2 kerana bz giller..balik pun 730..
rabu : jogging
yess...tercapai..
khamis : puasa + futsal (8-9)
futsal yesss...puasa tidak....

jumaat : jogging.
tak tercapai...huhuhu...


kan dah kata ambitious xsalah... atleast half tercapai...huhuhu.. tp skrg berat kepala spt ada Bob Ku2 atas kepala... demam dan rimas dan sesak dan pening dan rasa nk balik tido...tp xboleh.. petang ade meeting besooooo... aduihhhhh!!! mau rehatttt!!

by dazzling 948 (noreply@blogger.com) at March 09, 2010 09:41 AM

March 08, 2010

Khairil

Paper Collection

I follow some aspects of Getting Things Done (GTD) and one of the most important concepts for me is having a reliable mechanism for collecting new things that need some sort of action, and then filing into appropriate systems to manage and review. I only have two review systems, Trac and Datebk on my Palm phone.

If a task is not added to one of these systems, its unlikely to be reviewed, and likely to be forgotten.

I'm generally ok with getting a tasked filed for digital collections (email/Skype etc.). Palm on a phone has greatly helped in quickly dealing with filing phone related tasks such as text messages and calls. My paper collection mechanism sadly such as mail, has been woeful. It's been one two many times, in which I've missed due dates because it's hidden in a pile of stuff (stack of papers) and not reviewed.

Being sick for most of last week, creating a system and sorting out paper was a good mindless yet productive exercise.

Inbox Tray

http://farm5.static.flickr.com/4038/4388091487_458941bc16.jpg

I organized it into three simple trays:

Top
Stuff that has not been reviewed and filed into my review systems.
Middle
Stuff that has been reviewed and filed as a task. This means that this stack of paper isn't a mindless pile of stuff. When I do my review and management of tasks I'll get to one of these in right order of priority and urgency.
Bottom
Filing and archiving. There is a low priority file or archive task attached to them, just needs to be filed to relevant folder.

Transparent folders

http://farm3.static.flickr.com/2784/4396787507_c6453cd871.jpg

In the middle tray, pieces of paper often need to be grouped together. I refer to these as current project folders. Invoices with checks and receipts, contracts with amendments and so on. Transparent plastic folders are perfect for this task, as it's very easy to quickly put them in, and also see at glance what's in it (saves time on labeling). I use sticky notes within these folders for additional reference information.

When you're done with them, some like the one shown here, even have binding holes to easily file them into a proper binded folder.

http://farm5.static.flickr.com/4052/4388858440_f5b7ea1be3_m.jpg

Finally these plastic folders are a lot easier to deal with then binded folders when you need to pull them out and reference it quickly to take some action. You can easily pull them out of the tray, or have some sort of container within easy reach. The most important point here is that what is contained in these plastic folders and trays is not "stuff". Except for the top box, they're already organized in my trusted and often reviewed systems.

by kaeru at March 08, 2010 06:36 AM

Haris

Report For SCO 505 System Tuning

Report For SCO 505 System Tuning

Report summary for SCO 505 System tuning. A job that I had done on 10th and 14th December 2004. Share this for reference to others. I will write detail about each items and compare it with Linux commands.

The report

The system has been monitored on one day basis at approximately on 6 hours and below the finding:

a. Run the sar command to monitor memory utilization, CPU load and Hard disk cache and write buffer.

b. Checking the root file system / and found inadequate disk space for virtual disk buffer to spare for any spooling process like printing services.

c. Cheking the log files and log rotation as well as the cron (task scheduler) jobs.

d. Check the network LISTEN state to identify any unusable ports and services.

e. Check the backup on offline system and found the tape drive could not be read and suspected the tape drive malfunction and also likely the device may not perform fully functional on the task to write to the tape.

f. Prepare the backup for / and /etc and any configuration file for easy future recovery task.

Tuning and Improvement Done

1. System File Cleanup

dfspace

/var/adm
/var/spool

- Null log files and spool file which are not necessary

/tmp and /var/tmp to be checked for any large unnecessry file that exhausted the / root directory.

2. Processes

- Stop non used services and remove from auto startup

- it is recorded that previous service from 31 open port and services has been reduce to 18 ports and services.

3. Kernel Tuning (NBUF)

- change from current default 6652K to 268288K

- reason for kernel tuning (increase the buffer cache) to the recommendation of the physical memory, that likely reported by SCO Unix for better performance.

- Recompile the kernel

4. Installed the monitoring Utility Using SCO Skunware 98 CD

- Installed top (to view and monitor active process in text mode)

- Installed the sarcheck to monitor hardware performance

by LinuxMalaysia (noreply@blogger.com) at March 08, 2010 12:05 AM

March 05, 2010

Jaja

kompiussss

kompiusssss...
nak beli blackberry bold2 RM1850 ke
nak bayar student visa autsralia RM1550..
aduhhh...susahnyeeeee...huhuhu....



(do i have choice actually??? kekekekeke.... bengong jaja....)

by dazzling 948 (noreply@blogger.com) at March 05, 2010 11:06 AM

March 04, 2010

Nicholas

Linux driver in use

From a terminal window;

To view all device drivers and the module names
$ lspci -k

To view a specific device (e.g. 03:00)
$ lspci -vv -s 03:00

To view all the loaded modules (The letter 'K' is uppercase in Kernel)
$ lsmod
$ lspci -k |grep Kernel

by noreply@blogger.com (Tboxmy) at March 04, 2010 07:10 AM

Khairil

ZFS on FreeBSD and Benefits of Software RAID

This was an unplanned journal entry. I wasn't planning on an upgrade and update to my home server which runs on FreeBSD. Bad things seem to happen all at once, and soon after I got a nasty throat infection, my home server motherboard died. During installation of the motherboard one of the mirrored disks of the main file storage device failed. Time to make lemonade I guess.

A few lessons here:

  • Always have RAID-1 or RAID-5/RAID-Z, even for workstations. In this case, no priceless family photos or videos were lost. For workstations, you don't lose any time from work, and can grab a replacement disk later.
  • Software RAID is flexible for commodity hardware which often does not have 1 to 1 replacements at the shop a year or so after you bought it. You can usually just connect the old drives to a new motherboard, controller or another PC and it will just work. For desktop users, Fedora Linux you can do it via GUI during installation. Hopefully Ubuntu will have it too, as I think it's a good thing if it's easy for home users.
  • The RAID-1 of most motherboards works as it should, and you can disable the RAID setting and the drive(s) will still be easily accessible as a normal drive. As per the previous point, software RAID is recommended.

Time for ZFS

http://kaeru.my/journal/images/zfs-man.jpg

The two failures, conspired to forcing this upgraded setup earlier than anticipated. FreeBSD 7.1 had problems booting up on the MSI KA70VM as a PATA drive, forcing me to do a FreeBSD 8.0 binary upgrade from CD (totally trouble free I might add). Current best bang for the buck drives are 1TB and it's painful with UFS2. With ZFS production ready on 8.0, it's time for a modern storage layout.

ZFS Man (YouTube) is a funny and informative introduction to ZFS on FreeBSD.

These resources will get you going:

Some more tips here:

RAID-Z or Mirror?

Constantin Gonzalez has written an informative blog on this.

Your options are more space for cheaper (more space/drive) in a more inflexible setup (RAID-Z) or less space, with a more flexible and faster performance mirror setup. With 6 SATA ports, and the Antec P182 case having a 4 + 2 drive cage case, it makes more sense on commodity hardware to have a mirror setup where data loss is more of a factor than space.

Here is my list on why mirror makes more sense for commodity hardware:

  • I don't need that much space. I don't have large media requirements for critical shared data. None-critical data can also sit safely on my mirrored workstation drives.
  • You need boot disks, which should be mirrored. Curently I'm using 2 x 80GB PATA drives, but this won't be feaseable in near future. So that leaves you with 4 SATA ports.
  • Another SATA port is taken up by your DVDR drive
  • So you're left with 3 slots. With this amount, it doesn't make sense to run RAID-Z for me. Especially more so with the option to have 3-way mirror and swapping up larger drives to seamlessly upgrade your mirror. That makes sense on a household budget, where it's hard to justify buying 5 disks.
  • More drives = more heat and power usage = more noise.

Since commodity drives are likely to fail anyways, I grabbed a pair of the cheapest 1TB drives available which currently are the Samsung Spinpoint F1. Performance surprisingly was not bad for these drives.

Setting it up

This part blew me away.. ZFS rocks.

I find out that my two new drives are ad0 and ad1, with atacontrol list:

ATA channel 0:
    Master:  ad0 <SAMSUNG HD103UJ/1AA01118> SATA revision 2.x
    Slave:   ad1 <SAMSUNG HD103UJ/1AA01118> SATA revision 2.x
ATA channel 1:
    Master:  ad2 <ST380023A/3.33> ATA/ATAPI revision 6
    Slave:   ad3 <Maxtor 6L250R0/BAH41G10> ATA/ATAPI revision 7
ATA channel 2:
    Master:      no device present
    Slave:       no device present
ATA channel 3:
    Master:      no device present
    Slave:       no device present
ATA channel 4:
    Master:      no device present
    Slave:       no device present
ATA channel 5:
    Master: acd0 <PIONEER DVD-RW DVR-212/1.21> SATA revision 1.x
    Slave:       no device present

So let's create our mirror pool:

zpool create data mirror ad0 ad1

That's it, data is the pool name I used and it's automatically mounted at /data (no need to mess around with fstab and such).

Let's find out our new pool status:

[kaeru@xavier ~]$ zpool status
  pool: data
 state: ONLINE
 scrub: none requested
config:

    NAME        STATE     READ WRITE CKSUM
    data        ONLINE       0     0     0
      mirror    ONLINE       0     0     0
        ad0     ONLINE       0     0     0
        ad1     ONLINE       0     0     0

errors: No known data errors

And where it's mounted and how much space is available:

[kaeru@xavier ~]$ zfs list
NAME                  USED  AVAIL  REFER  MOUNTPOINT
data                  105G   808G    27K  /data
...

I've snipped some data here on some other mountpoints, hence some space is used already. This is immediately usable like any other filesytem.

Here is where some clarification is needed. The pool can act both as a device and filesystem. So by default data is the name of the pool and also the filesystem.

You can already copy files and such this /data filesystem, however everything in it will be treated as if its a single partition, so you can't do fancy stuff like set quotas, additional copies, compression and so on for subdirectories.

In order to do that, you need to create additional filesystems using the data pool:

zfs create data/jails
zfs set mountpoint=/jails data/jails

This is going to create a jails filesystem in the data pool, and automatically mount it as /jails. The mount command will show how this works:

mount
...

data/jails on /jails (zfs, local)
data on /data (zfs, NFS exported, local)

...

ls /data/jails is going to say no such file or directory, because there is no directory there. You could mkdir /data/jails if you wish but that's a directory but not the filesystem.

By default, without the mountpoint option, data/jails would have been automatically mounted as /data/jails. In the above example the difference between a filesystem and normal directory is clear. This difference is important when you export filesystems and wonder why /data is empty.

Automatic exporting of NFS/SMB shares

Exporting filesystems can now be done automatically using zfs commands:

zfs set sharenfs=on data/

This will export any "children" datasets (or filesystems) automatically like data/jails:

[kaeru@xavier ~]$ showmount -e
Exports list on localhost:
/data/videos/family                Everyone
/data/videos                       Everyone
/data/photos                       Everyone
/data/music                        Everyone
/data                              Everyone

You can set better security options of course. Back to the filesystems vs directory. If you NFS mount /data on a remote PC, you won't see /data/music or /data/photos. This is because they're not mounted in the /data filesystem(as a directory). If you want them available as /data/music on the client you'll have to mount them again, maybe as an nullfs mount on the server or as additional mounts on the client. Hierarchy here applies to datasets, not subdirectories, which work as normal POSIX filesystem. This should not be an issue in future with NFSv4 namespace support.

You can use old way of configuring /etc/exports if you want, but I like this way better, it makes sense.

Quotas

Similarly, no need to mess around with quotas anymore in fstab. One of the reasons for having jails dirs on MD disks, is a hard filesystem quota. With ZFS pools this is now no longer an issue:

xavier# zfs set quota=100GB data/jails
xavier# zfs list
NAME                  USED  AVAIL  REFER  MOUNTPOINT
data                 97.1G   816G    27K  /data
data/jails           1.80G  98.2G    19K  /jails
data/jails/kaeru.my  1.80G  98.2G  1.80G  /jails/kaeru.my
data/music           55.6G   816G  55.6G  /data/music
data/photos          21.4G   816G  21.4G  /data/photos
data/videos          18.3G   816G    19K  /data/videos
data/videos/family   18.3G   816G  18.3G  /data/videos/family

data/jails filesystem is now limited to 100GB, and now we want to limit kaeru.my jail to 20GB:

xavier# zfs quota=20GB data/jails/kaeru.my
xavier# zfs list
NAME                  USED  AVAIL  REFER  MOUNTPOINT
data                 98.8G   815G    27K  /data
data/jails           1.80G  98.2G    19K  /jails
data/jails/kaeru.my  1.80G  18.2G  1.80G  /jails/kaeru.my

kaeru.my jail is now limited to 20GB, whereas before it inherited jails limit of 100GB. Neat huh? Oh it's no longer UFS2 or and file backed MD disk.. no more long bgfsck's on unexpected reboots, no more double overhead of an MD file backed disk for performance.

There is a long list of other ZFS features, of which snapshots and the ability to send snapshots over pipes and ssh look the most interesting.

Some tuning needed

ZFS by default tends to eat up a lot of memory, and this can result in poor performance. After reboot, r/w performance was reduced to around 5-10MB/s after several minutes of use. I had to reduce the ZFS adaptive replacement cache (ARC) usage, to 512MB on my 4GB server.

In /boot/loader.conf:

vfs.zfs.arc_max="512M"

After this change, performance was closer to the limit of the drives and stayed there.

FreeBSD 8.0 Errata

FreeBSD 8 has a ton of new features, which will take a long time to explore. The good thing is that the performance features are immediately available such as the new scheduler. Here are some of the errata:

  • Dummynet used for bandwidth shaping seems to have some bugs, but patches are available: http://www.mail-archive.com/freebsd-ipfw@freebsd.org/msg02261.html especially the "dummynet: OUCH! pipe should have been idle!" messages.
  • Wifi setup has changed a bit, you need to setup wlan pseudo devices now.
  • jails has new functions, and command options including multiple ip's per jail, ipv6 and jails within jails and network stack virtualization.

by kaeru at March 04, 2010 02:27 AM

March 03, 2010

Jaja

half way done...


half way done.....road to the new segment of life...
tunggu visa application..by 15th March boleh apply..
then apply CBBP dgn BMI..and setel e'thing dgn BMI..
then tunggu masa pergi...
moga Allah SWT permudah semua urusan.. :) Amin...

 cantek..

hopefully this bring me all the great things
in my life.. a new journey will begin..
cemas jugak tp excited pun ada..
but happy to hear that buddies will be coming
only after 4 months i go...
hehehe... xleh blah la korang... :p

hmmm...
half way done..
and no turning back...

p/s : would everything be ok before my departure?? really hope so..

by dazzling 948 (noreply@blogger.com) at March 03, 2010 10:19 PM