NGANTUK?????

saya termasuk orang yang mudah mengantuk, ada artikel yg saya dapat dr blognya orang, ijin copas ya ….

Terserang kantuk saat bekerja atau belajar (membaca) merupakan hal yang sangat umum dialami oleh banyak orang. Sepengetahuan saya, belum ada tip yang cespleng untuk mengatasi problem rasa kantuk itu. Kalau pun ada, tip-tip juga masih subjektif sifatnya. Artinya, hanya pengalaman individual yang belum tentu cocok untuk orang lain.

Yang dimaksud kantuk disini adalah rasa kantuk yang bukan karena tiga sebab utama yaitu: karena sakit, terlalu lelah dan kurang tidur. Siapa pun yang sakit, atau terlalu lelah memang dianjurkan untuk banyak istirahat atau tidur. Kantuk karena sakit adalah kantuk yang boleh jadi karena pengaruh obat yang diminum atau kondisi tubuh yang tidak fit.

Terkantuk-kantuk karena kurang tidur, itu wajar. Bekerja atau belajar dalam kondisi kurang tidur akan membawa rasa kantuk yang luar biasa. Kantuk karena kurang tidur itu wajar, tetapi kantuk karena cukup tidur, atau bahkan kelebihan tidur itu tidak wajar.

Sebab, tubuh kita hanya menuntut istirahat tidur minimal enam jam dalam dua puluh empat jam (sehari). Artinya tubuh kita sehat dengan tidur enam jam sehari. Maka apa bila kita tidur masih melebihi itu sebenarnya sebuah tindakan yang kurang ada manfaatnya bagi kesehatan tubuh.

Jika ada seseorang yang kantuk dan terus tidur karena jam tidurnya kurang dari enam jam itu wajar. Namun jika ada seseorang yang jam tidurnya sudah enam jam, tapi masih kantuk dan langsung tidur itu adalah godaan setan yang terkutuk.

Tips yang “langsung” dapat dilakukan adalah :

1. Tariklah napas dalam dan pelan melalui hidung, kemudian lepaskan napas pelan melalui mulut. Lakukan pernapasan ini 3 kali. Kemudian …

2. Menarik napas dalam dan pelan lewat mulut, kemudian lepaskan napas pelan lewat hidung. Lakukan pernapasan ini 3 kali. Kemudian …

3. Menarik napas lewat hidung secara dalam dan pelan, kemudian lepaskan napas lewat hidung pelan. Lakukan pernapasan ini 3 kali.

Ketiga tips diatas adalah tips ‘langsung’ yang kita lakukan ketika tiba – tiba kita diserang kantuk. Namun umumnya ‘penyakit’ ngantuk dan malas ini umumnya sudah menjadi penyakit kambuhan, yang selalu ‘menyerang’ dalam kegiatan kita sehari – hari. Di bawah ini dituliskan tips – tips yang perlu anda ‘lakukan’ agar ‘penyakit’ kambuhan ini dalam hilang secara berangsur – angsur dan efektifitas anda baik dalam bekerja ataupun belajar sehari – hari dapat bertambah.

Tips – tips itu adalah :

1. Atur pola makan.

Syaraf otak (neuron) dalam menjalankan tugas rutinnya sangat membutuhkan energi yang sumbernya dari makanan yang kita konsumsi. Jenis dan kualitas makanan yang kita konsumsi berpengaruh terhadap kinerja otak (pikiran). Maka aturlah pola makan dengan makanan yang mudah dicerna sehingga suplay energi tidak telat. Bila kita mengkonsumsi makanan yang berat, terlalu berserat yang sulit dicerna, energi habis untuk mencerna bahan makanan, suplay energi ke syaraf bekurang sehingga kantuk datang menyerang (contohnya makan kangkung).

2. Asosiasikan/bayangkan apa yang diharapkan dari kegiatan bekerja atau belajar itu.

Misalkan : pendapatan (uang) yang tinggi atau skor yang tinggi misalnya. Tidak cukup hanya membayangkan, tapi harus diikuti oleh keinginan yang kuat untuk mendapatkannya. Tanpa keinginan yang kuat, emosi yang “membara” untuk memperolehnya, maka akan mudah terserang rasa kantuk. Sebab, salah satu hukum pikiran mengatakan bahwa “pikiran akan memberi apa yang diinginkan pemiliknya”. Bila pemiliknya meminta setengah hati, pikiran akan memberikan setengah hati pula. Artinya, pada saat kantuk dating dan karenan niatnya setengah hati, maka pikiran lantas welcome to kantuk!

3. Programlah pikiran bawah sadar Anda dengan cara self talk (bicara pada diri sendiri, membatin terus).

Salah satu cara untuk membuat program dalam pikiran bawah sadar adalah dengan cara self talk secara persisten. Self talk yang harus dilakukan adalah “Saya tidak akan tidur waktu bekerja” atau “Saya selalu terjaga dalam belajar!”. Lakukan sesering mungkin dan seintens mungkin hingga benar-benar menjadi bagian dalam pikiran bawah sadar. Bagian inilah nanti yang akan mengingatkan dengan keras saat Anda mulai terkantuk-kantuk. Bagian ini yang nanti akan “protes” bila Anda mulai berpihak pada rasa kantuk.

4. Aturlah posisi duduk siap untuk bekerja atau belajar.

Jangan sambil duduk bersandar/kepala disandarkan. Jangan pula sambil tiduran. Posisi duduk berpengaruh terhadap datangnya rasa kantuk. Kenapa posisi duduk berpengaruh terhadap datangnya kantuk? Posisi atu gerak tubuh mempengaruhi kondisi pikiran. Bila Anda duduk bersandar, kondisi pikiran terbawa bada kondisi rileks, atau kondisi siap untuk ngantuk/tidur.

5. Patahkan pola kantuk Anda.

Kantuk itu ada polanya. Meskipun pada saat kantuk datang pikiran bawah sadar segera mengingatkan untuk selalu terjaga, namun bila tidak ada keberanian dari Anda untuk mematahkan pola kantuk, maka rasa kantuklah yang menang. Bablas tidur…!

Salah satu caranya adalah begini. Begitu rasa kantuk datang, sudah mulai menguap, jangan lanjutkan dengan duduk bersandar. Cari aktifitas jeda, aktifitas pemutus agar kantuk terusir. Caranya macam-macam: bisa berdiri dan lakukan gerakan-gerakan ringan, seperti jalan-jalan sebentar, bikin kopi, atau jalan-jalan kecil di ruangan sekedar manyapa teman dan refresing. Hasilnya, tidak akan ngantuk lagi.

6. Yang juga cukup penting adalah : Tehnik mematahkan pola (pikir dan kebiasaan).

Sebab, hampir semua inovasi, penemuan baru, dan hal-hal yang berkaitan dengan kreativitas, diawali dengan keberanian “mematahkan” pola lama, dan mengantinya dengan pola baru. Adalah tidak mungkin ingin mendapatkan sesuatu yang baru, tetapi masih dengan cara (pola) pikir lama. Demikian halnya dengan pola kantuk yang pada akhirnya (hasilnya) tidur, maka sebelum kebablasan tidur, maka polanya harus diputus.

Tips – tips ini masih subjektif sifatnya. Artinya masih perlu banyak bukti tentang efektifitasnya. Namun, hemat saya, keberhasilan tip ini sangat tergantung pada sejauh mana Anda benar-benar mau membuang rasa kantuk setiap kali Anda terserang. Semakin kuat keinginan Anda untuk benar-benar mengalahkan kantuk, Anda akan berhasil. Selamat mencoba.

http://khawanz.wordpress.com/2009/03/30/menghilangkan-rasa-kantuk/

Kejamnya dunia PNS

Kejamnya dunia PNS..

April 11, 2010 in Renungan
Tags: korupsi, PNS
Tulisan ini tidak dimaksudkan untuk menjatuhkan dunia ke-PNS-an. Tulisan ini hanyalah merupakan secuil fakta yang menggambarkan betapa ‘kotornya’ dunia ke-PNS-an kita. Tulisan ini saya ambil dari milis alumni. Menggugah, mengharukan, dan inspiratif. Tulisan ini merupakan pengalaman yang di alami seorang PNS yang berusaha jujur (untuk tidak melakukan korupsi secuilpun) di dalam lingkungannya yang ‘kotor’.

Sebagai pegawai Departemen Keuangan, saya tidak gelisah dan tidak kalangkabut akibat prinsip hidup korupsi. Ketika misalnya, tim Inspektorat Jenderal datang, BPKP datang, BPK datang, teman-teman di kantor gelisah dan belingsatan, kami tenang saja. Jadi sebenarnya hidup tanpa korupsi itu menyenangkan sekali. Hidup tidak korupsi itu sebenarnya lebih menyenangkan. Meski orang melihat kita sepertinya sengsara, tapi sebetulnya lebih menyenangkan. Keadaan itu paling tidak yang saya rasakan langsung.
Saya Arif Sarjono, lahir di Jawa Timur tahun 1970, sampai dengan SMA di Mojokerto, kemudian kuliah di Sekolah Tinggi Akuntansi Negara (STAN) dan selesai pada 1992. Pada 17 Oktober 1992, saya menikah dan kemudian saya ditugaskan di Medan. Saya ketika itu mungkin termasuk generasi pertama yang mencoba menghilangkan dan melawan arus korupsi yang sudah sangat lazim. Waktu itu pertentangan memang sangat keras. Saya punya prinsip satu saja, karena takut pada Allah, jangan sampai ada rezeki haram menjadi daging dalam diri dan keturunan. Itu saja yang selalu ada dalam hati saya. Kalau ingat prinsip itu, saya selalu menegaskan lagi untuk mengambil jarak yang jelas dan tidak menikmati sedikit pun harta yang haram. Syukurlah, prinsip itu bisa didukung keluarga, karena isteri juga aktif dalam pengajian keislaman.
Sejak awal ketika menikah, saya sampaikan kepada isteri bahwa saya pegawai negeri di Departemen Keuangan, meski imej banyak orang, pegawai Departemen Keuangan kaya, tapi sebenarnya tidak begitu. Gaji saya hanya sekian, kalau mau diajak hidup sederhana dan tanpa korupsi, ayo. Kalau tidak mau, ya sudah tidak jadi.
Dari awal saya sudah berusaha menanamkan komitmen kami seperti itu. Saya juga sering ingatkan kepada isteri, bahwa kalau kita konsisten dengan jalan yang kita pilih ini, pada saat kita membutuhkan maka Allah akan selesaikan kebutuhan itu. Jadi yg penting usaha dan konsistensi kita. Saya juga suka mengulang beberapa kejadian yg kami alami selama menjalankan prinsip hidup seperti ini kepada istri. Bahwa yg penting bagi kita adalah cukup dan berkahnya, bahwa kita bisa menjalani hidup layak. Bukan berlebih seperti memiliki rumah dan mobil mewah. Menjalani prinsip seperti ini jelas banyak ujiannya.
Di mata keluarga besar misalnya, orangtua saya juga sebenarnya mengikuti */logika umum bahwa orang pajak pasti kaya./* Sehingga mereka biasa meminta kami membantu adik- adik dan keluarga. Tapi kami berusaha menjelaskan bahwa kondisi kami berbeda dengan imej dan anggapan orang. Proses memberi pemahaman seperti ini pada keluarga sulit dan membutuhkan waktu bertahun-tahun. Sampai akhirnya pernah mereka berkunjung ke rumah saya di Medan, saat itulah mereka baru mengetahui dan melihat bagaimana kondisi keluarga saya, barulah perlahan-lahan mereka bisa memahami.
Jabatan saya sampai sekarang adalah petugas verifikasi lapangan atau pemeriksa pajak. Kalau dibandingkan teman-teman seangkatan sebenarnya karir saya bisa dikatakan terhambat antara empat sampai lima tahun. Seharusnya paling tidak sudah menjabat Kepala Seksi, Eselon IV. Tapi sekarang baru Eselon V. Apalagi dahulu di masa Orde Baru, penentangan untuk tidak menerima uang korupsi sama saja dengan karir terhambat. Karena saya dianggap tidak cocok dengan atasan, maka kondite saya di mata mereka buruk. Terutama poin ketaatannya, dianggap tidak baik dan jatuh. Banyak pelajaran yang bisa saya petik dari semua pengalaman itu. Antara lain, orang-orang yang berbuat jahat akan selalu berusaha mencari kawan apa pun caranya. Cara keras, pelan, lewat bujukan atau apa pun akan mereka lakukan agar mereka mendapat dukungan. Mereka pada dasarnya tidak ingin ada orang yang bersih. Mereka tidak ingin ada orang yang tidak seperti mereka.
Pengalaman di kantor yang paling berkesan ketika mereka menggunakan cara paling halus, pura-pura berteman dan bersahabat. Tapi belakangan, setelah sekian tahun barulah ketahuan, kita sudah dikhianati. Cara seperti in seperti sudah direkayasa. Misalnya, pegawai-pegawai baru didekati. Mereka dikenalkan dengan gaya hidup dan cara bekerja pegawai lama, bahwa seperti inilah gaya hidup pegawai Departemen Keuangan. Bila tidak berhasil, mereka akan pakai cara lain lagi, begitu seterusnya. Pola-pola apa saja dipakai, sampai mereka bisa merangkul orang itu menjadi teman. Saya pernah punya atasan. Dari awal ketika memperkenalkan diri, dia sangat simpatik di mata saya. Dia juga satu-satunya atasan yang mau bermain ke rumah bawahan. Saya dengan atasan itu kemudian menjadi seperti sahabat, bahkan seperti keluarga sendiri. Di akhir pekan, kami biasa memancing sama-sama atau jalan-jalan bersama keluarga. Dan ketika pulang, dia biasa juga menitipkan uang dalam amplop pada anak-anak saya. Saya sendiri menganggap pemberian itu hanya hadiah saja, berapalah hadiah yang diberikan kepada anak-anak. Tidak terlalau saya perhatikan. Apalagi dalam proses pertemanan itu kami sedikit saja berbicara tentang pekerjaan. Dan dia juga sering datang menjemput ke rumah, mangajak mancing atau ke toko buku sambil membawa anak-anak.
Hingga satu saat saya mendapat surat perintah pemeriksaan sebuah perusahaan besar. Dari hasil pemeriksaan itu saya menemukan penyimpangan sangat besar dan luar biasa jumlahnya. Pada waktu itu, atasan melakukan pendekatan pada saya dengan cara paling halus. Dia mengatakan, kalau semua penyimpangan ini kita ungkapkan, maka perusahaan itu bangkrut dan banyak pegawai yang di-PHK. Karena itu, dia menganggap efek pembuktian penyimpangan itu justru menyebabkan masyarakat rugi. Sementara dari sisi pandang saya, betapa tidak adilnya kalau tidak mengungkap temuan itu. Karena sebelumnya ada yang melakukan penyimpangan dan kami ungkapkan. Berarti ada pembedaan. Jadwal penagihannya pun sama seperti perusahaan lain. Karena dirasa sulit mempengaruhi sikap saya, kemudian dia memakai logika lain lagi. Apakah tidak sebaiknya kalau temuan itu diturunkan dan dirundingkan dengan klien, agar bisa membayar pajak dan negara untung, karena ada uang yang masuk negara. Logika seperti ini juga tidak bisa saya terima. Waktu itu, saya satu-satunyaanggota tim yang menolak dan memintaagar temuan itu tetap diungkap apa adanya. Meski saya juga sadar, kalau saya tidak menandatangani hasil laporan itu pun, laporan itu akan tetap sah. Tapi saya merasa teman-teman itu sangat tidak ingin semua sepakat dan sama seperti mereka. Mereka ingin semua sepakat dan sama seperti mereka. Paling tidak menerima. Ketika sudah mentok semuanya, saya dipanggil oleh atasan dan disidang di depan kepala kantor. Dan ini yang amat berkesan sampai sekarang, bahwa upaya mereka untuk menjadikan orang lain tidak bersih memang direncanakan. Di forum itu, secara terang-terangan atasan yang sudah lama bersahabatdan seperti keluarga sendiri dengan saya itu mengatakan, “Sudahlah, Dik Arif tidak usah munafik.” Saya katakan, “Tidak munafik bagaimana Pak? Selama ini saya insya Allah konsisten untuk tidak melakukan korupsi.” Kemudian ia sampaikan terus terang bahwa uang yang selama kurang lebih dua tahun ia berikan pada anak saya adalah uang dari klien. Ketika mendengar itu, saya sangat terpukul, apalagi merasakan sahabat itu ternyata berkhianat. Karena terus terang saya belum pernah mempunyai teman sangat dekat seperti itu, kacuali yang memang sudah sama-sama punya prinsip untuk menolak uang suap. Bukan karena saya tidak mau bergaul, tapi karena kami tahu persis bahwa mereka perlahan-lahan menggiring ke arah yang mereka mau. Ketika merasa terpukul dan tidak bisa membalas dengan kata-kata apa pun, saya pulang.
Saya menangis dan menceritakan masalah itu pada isteri saya di rumah. Ketika mendengar cerita saya itu, isteri langsung sujud syukur. Ia lalu mengatakan, “Alhamdulillah. Selama ini uang itu tidak pernah saya pakai,” katanya.Ternyata di luar pengatahuan saya alhamdulillah, amplop-amplo itu tidak digunakan sedikit pun oleh isteri saya untuk keperluan apa pun. Jadi amplop-amplop itu disimpan di sebuah tempat, meski ia sama sekali tidak tahu apa status uang itu. Amplop-amplop itu semuanya masih utuh. Termasuk tulisannya masih utuh, tidak ada yang dibuka. Jumlahnya berapa saya juga tidak tahu. Yang jelas, bukan lagi puluhan juta. Karena sudah masuk hitungan dua tahun dan diberikan hampir setiap pekan.
Saya menjadi bersemangat kembali. Saya ambil semua amplop itu dan saya bawa ke kantor. Saya minta bertemu dengan kepala kantor dan kepala seksi. Dalam forum itu, saya lempar semua amplop itu di hadapan atasan saya hingga bertaburan di lantai. Saya katakan, “Makan uang itu, satu rupiah pun saya tidak pernah gunakan uang itu. Mulai saat ini, saya tidak pernah percaya satu pun perkataan kalian. ” Mereka tidak bisa bicara apa pun karena fakta obyektif, saya tidak pernah memakai uang yang mereka tuduhkan. Tapi esok harinya, saya langsung dimutasi antar seksi. Awalnya saya diauditor, lantas saya diletakkan di arsip, meski tetap menjadi petugas lapangan pemeriksa pajak. Itu berjalan sampai sekarang. Ketika melawan arus yang kuat, tentu saja da saat tarik-menarik dalam hati dan konflik batin. Apalagi keluarga saya hidup dalam kondisi terbatas. Tapi alhamdulillah, sampai sekarang saya tidak tergoda untuk menggunakan uang yang tidak jelas.
Ada pengalaman lain yang masih saya ingat sampai sekarang. Ketika saya mengalami kondisi yang begitu mendesak. Misalnya, ketika anak kedua lahir. Saat itu persis ketika saya membayar kontrak rumah dan tabungan saya habis. Sampai detik-detik terakhir harus membayar uang rumah sakit untuk membawa isteri dan bayi kami ke rumah, saya tidak punya uang serupiah pun. Saya mau bcara dengan pihak rumah sakit dan terus terang bahwa insya Allah pekan depan akan saya bayar, tapi saya tidak bisa ngomong juga. Akhirnya saya keluar sebentar ke masjid untuk sholat dhuha. Begitu pulang dari sholat dhuha, tiba-tiba saja saya ketemu teman lama di rumah sakit itu. Sebelumnya kami lama sekali tidak pernah jumpa. Dia dapat cerita dari teman bahwa isteri saya melahirkan, maka dia sempatkan datang ke rumah sakit. Wallahu alam apakah dia sudah diceritakan kondisi saya atau bagaimana, tetapi ketika ingin menyampaikan kondisi saya pada pihak rumah sakit, saya malah ditunjukkan kwitansi seluruh biaya perawatan isteri yang sudah lunas. Alhamdulillah.
Ada lagi peristiwa hampir sama, ketika anak saya operasi mata karena ada lipoma yang harus diangkat. Awalnya, saya pakai jasa askes. Tapi karena pelayanan pengguna Askes tampaknya apa adanya, dan saya kasihan karena anak saya baru berumur empat tahun, saya tidak pakai Askes lagi. Saya ke Rumah Sakit yang agak bagus sehingga pelayanannya juga agak bagus. Itu saya lakukan sambil tetap berfikir, nanti uangnya pinjam dari mana? Ketika anak harus pulang, saya belum juga punya uang. Dan saya paling susah sekali menyampaikan ingin pinjam uang. Alhamdulillah, ternyata Allah cukupkan kebutuhan itu pada detik terakhir. Ketika sedang membereskan pakaian di rumah sakit, tiba-tiba Allah pertemukan saya dengan seseorang yang sudah lama tidak bertemu. Ia bertanya bagaimana kabar, dan saya ceritakan anak saya sedang dioperasi. Dia katakan, “Kenapa tidak bilang-bilang?” Saya sampaikan karena tidak sempat saja. Setelah teman itu pulang, ketika ingin menyampaikan penundaan pembayaran, ternyata kwitansinya juga sudah dilunasi oleh teman itu. Alhamdulillah.
Saya berusaha tidak terjatuh ke dalam korupsi, meski masih ada tekanan keluarga besar, di luar keluarga inti saya. Karena ada teman yang tadinya baik tidak memakan korupsi, tapi jatuh karena tekanan keluarga. Keluarganya minta bantuan, karena takut dibilang pelit, mereka terpaksa pinjam sana sini. Ketika harus bayar, akhirnya mereka terjerat korupsi juga. Karena banyak yang seperti itu, dan saya tidak mau terjebak begitu, saya berusaha dari awal tidak demikian. Saya berusaha cari usaha lain, dengan mengajar dan sebagainya. Isteri saya juga bekerja sebagai guru. Di lingkungan kerja, pendekatan yang saya lakukan biasanya lebih banyak dengan bercanda. Sedangkan pendekatan serius, sebenarnya mereka sudah puas dengan pendekatan itu, tapi tidak berubah. Dengan pendekatan bercanda, misalnya ketika datang tim pemeriksa dari BPK, BPKP, atau Irjen. Mereka gelisah sana-sini kumpulkan uang untuk menyuap pemeriksa. Jadi mereka dapat suap lalu menyuap lagi. Seperti rantai makanan. Siapa memakan siapa. Uang yang mereka kumpulkan juga habis untuk dipakai menyuap lagi. Mereka selalu takut ini takut itu. Paling sering saya hanya mengatakan dengan bercanda, “Uang setan ya dimakan hantu.” Dari percakapan seperti itu ada juga yang mulai berubah, kemudian berdialog dan akhirnya berhenti sama sekali. Harta mereka jual dan diberikan kepada masyarakat. Tapi yang seperti itu tidak banyak. Sedikit sekali orang yang bisa merubah gaya hidup yang semula mewah lalu tiba-tiba miskin. Itu sulit sekali. Ada juga diantara teman-teman yang beranggapan, dirinya tidak pernah memeras dan tidak memakan uang korupsi secara langsung. Tapi hanya menerima uang dari atasan. Mereka beralasan toh tidak meminta dan atasan itu hanya memberi. Mereka mengatakan tidak perlu bertanya uang itu dari mana. Padahal sebenarnya, dari ukuran gaji kami tahu persis bahwa atasan kami tidak akan pernah bisa memberikan uang sebesar itu. Atasan yang memberikan itu berlapis-lapis. Kalau atasan langsung biasanya memberi uang hari Jum’at atau akhir pekan. Istilahnya kurang lebih uang Jum’atan. Atasan yang berikutnya lagi pada momen berikutnya memberi juga. Kalau atasan yang lebih tinggi lagi biasanya memberi menjelang lebaran dan sebagainya. Kalau dihitung-hitung sebenarnya lebih besar uang dari atasan dibanding gaji bulanan. Orang-orang yang menerima uang seperti ini yang sulit berubah. Mereka termasuk rajin sholat, puasa sunnah dan membaca Al-Qur’an. Tetapi mereka sulit berubah.
Ternyata hidup dengan korupsi memang membuat sengsara. Di antara teman-teman yang korupsi, ada juga yang akhirnya dipecat, ada yang melarikan diri karena dikejar-kejar polisi, ada yang isterinya selingkuh dan lain-lain. Meski secara ekonomi mereka sangat mapan, bukan hanya sekadar mapan.
Yang sangat dramatis, saya ingat teman sebangku saya saat kuliah di STAN. Awalnya dia sama-sama ikut kajian keislaman di kampus. Tapi ketika keluarganya mulai sering minta bantuan, adiknya kuliah, pengobatan keluarga dan lainnya, dia tidak bisa berterus terang tidak punya uang. Akhirnya ia mencoba hutang sana-sini. Dia pun terjebak dan merasa sudah terlanjur jatuh, akhirnya dia betul-betul sama dengan teman-teman di kantor. Bahkan sampai sholat ditinggalkan. Terakhir, dia ditangkap polisi ketika sedang mengkonsumsi narkoba. Isterinya pun selingkuh. Teman itu sekarang dipecat dan dipenjara. Saya berharap akan makin banyak orang yang melakukan jihad untuk hidup yang bersih. Kita harus bisa menjadi pelopor dan teladan di mana saja.
Kiatnya hanya satu, terus menerus menumbuhkan rasa takut menggunakan dan memakan uang haram. Jangan sampai daging kita ini tumbuh dari hasil rejeki yang haram. Saya berharap, mudah-mudahan Allah tetap memberikan pada kami keistiqomahan.

Berat sekali perjuangan seorang PNS yang ingin hidup bersih. Teman saya pernah berkata pada saya. “Salah satu cara agar kita tidak korupsi ya jangan jadi PNS. Aman”. Hmm.. Gimana? ada pendapat lain?
Saya sih setuju dengan pendapatnya. Terlalu berat untuk tidak terlibat di suatu siklus yang sudah mendarah daging. Satu2nya cara ya jangan masuk ke dalam siklus itu..

Saya berdoa dan berharap, mudah2an lingkungan PNS yang lain tidak seperti itu dan mudah2an sudah ada perubahan ke arah yang lebih baik untuk dunia ke-PNS-an di negeri Indonesia tercinta ini, amin..

http://khawanz.wordpress.com/2010/04/11/kejamnya-dunia-pns/

A Beginner’s Guide To LVM

Pada waktu akan install ubuntu server di virtual machine, ada kebutuhan untuk mempergunakan LVM, sebenarnya pernah mempergunakan di debian lenny, tapi krn ini nanti dipergunakan untuk keperluan yang lebih serius maka perlu belajar LVM lebih detil. Ketemulah tulisan dibawah ini.

Disalin dari: http://www.howtoforge.com/linux_lvm dengan Authornya Falco (mohon ijin ya falko)

This guide shows how to work with LVM (Logical Volume Management) on Linux. It also describes how to use LVM together with RAID1 in an extra chapter. As LVM is a rather abstract topic, this article comes with a Debian Etch VMware image that you can download and start, and on that Debian Etch system you can run all the commands I execute here and compare your results with mine. Through this practical approach you should get used to LVM very fast.

However, I do not issue any guarantee that this tutorial will work for you!

1 Preliminary Note

This tutorial was inspired by two articles I read:

These are great articles, but hard to understand if you’ve never worked with LVM before. That’s why I have created this Debian Etch VMware image that you can download and run in VMware Server or VMware Player (see http://www.howtoforge.com/import_vmware_images to learn how to do that).

I installed all tools we need during the course of this guide on the Debian Etch system (by running

apt-get install lvm2 dmsetup mdadm reiserfsprogs xfsprogs

) so you don’t need to worry about that.

The Debian Etch system’s network is configured through DHCP, so you don’t have to worry about conflicting IP addresses. The root password is howtoforge. You can also connect to that system with an SSH client like PuTTY. To find out the IP address of the Debian Etch system, run

ifconfig

The system has six SCSI hard disks, /dev/sda – /dev/sdf. /dev/sda is used for the Debian Etch system itself, while we will use /dev/sdb – /dev/sdf for LVM and RAID. /dev/sdb – /dev/sdf each have 80GB of disk space. In the beginning we will act as if each has only 25GB of disk space (thus using only 25GB on each of them), and in the course of the tutorial we will “replace” our 25GB hard disks with 80GB hard disks, thus demonstrating how you can replace small hard disks with bigger ones in LVM.

The article http://www.linuxdevcenter.com/pub/a/linux/2006/04/27/managing-disk-space-with-lvm.html uses hard disks of 250GB and 800GB, but some commands such as pvmove take a long time with such hard disk sizes, that’s why I decided to use hard disks of 25GB and 80GB (that’s enough to understand how LVM works).

1.1 Summary

Download this Debian Etch VMware image (~310MB) and start it like this. Log in as root with the password howtoforge.

2 LVM Layout

Basically LVM looks like this:

You have one or more physical volumes (/dev/sdb1 – /dev/sde1 in our example), and on these physical volumes you create one or more volume groups (e.g. fileserver), and in each volume group you can create one or more logical volumes. If you use multiple physical volumes, each logical volume can be bigger than one of the underlying physical volumes (but of course the sum of the logical volumes cannot exceed the total space offered by the physical volumes).

It is a good practice to not allocate the full space to logical volumes, but leave some space unused. That way you can enlarge one or more logical volumes later on if you feel the need for it.

In this example we will create a volume group called fileserver, and we will also create the logical volumes /dev/fileserver/share, /dev/fileserver/backup, and /dev/fileserver/media (which will use only half of the space offered by our physical volumes for now – that way we can switch to RAID1 later on (also described in this tutorial)).

3 Our First LVM Setup

Let’s find out about our hard disks:

fdisk -l

The output looks like this:

server1:~# fdisk -l

Disk /dev/sda: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          18      144553+  83  Linux
/dev/sda2              19        2450    19535040   83  Linux
/dev/sda4            2451        2610     1285200   82  Linux swap / Solaris

Disk /dev/sdb: 85.8 GB, 85899345920 bytes
255 heads, 63 sectors/track, 10443 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdb doesn’t contain a valid partition table

Disk /dev/sdc: 85.8 GB, 85899345920 bytes
255 heads, 63 sectors/track, 10443 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdc doesn’t contain a valid partition table

Disk /dev/sdd: 85.8 GB, 85899345920 bytes
255 heads, 63 sectors/track, 10443 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdd doesn’t contain a valid partition table

Disk /dev/sde: 85.8 GB, 85899345920 bytes
255 heads, 63 sectors/track, 10443 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sde doesn’t contain a valid partition table

Disk /dev/sdf: 85.8 GB, 85899345920 bytes
255 heads, 63 sectors/track, 10443 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdf doesn’t contain a valid partition table

There are no partitions yet on /dev/sdb – /dev/sdf. We will create the partitions /dev/sdb1, /dev/sdc1, /dev/sdd1, and /dev/sde1 and leave /dev/sdf untouched for now. We act as if our hard disks had only 25GB of space instead of 80GB for now, therefore we assign 25GB to /dev/sdb1, /dev/sdc1, /dev/sdd1, and /dev/sde1:

fdisk /dev/sdb

server1:~# fdisk /dev/sdb

The number of cylinders for this disk is set to 10443.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): <– m
Command action
a   toggle a bootable flag
b   edit bsd disklabel
c   toggle the dos compatibility flag
d   delete a partition
l   list known partition types
m   print this menu
n   add a new partition
o   create a new empty DOS partition table
p   print the partition table
q   quit without saving changes
s   create a new empty Sun disklabel
t   change a partition’s system id
u   change display/entry units
v   verify the partition table
w   write table to disk and exit
x   extra functionality (experts only)

Command (m for help): <– n
Command action
e   extended
p   primary partition (1-4)
<– p
Partition number (1-4): <– 1
First cylinder (1-10443, default 1): <– <ENTER>
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-10443, default 10443): <– +25000M

Command (m for help): <– t
Selected partition 1
Hex code (type L to list codes): <– L

0  Empty           1e  Hidden W95 FAT1 80  Old Minix       be  Solaris boot
1  FAT12           24  NEC DOS         81  Minix / old Lin bf  Solaris
2  XENIX root      39  Plan 9          82  Linux swap / So c1  DRDOS/sec (FAT-
3  XENIX usr       3c  PartitionMagic  83  Linux           c4  DRDOS/sec (FAT-
4  FAT16 <32M      40  Venix 80286     84  OS/2 hidden C:  c6  DRDOS/sec (FAT-
5  Extended        41  PPC PReP Boot   85  Linux extended  c7  Syrinx
6  FAT16           42  SFS             86  NTFS volume set da  Non-FS data
7  HPFS/NTFS       4d  QNX4.x          87  NTFS volume set db  CP/M / CTOS / .
8  AIX             4e  QNX4.x 2nd part 88  Linux plaintext de  Dell Utility
9  AIX bootable    4f  QNX4.x 3rd part 8e  Linux LVM       df  BootIt
a  OS/2 Boot Manag 50  OnTrack DM      93  Amoeba          e1  DOS access
b  W95 FAT32       51  OnTrack DM6 Aux 94  Amoeba BBT      e3  DOS R/O
c  W95 FAT32 (LBA) 52  CP/M            9f  BSD/OS          e4  SpeedStor
e  W95 FAT16 (LBA) 53  OnTrack DM6 Aux a0  IBM Thinkpad hi eb  BeOS fs
f  W95 Ext’d (LBA) 54  OnTrackDM6      a5  FreeBSD         ee  EFI GPT
10  OPUS            55  EZ-Drive        a6  OpenBSD         ef  EFI (FAT-12/16/
11  Hidden FAT12    56  Golden Bow      a7  NeXTSTEP        f0  Linux/PA-RISC b
12  Compaq diagnost 5c  Priam Edisk     a8  Darwin UFS      f1  SpeedStor
14  Hidden FAT16 <3 61  SpeedStor       a9  NetBSD          f4  SpeedStor
16  Hidden FAT16    63  GNU HURD or Sys ab  Darwin boot     f2  DOS secondary
17  Hidden HPFS/NTF 64  Novell Netware  b7  BSDI fs         fd  Linux raid auto
18  AST SmartSleep  65  Novell Netware  b8  BSDI swap       fe  LANstep
1b  Hidden W95 FAT3 70  DiskSecure Mult bb  Boot Wizard hid ff  BBT
1c  Hidden W95 FAT3 75  PC/IX
Hex code (type L to list codes): <– 8e
Changed system type of partition 1 to 8e (Linux LVM)

Command (m for help): <– w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.

Now we do the same for the hard disks /dev/sdc – /dev/sde:

fdisk /dev/sdc
fdisk /dev/sdd
fdisk /dev/sde

Then run

fdisk -l

again. The output should look like this:

server1:~# fdisk -l

Disk /dev/sda: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          18      144553+  83  Linux
/dev/sda2              19        2450    19535040   83  Linux
/dev/sda4            2451        2610     1285200   82  Linux swap / Solaris

Disk /dev/sdb: 85.8 GB, 85899345920 bytes
255 heads, 63 sectors/track, 10443 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1        3040    24418768+  8e  Linux LVM

Disk /dev/sdc: 85.8 GB, 85899345920 bytes
255 heads, 63 sectors/track, 10443 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1        3040    24418768+  8e  Linux LVM

Disk /dev/sdd: 85.8 GB, 85899345920 bytes
255 heads, 63 sectors/track, 10443 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot      Start         End      Blocks   Id  System
/dev/sdd1               1        3040    24418768+  8e  Linux LVM

Disk /dev/sde: 85.8 GB, 85899345920 bytes
255 heads, 63 sectors/track, 10443 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot      Start         End      Blocks   Id  System
/dev/sde1               1        3040    24418768+  8e  Linux LVM

Disk /dev/sdf: 85.8 GB, 85899345920 bytes
255 heads, 63 sectors/track, 10443 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdf doesn’t contain a valid partition table

Now we prepare our new partitions for LVM:

pvcreate /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1

server1:~# pvcreate /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1
Physical volume ”/dev/sdb1″ successfully created
Physical volume ”/dev/sdc1″ successfully created
Physical volume ”/dev/sdd1″ successfully created
Physical volume ”/dev/sde1″ successfully created

Let’s revert this last action for training purposes:

pvremove /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1

server1:~# pvremove /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1
Labels on physical volume ”/dev/sdb1″ successfully wiped
Labels on physical volume ”/dev/sdc1″ successfully wiped
Labels on physical volume ”/dev/sdd1″ successfully wiped
Labels on physical volume ”/dev/sde1″ successfully wiped

Then run

pvcreate /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1

again:

server1:~# pvcreate /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1
Physical volume ”/dev/sdb1″ successfully created
Physical volume ”/dev/sdc1″ successfully created
Physical volume ”/dev/sdd1″ successfully created
Physical volume ”/dev/sde1″ successfully created

Now run

pvdisplay

to learn about the current state of your physical volumes:

server1:~# pvdisplay
— NEW Physical volume —
PV Name               /dev/sdb1
VG Name
PV Size               23.29 GB
Allocatable           NO
PE Size (KByte)       0
Total PE              0
Free PE               0
Allocated PE          0
PV UUID               G8lu2L-Hij1-NVde-sOKc-OoVI-fadg-Jd1vyU

— NEW Physical volume —
PV Name               /dev/sdc1
VG Name
PV Size               23.29 GB
Allocatable           NO
PE Size (KByte)       0
Total PE              0
Free PE               0
Allocated PE          0
PV UUID               40GJyh-IbsI-pzhn-TDRq-PQ3l-3ut0-AVSE4B

— NEW Physical volume —
PV Name               /dev/sdd1
VG Name
PV Size               23.29 GB
Allocatable           NO
PE Size (KByte)       0
Total PE              0
Free PE               0
Allocated PE          0
PV UUID               4mU63D-4s26-uL00-r0pO-Q0hP-mvQR-2YJN5B

— NEW Physical volume —
PV Name               /dev/sde1
VG Name
PV Size               23.29 GB
Allocatable           NO
PE Size (KByte)       0
Total PE              0
Free PE               0
Allocated PE          0
PV UUID               3upcZc-4eS2-h4r4-iBKK-gZJv-AYt3-EKdRK6

Now let’s create our volume group fileserver and add /dev/sdb1 – /dev/sde1 to it:

vgcreate fileserver /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1

server1:~# vgcreate fileserver /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1
Volume group ”fileserver” successfully created

Let’s learn about our volume groups:

vgdisplay

server1:~# vgdisplay
— Volume group —
VG Name               fileserver
System ID
Format                lvm2
Metadata Areas        4
Metadata Sequence No  1
VG Access             read/write
VG Status             resizable
MAX LV                0
Cur LV                0
Open LV               0
Max PV                0
Cur PV                4
Act PV                4
VG Size               93.14 GB
PE Size               4.00 MB
Total PE              23844
Alloc PE / Size       0 / 0
Free  PE / Size       23844 / 93.14 GB
VG UUID               3Y1WVF-BLET-QkKs-Qnrs-SZxI-wrNO-dTqhFP

Another command to learn about our volume groups:

vgscan

server1:~# vgscan
Reading all physical volumes.  This may take a while…
Found volume group ”fileserver” using metadata type lvm2

For training purposes let’s rename our volumegroup fileserver into data:

vgrename fileserver data

server1:~# vgrename fileserver data
Volume group ”fileserver” successfully renamed to ”data”

Let’s run vgdisplay and vgscan again to see if the volume group has been renamed:

vgdisplay

server1:~# vgdisplay
— Volume group —
VG Name               data
System ID
Format                lvm2
Metadata Areas        4
Metadata Sequence No  2
VG Access             read/write
VG Status             resizable
MAX LV                0
Cur LV                0
Open LV               0
Max PV                0
Cur PV                4
Act PV                4
VG Size               93.14 GB
PE Size               4.00 MB
Total PE              23844
Alloc PE / Size       0 / 0
Free  PE / Size       23844 / 93.14 GB
VG UUID               3Y1WVF-BLET-QkKs-Qnrs-SZxI-wrNO-dTqhFP

vgscan

server1:~# vgscan
Reading all physical volumes.  This may take a while…
Found volume group ”data” using metadata type lvm2

Now let’s delete our volume group data:

vgremove data

server1:~# vgremove data
Volume group ”data” successfully removed

vgdisplay

No output this time:

server1:~# vgdisplay

vgscan

server1:~# vgscan
Reading all physical volumes.  This may take a while…

Let’s create our volume group fileserver again:

vgcreate fileserver /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1

server1:~# vgcreate fileserver /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1
Volume group ”fileserver” successfully created

Next we create our logical volumes share (40GB), backup (5GB), and media (1GB) in the volume group fileserver. Together they use a little less than 50% of the available space (that way we can make use of RAID1 later on):

lvcreate –name share –size 40G fileserver

server1:~# lvcreate –name share  –size 40G fileserver
Logical volume ”share” created

lvcreate –name backup –size 5G fileserver

server1:~# lvcreate –name backup –size  5G fileserver
Logical volume ”backup” created

lvcreate –name media –size 1G fileserver

server1:~# lvcreate –name media  –size  1G fileserver
Logical volume ”media” created

Let’s get an overview of our logical volumes:

lvdisplay

server1:~# lvdisplay
— Logical volume —
LV Name                /dev/fileserver/share
VG Name                fileserver
LV UUID                280Mup-H9aa-sn0S-AXH3-04cP-V6p9-lfoGgJ
LV Write Access        read/write
LV Status              available
# open                 0
LV Size                40.00 GB
Current LE             10240
Segments               2
Allocation             inherit
Read ahead sectors     0
Block device           253:0

— Logical volume —
LV Name                /dev/fileserver/backup
VG Name                fileserver
LV UUID                zZeuKg-Dazh-aZMC-Aa99-KUSt-J6ET-KRe0cD
LV Write Access        read/write
LV Status              available
# open                 0
LV Size                5.00 GB
Current LE             1280
Segments               1
Allocation             inherit
Read ahead sectors     0
Block device           253:1

— Logical volume —
LV Name                /dev/fileserver/media
VG Name                fileserver
LV UUID                usfvrv-BC92-3pFH-2NW0-2N3e-6ERQ-4Sj7YS
LV Write Access        read/write
LV Status              available
# open                 0
LV Size                1.00 GB
Current LE             256
Segments               1
Allocation             inherit
Read ahead sectors     0
Block device           253:2

lvscan

server1:~# lvscan
ACTIVE            ’/dev/fileserver/share’ [40.00 GB] inherit
ACTIVE            ’/dev/fileserver/backup’ [5.00 GB] inherit
ACTIVE            ’/dev/fileserver/media’ [1.00 GB] inherit

For training purposes we rename our logical volume media into films:

lvrename fileserver media films

server1:~# lvrename fileserver media films
Renamed ”media” to ”films” in volume group ”fileserver”

lvdisplay

server1:~# lvdisplay
— Logical volume —
LV Name                /dev/fileserver/share
VG Name                fileserver
LV UUID                280Mup-H9aa-sn0S-AXH3-04cP-V6p9-lfoGgJ
LV Write Access        read/write
LV Status              available
# open                 0
LV Size                40.00 GB
Current LE             10240
Segments               2
Allocation             inherit
Read ahead sectors     0
Block device           253:0

— Logical volume —
LV Name                /dev/fileserver/backup
VG Name                fileserver
LV UUID                zZeuKg-Dazh-aZMC-Aa99-KUSt-J6ET-KRe0cD
LV Write Access        read/write
LV Status              available
# open                 0
LV Size                5.00 GB
Current LE             1280
Segments               1
Allocation             inherit
Read ahead sectors     0
Block device           253:1

— Logical volume —
LV Name                /dev/fileserver/films
VG Name                fileserver
LV UUID                usfvrv-BC92-3pFH-2NW0-2N3e-6ERQ-4Sj7YS
LV Write Access        read/write
LV Status              available
# open                 0
LV Size                1.00 GB
Current LE             256
Segments               1
Allocation             inherit
Read ahead sectors     0
Block device           253:2

lvscan

server1:~# lvscan
ACTIVE            ’/dev/fileserver/share’ [40.00 GB] inherit
ACTIVE            ’/dev/fileserver/backup’ [5.00 GB] inherit
ACTIVE            ’/dev/fileserver/films’ [1.00 GB] inherit

Next let’s delete the logical volume films:

lvremove /dev/fileserver/films

server1:~# lvremove /dev/fileserver/films
Do you really want to remove active logical volume ”films”? [y/n]: <– y
Logical volume ”films” successfully removed

We create the logical volume media again:

lvcreate –name media –size 1G fileserver

server1:~# lvcreate –name media  –size  1G fileserver
Logical volume ”media” created

Now let’s enlarge media from 1GB to 1.5GB:

lvextend -L1.5G /dev/fileserver/media

server1:~# lvextend -L1.5G /dev/fileserver/media
Extending logical volume media to 1.50 GB
Logical volume media successfully resized

Let’s shrink it to 1GB again:

lvreduce -L1G /dev/fileserver/media

server1:~# lvreduce -L1G /dev/fileserver/media
WARNING: Reducing active logical volume to 1.00 GB
THIS MAY DESTROY YOUR DATA (filesystem etc.)
Do you really want to reduce media? [y/n]: <– y
Reducing logical volume media to 1.00 GB
Logical volume media successfully resized

Until now we have three logical volumes, but we don’t have any filesystems in them, and without a filesystem we can’t save anything in them. Therefore we create an ext3 filesystem in share, an xfs filesystem in backup, and a reiserfs filesystem in media:

mkfs.ext3 /dev/fileserver/share

server1:~# mkfs.ext3 /dev/fileserver/share
mke2fs 1.40-WIP (14-Nov-2006)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
5242880 inodes, 10485760 blocks
524288 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=0
320 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624

Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 23 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.

mkfs.xfs /dev/fileserver/backup

server1:~# mkfs.xfs /dev/fileserver/backup
meta-data=/dev/fileserver/backup isize=256    agcount=8, agsize=163840 blks
=                       sectsz=512   attr=0
data     =                       bsize=4096   blocks=1310720, imaxpct=25
=                       sunit=0      swidth=0 blks, unwritten=1
naming   =version 2              bsize=4096
log      =internal log           bsize=4096   blocks=2560, version=1
=                       sectsz=512   sunit=0 blks
realtime =none                   extsz=65536  blocks=0, rtextents=0

mkfs.reiserfs /dev/fileserver/media

server1:~# mkfs.reiserfs /dev/fileserver/media
mkfs.reiserfs 3.6.19 (2003 www.namesys.com)

A pair of credits:
Alexander  Lyamin  keeps our hardware  running,  and was very  generous  to our
project in many little ways.

Chris Mason wrote the journaling code for V3,  which was enormously more useful
to users than just waiting until  we could create a wandering log filesystem as
Hans would have unwisely done without him.
Jeff Mahoney optimized the bitmap  scanning code for V3,  and performed the big
endian cleanups.

Guessing about desired format.. Kernel 2.6.17-2-486 is running.
Format 3.6 with standard journal
Count of blocks on the device: 262144
Number of blocks consumed by mkreiserfs formatting process: 8219
Blocksize: 4096
Hash function used to sort names: ”r5″
Journal Size 8193 blocks (first block 18)
Journal Max transaction length 1024
inode generation number: 0
UUID: 2bebf750-6e05-47b2-99b6-916fa7ea5398
ATTENTION: YOU SHOULD REBOOT AFTER FDISK!
ALL DATA WILL BE LOST ON ’/dev/fileserver/media’!
Continue (y/n):y
Initializing journal - 0%….20%….40%….60%….80%….100%
Syncing..ok

Tell your friends to use a kernel based on 2.4.18 or later, and especially not a
kernel based on 2.4.9, when you use reiserFS. Have fun.

ReiserFS is successfully created on /dev/fileserver/media.

Now we are ready to mount our logical volumes. I want to mount share in /var/share, backup in /var/backup, and media in /var/media, therefore we must create these directories first:

mkdir /var/media /var/backup /var/share

Now we can mount our logical volumes:

mount /dev/fileserver/share /var/share
mount /dev/fileserver/backup /var/backup
mount /dev/fileserver/media /var/media

Now run

df -h

You should see your logical volumes in the output:

server1:~# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda2              19G  665M   17G   4% /
tmpfs                  78M     0   78M   0% /lib/init/rw
udev                   10M   88K   10M   1% /dev
tmpfs                  78M     0   78M   0% /dev/shm
/dev/sda1             137M   17M  114M  13% /boot
/dev/mapper/fileserver-share
40G  177M   38G   1% /var/share
/dev/mapper/fileserver-backup
5.0G  144K  5.0G   1% /var/backup
/dev/mapper/fileserver-media
1.0G   33M  992M   4% /var/media

Congratulations, you’ve just set up your first LVM system! You can now write to and read from /var/share, /var/backup, and /var/media as usual.

We have mounted our logical volumes manually, but of course we’d like to have them mounted automatically when the system boots. Therefore we modify /etc/fstab:

mv /etc/fstab /etc/fstab_orig
cat /dev/null > /etc/fstab

vi /etc/fstab

Put the following into it:

# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
/dev/sda2       /               ext3    defaults,errors=remount-ro 0       1
/dev/sda1       /boot           ext3    defaults        0       2
/dev/hdc        /media/cdrom0   udf,iso9660 user,noauto     0       0
/dev/fd0        /media/floppy0  auto    rw,user,noauto  0       0
/dev/fileserver/share   /var/share     ext3       rw,noatime    0 0
/dev/fileserver/backup    /var/backup      xfs        rw,noatime    0 0
/dev/fileserver/media    /var/media      reiserfs   rw,noatime    0 0

If you compare it to our backup of the original file, /etc/fstab_orig, you will notice that we added the lines:

/dev/fileserver/share   /var/share     ext3       rw,noatime    0 0
/dev/fileserver/backup    /var/backup      xfs        rw,noatime    0 0
/dev/fileserver/media    /var/media      reiserfs   rw,noatime    0 0

Now we reboot the system:

shutdown -r now

After the system has come up again, run

df -h

again. It should still show our logical volumes in the output:

server1:~# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda2              19G  665M   17G   4% /
tmpfs                  78M     0   78M   0% /lib/init/rw
udev                   10M   88K   10M   1% /dev
tmpfs                  78M     0   78M   0% /dev/shm
/dev/sda1             137M   17M  114M  13% /boot
/dev/mapper/fileserver-share
40G  177M   38G   1% /var/share
/dev/mapper/fileserver-backup
5.0G  144K  5.0G   1% /var/backup
/dev/mapper/fileserver-media
1.0G   33M  992M   4% /var/media

4 Resize Logical Volumes And Their Filesystems

In this chapter we will learn how to resize our logical volume share which has an ext3 filesystem. (I will show how to resize logical volumes with xfs and reiserfs filesystems further down this tutorial.)

First we must unmount it:

umount /var/share

share should not be listed anymore in the

df -h

output:

server1:~# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda2              19G  665M   17G   4% /
tmpfs                  78M     0   78M   0% /lib/init/rw
udev                   10M   88K   10M   1% /dev
tmpfs                  78M     0   78M   0% /dev/shm
/dev/sda1             137M   17M  114M  13% /boot
/dev/mapper/fileserver-backup
5.0G  144K  5.0G   1% /var/backup
/dev/mapper/fileserver-media
1.0G   33M  992M   4% /var/media

Now let’s enlarge share from 40GB to 50GB:

lvextend -L50G /dev/fileserver/share

server1:~# lvextend -L50G /dev/fileserver/share
Extending logical volume share to 50.00 GB
Logical volume share successfully resized

Until now we have enlarged only share, but not the ext3 filesystem on share. This is what we do now:

e2fsck -f /dev/fileserver/share

server1:~# e2fsck -f /dev/fileserver/share
e2fsck 1.40-WIP (14-Nov-2006)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/fileserver/share: 11/5242880 files (9.1% non-contiguous), 209588/10485760 blocks

Make a note of the total amount of blocks (10485760) because we need it when we shrink share later on.

resize2fs /dev/fileserver/share

server1:~# resize2fs /dev/fileserver/share
resize2fs 1.40-WIP (14-Nov-2006)
Resizing the filesystem on /dev/fileserver/share to 13107200 (4k) blocks.
The filesystem on /dev/fileserver/share is now 13107200 blocks long.

Let’s mount share:

mount /dev/fileserver/share /var/share

and in the

df -h

output share should now have 50GB instead of 40:

server1:~# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda2              19G  665M   17G   4% /
tmpfs                  78M     0   78M   0% /lib/init/rw
udev                   10M   88K   10M   1% /dev
tmpfs                  78M     0   78M   0% /dev/shm
/dev/sda1             137M   17M  114M  13% /boot
/dev/mapper/fileserver-backup
5.0G  144K  5.0G   1% /var/backup
/dev/mapper/fileserver-media
1.0G   33M  992M   4% /var/media
/dev/mapper/fileserver-share
50G  180M   47G   1% /var/share

Shrinking a logical volume is the other way round: first we must shrink the filesystem before we reduce the logical volume’s size. Let’s shrink share to 40GB again:

umount /var/share

df -h

server1:~# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda2              19G  665M   17G   4% /
tmpfs                  78M     0   78M   0% /lib/init/rw
udev                   10M   88K   10M   1% /dev
tmpfs                  78M     0   78M   0% /dev/shm
/dev/sda1             137M   17M  114M  13% /boot
/dev/mapper/fileserver-backup
5.0G  144K  5.0G   1% /var/backup
/dev/mapper/fileserver-media
1.0G   33M  992M   4% /var/media

e2fsck -f /dev/fileserver/share

server1:~# e2fsck -f /dev/fileserver/share
e2fsck 1.40-WIP (14-Nov-2006)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/fileserver/share: 11/6553600 files (9.1% non-contiguous), 251733/13107200 blocks

When resizing an ext3 filesystem to a certain size (instead of all available space), resize2fs takes the number of blocks as argument (you can as well specify the new size in MB, etc. See

man resize2fs

for more details). From our previous operation we know the 40GB equals 10485760 blocks so we run

resize2fs /dev/fileserver/share 10485760

server1:~# resize2fs /dev/fileserver/share 10485760
resize2fs 1.40-WIP (14-Nov-2006)
Resizing the filesystem on /dev/fileserver/share to 10485760 (4k) blocks.
The filesystem on /dev/fileserver/share is now 10485760 blocks long.

We’ve shrinked the filesystem, now we must shrink the logical volume, too:

lvreduce -L40G /dev/fileserver/share

server1:~# lvreduce -L40G /dev/fileserver/share
WARNING: Reducing active logical volume to 40.00 GB
THIS MAY DESTROY YOUR DATA (filesystem etc.)
Do you really want to reduce share? [y/n]: <– y
Reducing logical volume share to 40.00 GB
Logical volume share successfully resized

We can ignore the warning that data might be destroyed because we have shrinked the filesystem before.

Let’s mount share again:

mount /dev/fileserver/share /var/share

The output of

df -h

should now look like this:

server1:~# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda2              19G  665M   17G   4% /
tmpfs                  78M     0   78M   0% /lib/init/rw
udev                   10M   88K   10M   1% /dev
tmpfs                  78M     0   78M   0% /dev/shm
/dev/sda1             137M   17M  114M  13% /boot
/dev/mapper/fileserver-backup
5.0G  144K  5.0G   1% /var/backup
/dev/mapper/fileserver-media
1.0G   33M  992M   4% /var/media
/dev/mapper/fileserver-share
40G  177M   38G   1% /var/share

5 Adding A Hard Drive And Removing Another One

We haven’t used /dev/sdf until now. We will now create the partition /dev/sdf1 (25GB) and add that to our fileserver volume group.

fdisk /dev/sdf

server1:~# fdisk /dev/sdf
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won’t be recoverable.

The number of cylinders for this disk is set to 10443.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 0×0000 of partition table 4 will be corrected by w(rite)

Command (m for help): <– m
Command action
a   toggle a bootable flag
b   edit bsd disklabel
c   toggle the dos compatibility flag
d   delete a partition
l   list known partition types
m   print this menu
n   add a new partition
o   create a new empty DOS partition table
p   print the partition table
q   quit without saving changes
s   create a new empty Sun disklabel
t   change a partition’s system id
u   change display/entry units
v   verify the partition table
w   write table to disk and exit
x   extra functionality (experts only)

Command (m for help): <– n
Command action
e   extended
p   primary partition (1-4)
<– p
Partition number (1-4): <– 1
First cylinder (1-10443, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-10443, default 10443): <– +25000M

Command (m for help): <– t
Selected partition 1
Hex code (type L to list codes): <– 8e
Changed system type of partition 1 to 8e (Linux LVM)

Command (m for help): <– w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.

Let’s prepare /dev/sdf1 for LVM:

pvcreate /dev/sdf1

server1:~# pvcreate /dev/sdf1
Physical volume ”/dev/sdf1″ successfully created

Add /dev/sdf1 to our fileserver volume group:

vgextend fileserver /dev/sdf1

Run

vgdisplay

VG Size should now be bigger than before:

server1:~# vgdisplay
— Volume group —
VG Name               fileserver
System ID
Format                lvm2
Metadata Areas        5
Metadata Sequence No  12
VG Access             read/write
VG Status             resizable
MAX LV                0
Cur LV                3
Open LV               3
Max PV                0
Cur PV                5
Act PV                5
VG Size               116.43 GB
PE Size               4.00 MB
Total PE              29805
Alloc PE / Size       11776 / 46.00 GB
Free  PE / Size       18029 / 70.43 GB
VG UUID               iWr1Vk-7h7J-hLRL-SHbx-3p87-Rq47-L1GyEO

That’s it. /dev/sdf1 has been added to the fileserver volume group.

Now let’s remove /dev/sdb1. Before we do this, we must copy all data on it to /dev/sdf1:

pvmove /dev/sdb1 /dev/sdf1

This can take some minutes:

server1:~# pvmove /dev/sdb1 /dev/sdf1
/dev/sdb1: Moved: 1.9%
/dev/sdb1: Moved: 3.8%
/dev/sdb1: Moved: 5.8%
/dev/sdb1: Moved: 7.8%
/dev/sdb1: Moved: 9.7%
/dev/sdb1: Moved: 11.6%
/dev/sdb1: Moved: 13.6%
/dev/sdb1: Moved: 15.6%
/dev/sdb1: Moved: 17.5%
/dev/sdb1: Moved: 19.4%
/dev/sdb1: Moved: 21.4%
[...]
/dev/sdb1: Moved: 85.7%
/dev/sdb1: Moved: 87.7%
/dev/sdb1: Moved: 89.7%
/dev/sdb1: Moved: 91.7%
/dev/sdb1: Moved: 93.6%
/dev/sdb1: Moved: 95.5%
/dev/sdb1: Moved: 97.5%
/dev/sdb1: Moved: 99.4%
/dev/sdb1: Moved: 100.0%

Next we remove /dev/sdb1 from the fileserver volume group:

vgreduce fileserver /dev/sdb1

server1:~# vgreduce fileserver /dev/sdb1
Removed ”/dev/sdb1″ from volume group ”fileserver”

vgdisplay

server1:~# vgdisplay
— Volume group —
VG Name               fileserver
System ID
Format                lvm2
Metadata Areas        4
Metadata Sequence No  16
VG Access             read/write
VG Status             resizable
MAX LV                0
Cur LV                3
Open LV               3
Max PV                0
Cur PV                4
Act PV                4
VG Size               93.14 GB
PE Size               4.00 MB
Total PE              23844
Alloc PE / Size       11776 / 46.00 GB
Free  PE / Size       12068 / 47.14 GB
VG UUID               iWr1Vk-7h7J-hLRL-SHbx-3p87-Rq47-L1GyEO

Then we run

pvremove /dev/sdb1

/dev/sdb1 shouldn’t be listed as a physical volume anymore:

pvdisplay

server1:~# pvdisplay
— Physical volume —
PV Name               /dev/sdc1
VG Name               fileserver
PV Size               23.29 GB / not usable 0
Allocatable           yes
PE Size (KByte)       4096
Total PE              5961
Free PE               1682
Allocated PE          4279
PV UUID               40GJyh-IbsI-pzhn-TDRq-PQ3l-3ut0-AVSE4B

— Physical volume —
PV Name               /dev/sdd1
VG Name               fileserver
PV Size               23.29 GB / not usable 0
Allocatable           yes
PE Size (KByte)       4096
Total PE              5961
Free PE               4681
Allocated PE          1280
PV UUID               4mU63D-4s26-uL00-r0pO-Q0hP-mvQR-2YJN5B

— Physical volume —
PV Name               /dev/sde1
VG Name               fileserver
PV Size               23.29 GB / not usable 0
Allocatable           yes
PE Size (KByte)       4096
Total PE              5961
Free PE               5705
Allocated PE          256
PV UUID               3upcZc-4eS2-h4r4-iBKK-gZJv-AYt3-EKdRK6

— Physical volume —
PV Name               /dev/sdf1
VG Name               fileserver
PV Size               23.29 GB / not usable 0
Allocatable           yes (but full)
PE Size (KByte)       4096
Total PE              5961
Free PE               0
Allocated PE          5961
PV UUID               1xgo2I-SBjj-0MAz-lmDu-OLZ1-3NdO-mLkS20

You could now remove /dev/sdb from the system (if this was a real system and not a virtual machine).

6 Return To The System’s Original State

In this chapter we will undo all changes from the previous chapters to return to the system’s original state. This is just for training purposes so that you learn how to undo an LVM setup.

First we must unmount our logical volumes:

umount /var/share
umount /var/backup
umount /var/media

df -h

server1:~# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda2              19G  665M   17G   4% /
tmpfs                  78M     0   78M   0% /lib/init/rw
udev                   10M   92K   10M   1% /dev
tmpfs                  78M     0   78M   0% /dev/shm
/dev/sda1             137M   17M  114M  13% /boot

Then we delete each of them:

lvremove /dev/fileserver/share

server1:~# lvremove /dev/fileserver/share
Do you really want to remove active logical volume ”share”? [y/n]: <– y
Logical volume ”share” successfully removed

lvremove /dev/fileserver/backup

server1:~# lvremove /dev/fileserver/backup
Do you really want to remove active logical volume ”backup”? [y/n]: <– y
Logical volume ”backup” successfully removed

lvremove /dev/fileserver/media

server1:~# lvremove /dev/fileserver/media
Do you really want to remove active logical volume ”media”? [y/n]: <– y
Logical volume ”media” successfully removed

Next we remove the volume group fileserver:

vgremove fileserver

server1:~# vgremove fileserver
Volume group ”fileserver” successfully removed

Finally we do this:

pvremove /dev/sdc1 /dev/sdd1 /dev/sde1 /dev/sdf1

server1:~# pvremove  /dev/sdc1 /dev/sdd1 /dev/sde1 /dev/sdf1
Labels on physical volume ”/dev/sdc1″ successfully wiped
Labels on physical volume ”/dev/sdd1″ successfully wiped
Labels on physical volume ”/dev/sde1″ successfully wiped
Labels on physical volume ”/dev/sdf1″ successfully wiped

vgdisplay

server1:~# vgdisplay
No volume groups found

pvdisplay

should display nothing at all:

server1:~# pvdisplay

Now we must undo our changes in /etc/fstab to avoid that the system tries to mount non-existing devices. Fortunately we have made a backup of the original file that we can copy back now:

mv /etc/fstab_orig /etc/fstab

Reboot the system:

shutdown -r now

Afterwards the output of

df -h

should look like this:

server1:~# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda2              19G  666M   17G   4% /
tmpfs                  78M     0   78M   0% /lib/init/rw
udev                   10M   92K   10M   1% /dev
tmpfs                  78M     0   78M   0% /dev/shm
/dev/sda1             137M   17M  114M  13% /boot

Now the system is like it was in the beginning (except that the partitions /dev/sdb1 – /dev/sdf1 still exist – you could delete them with fdisk but we don’t do this now – as well as the directories /var/share, /var/backup, and /var/media which we also don’t delete).

7 LVM On RAID1

In this chapter we will set up LVM again and move it to a RAID1 array to guarantee for high-availability. In the end this should look like this:

This means we will make the RAID array /dev/md0 from the partitions /dev/sdb1 + /dev/sdc1, and the RAID array /dev/md1 from the partitions /dev/sdd1 + /dev/sde1. /dev/md0 and /dev/md1 will then be the physical volumes for LVM.

Before we come to that, we set up LVM as before:

pvcreate /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1
vgcreate fileserver /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1
lvcreate –name share –size 40G fileserver
lvcreate –name backup –size 5G fileserver
lvcreate –name media –size 1G fileserver

mkfs.ext3 /dev/fileserver/share
mkfs.xfs /dev/fileserver/backup
mkfs.reiserfs /dev/fileserver/media

Then we mount our logical volumes:

mount /dev/fileserver/share /var/share
mount /dev/fileserver/backup /var/backup
mount /dev/fileserver/media /var/media

The output of

df -h

should now look like this:

server1:~# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda2              19G  666M   17G   4% /
tmpfs                  78M     0   78M   0% /lib/init/rw
udev                   10M   92K   10M   1% /dev
tmpfs                  78M     0   78M   0% /dev/shm
/dev/sda1             137M   17M  114M  13% /boot
/dev/mapper/fileserver-share
40G  177M   38G   1% /var/share
/dev/mapper/fileserver-backup
5.0G  144K  5.0G   1% /var/backup
/dev/mapper/fileserver-media
1.0G   33M  992M   4% /var/media

Now we must move the contents of /dev/sdc1 and /dev/sde1 (/dev/sdc1 is the second partition of our future /dev/md0, /dev/sde1 the second partition of our future /dev/md1) to the remaining partitions, because we will afterwards remove them from LVM and format them with the type fd (Linux RAID autodetect) and move them to /dev/md0 resp. /dev/md1.

modprobe dm-mirror
pvmove /dev/sdc1

vgreduce fileserver /dev/sdc1
pvremove /dev/sdc1

pvdisplay

server1:~# pvdisplay
— Physical volume —
PV Name               /dev/sdb1
VG Name               fileserver
PV Size               23.29 GB / not usable 0
Allocatable           yes (but full)
PE Size (KByte)       4096
Total PE              5961
Free PE               0
Allocated PE          5961
PV UUID               USDJyG-VDM2-r406-OjQo-h3eb-c9Mp-4nvnvu

— Physical volume —
PV Name               /dev/sdd1
VG Name               fileserver
PV Size               23.29 GB / not usable 0
Allocatable           yes
PE Size (KByte)       4096
Total PE              5961
Free PE               4681
Allocated PE          1280
PV UUID               qdEB5d-389d-O5UA-Kbwv-mn1y-74FY-4zublN

— Physical volume —
PV Name               /dev/sde1
VG Name               fileserver
PV Size               23.29 GB / not usable 0
Allocatable           yes
PE Size (KByte)       4096
Total PE              5961
Free PE               1426
Allocated PE          4535
PV UUID               4vL1e0-sr2M-awGd-qDJm-ZrC9-wuxW-2lEqp2

pvmove /dev/sde1

vgreduce fileserver /dev/sde1
pvremove /dev/sde1

pvdisplay

server1:~# pvdisplay
— Physical volume —
PV Name               /dev/sdb1
VG Name               fileserver
PV Size               23.29 GB / not usable 0
Allocatable           yes (but full)
PE Size (KByte)       4096
Total PE              5961
Free PE               0
Allocated PE          5961
PV UUID               USDJyG-VDM2-r406-OjQo-h3eb-c9Mp-4nvnvu

— Physical volume —
PV Name               /dev/sdd1
VG Name               fileserver
PV Size               23.29 GB / not usable 0
Allocatable           yes
PE Size (KByte)       4096
Total PE              5961
Free PE               146
Allocated PE          5815
PV UUID               qdEB5d-389d-O5UA-Kbwv-mn1y-74FY-4zublN

Now we format /dev/sdc1 with the type fd (Linux RAID autodetect):

fdisk /dev/sdc

server1:~# fdisk /dev/sdc

The number of cylinders for this disk is set to 10443.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): <– m
Command action
a   toggle a bootable flag
b   edit bsd disklabel
c   toggle the dos compatibility flag
d   delete a partition
l   list known partition types
m   print this menu
n   add a new partition
o   create a new empty DOS partition table
p   print the partition table
q   quit without saving changes
s   create a new empty Sun disklabel
t   change a partition’s system id
u   change display/entry units
v   verify the partition table
w   write table to disk and exit
x   extra functionality (experts only)

Command (m for help): <– t
Selected partition 1
Hex code (type L to list codes): <– L

0  Empty           1e  Hidden W95 FAT1 80  Old Minix       be  Solaris boot
1  FAT12           24  NEC DOS         81  Minix / old Lin bf  Solaris
2  XENIX root      39  Plan 9          82  Linux swap / So c1  DRDOS/sec (FAT-
3  XENIX usr       3c  PartitionMagic  83  Linux           c4  DRDOS/sec (FAT-
4  FAT16 <32M      40  Venix 80286     84  OS/2 hidden C:  c6  DRDOS/sec (FAT-
5  Extended        41  PPC PReP Boot   85  Linux extended  c7  Syrinx
6  FAT16           42  SFS             86  NTFS volume set da  Non-FS data
7  HPFS/NTFS       4d  QNX4.x          87  NTFS volume set db  CP/M / CTOS / .
8  AIX             4e  QNX4.x 2nd part 88  Linux plaintext de  Dell Utility
9  AIX bootable    4f  QNX4.x 3rd part 8e  Linux LVM       df  BootIt
a  OS/2 Boot Manag 50  OnTrack DM      93  Amoeba          e1  DOS access
b  W95 FAT32       51  OnTrack DM6 Aux 94  Amoeba BBT      e3  DOS R/O
c  W95 FAT32 (LBA) 52  CP/M            9f  BSD/OS          e4  SpeedStor
e  W95 FAT16 (LBA) 53  OnTrack DM6 Aux a0  IBM Thinkpad hi eb  BeOS fs
f  W95 Ext’d (LBA) 54  OnTrackDM6      a5  FreeBSD         ee  EFI GPT
10  OPUS            55  EZ-Drive        a6  OpenBSD         ef  EFI (FAT-12/16/
11  Hidden FAT12    56  Golden Bow      a7  NeXTSTEP        f0  Linux/PA-RISC b
12  Compaq diagnost 5c  Priam Edisk     a8  Darwin UFS      f1  SpeedStor
14  Hidden FAT16 <3 61  SpeedStor       a9  NetBSD          f4  SpeedStor
16  Hidden FAT16    63  GNU HURD or Sys ab  Darwin boot     f2  DOS secondary
17  Hidden HPFS/NTF 64  Novell Netware  b7  BSDI fs         fd  Linux raid auto
18  AST SmartSleep  65  Novell Netware  b8  BSDI swap       fe  LANstep
1b  Hidden W95 FAT3 70  DiskSecure Mult bb  Boot Wizard hid ff  BBT
1c  Hidden W95 FAT3 75  PC/IX
Hex code (type L to list codes): <– fd
Changed system type of partition 1 to fd (Linux raid autodetect)

Command (m for help): <– w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.

Now do the same with /dev/sde1:

fdisk /dev/sde

The output of

fdisk -l

should now look like this:

server1:~# fdisk -l

Disk /dev/sda: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          18      144553+  83  Linux
/dev/sda2              19        2450    19535040   83  Linux
/dev/sda4            2451        2610     1285200   82  Linux swap / Solaris

Disk /dev/sdb: 85.8 GB, 85899345920 bytes
255 heads, 63 sectors/track, 10443 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1        3040    24418768+  8e  Linux LVM

Disk /dev/sdc: 85.8 GB, 85899345920 bytes
255 heads, 63 sectors/track, 10443 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1        3040    24418768+  fd  Linux raid autodetect

Disk /dev/sdd: 85.8 GB, 85899345920 bytes
255 heads, 63 sectors/track, 10443 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot      Start         End      Blocks   Id  System
/dev/sdd1               1        3040    24418768+  8e  Linux LVM

Disk /dev/sde: 85.8 GB, 85899345920 bytes
255 heads, 63 sectors/track, 10443 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot      Start         End      Blocks   Id  System
/dev/sde1               1        3040    24418768+  fd  Linux raid autodetect

Disk /dev/sdf: 85.8 GB, 85899345920 bytes
255 heads, 63 sectors/track, 10443 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot      Start         End      Blocks   Id  System
/dev/sdf1               1        3040    24418768+  8e  Linux LVM

Next we add /dev/sdc1 to /dev/md0 and /dev/sde1 to /dev/md1. Because the second nodes (/dev/sdb1 and /dev/sdd1) are not ready yet, we must specify missing in the following commands:

mdadm –create /dev/md0 –auto=yes -l 1 -n 2 /dev/sdc1 missing

server1:~# mdadm –create /dev/md0 –auto=yes -l 1 -n 2 /dev/sdc1 missing
mdadm: array /dev/md0 started.

mdadm –create /dev/md1 –auto=yes -l 1 -n 2 /dev/sde1 missing

server1:~# mdadm –create /dev/md1 –auto=yes -l 1 -n 2 /dev/sde1 missing
mdadm: array /dev/md1 started.

Afterwards we prepare /dev/md0 and /dev/md1 for LVM:

pvcreate /dev/md0 /dev/md1

server1:~# pvcreate /dev/md0 /dev/md1
Physical volume ”/dev/md0″ successfully created
Physical volume ”/dev/md1″ successfully created

and extend our fileserver volume group:

vgextend fileserver /dev/md0 /dev/md1

server1:~# vgextend fileserver /dev/md0 /dev/md1
Volume group ”fileserver” successfully extended

The outputs of

pvdisplay

and

vgdisplay

should look like this:

server1:~# pvdisplay
— Physical volume —
PV Name               /dev/sdb1
VG Name               fileserver
PV Size               23.29 GB / not usable 0
Allocatable           yes (but full)
PE Size (KByte)       4096
Total PE              5961
Free PE               0
Allocated PE          5961
PV UUID               USDJyG-VDM2-r406-OjQo-h3eb-c9Mp-4nvnvu

— Physical volume —
PV Name               /dev/sdd1
VG Name               fileserver
PV Size               23.29 GB / not usable 0
Allocatable           yes
PE Size (KByte)       4096
Total PE              5961
Free PE               146
Allocated PE          5815
PV UUID               qdEB5d-389d-O5UA-Kbwv-mn1y-74FY-4zublN

— Physical volume —
PV Name               /dev/md0
VG Name               fileserver
PV Size               23.29 GB / not usable 0
Allocatable           yes
PE Size (KByte)       4096
Total PE              5961
Free PE               5961
Allocated PE          0
PV UUID               7JHUXF-1R2p-OjbJ-X1OT-uaeg-gWRx-H6zx3P

— Physical volume —
PV Name               /dev/md1
VG Name               fileserver
PV Size               23.29 GB / not usable 0
Allocatable           yes
PE Size (KByte)       4096
Total PE              5961
Free PE               5961
Allocated PE          0
PV UUID               pwQ5AJ-RwVK-EebA-0Z13-d27d-2IdP-HqT5RW

server1:~# vgdisplay
— Volume group —
VG Name               fileserver
System ID
Format                lvm2
Metadata Areas        4
Metadata Sequence No  14
VG Access             read/write
VG Status             resizable
MAX LV                0
Cur LV                3
Open LV               3
Max PV                0
Cur PV                4
Act PV                4
VG Size               93.14 GB
PE Size               4.00 MB
Total PE              23844
Alloc PE / Size       11776 / 46.00 GB
Free  PE / Size       12068 / 47.14 GB
VG UUID               dQDEHT-kNHf-UjRm-rmJ3-OUYx-9G1t-aVskI1

Now we move the contents of /dev/sdb1 to /dev/md0 and the contents of /dev/sdd1 to /dev/md1, then we remove /dev/sdb1 and /dev/sdd1 from LVM:

pvmove /dev/sdb1 /dev/md0

pvmove /dev/sdd1 /dev/md1

vgreduce fileserver /dev/sdb1 /dev/sdd1
pvremove /dev/sdb1 /dev/sdd1

Now only /dev/md0 and /dev/md1 should be left as physical volumes:

pvdisplay

server1:~# pvdisplay
— Physical volume —
PV Name               /dev/md0
VG Name               fileserver
PV Size               23.29 GB / not usable 0
Allocatable           yes (but full)
PE Size (KByte)       4096
Total PE              5961
Free PE               0
Allocated PE          5961
PV UUID               7JHUXF-1R2p-OjbJ-X1OT-uaeg-gWRx-H6zx3P

— Physical volume —
PV Name               /dev/md1
VG Name               fileserver
PV Size               23.29 GB / not usable 0
Allocatable           yes
PE Size (KByte)       4096
Total PE              5961
Free PE               146
Allocated PE          5815
PV UUID               pwQ5AJ-RwVK-EebA-0Z13-d27d-2IdP-HqT5RW

Now we format /dev/sdb1 with fd (Linux RAID autodetect):

fdisk /dev/sdb

server1:~# fdisk /dev/sdb

The number of cylinders for this disk is set to 32635.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): <– m
Command action
a   toggle a bootable flag
b   edit bsd disklabel
c   toggle the dos compatibility flag
d   delete a partition
l   list known partition types
m   print this menu
n   add a new partition
o   create a new empty DOS partition table
p   print the partition table
q   quit without saving changes
s   create a new empty Sun disklabel
t   change a partition’s system id
u   change display/entry units
v   verify the partition table
w   write table to disk and exit
x   extra functionality (experts only)

Command (m for help): <– t
Selected partition 1
Hex code (type L to list codes): <– fd
Changed system type of partition 1 to fd (Linux raid autodetect)

Command (m for help): <– w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.

Do the same with /dev/sdd1:

fdisk /dev/sdd

Next add /dev/sdb1 to /dev/md0 and /dev/sdd1 to /dev/md1:

mdadm –manage /dev/md0 –add /dev/sdb1

server1:~# mdadm –manage /dev/md0 –add /dev/sdb1
mdadm: added /dev/sdb1

mdadm –manage /dev/md1 –add /dev/sdd1

server1:~# mdadm –manage /dev/md1 –add /dev/sdd1
mdadm: added /dev/sdd1

Now the two RAID arrays will be synchronized. This will take some time, you can check with

cat /proc/mdstat

when the process is finished. The output looks like this for an unfinished process:

server1:~# cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid5] [raid4] [raid6] [raid10]
md1 : active raid1 sdd1[2] sde1[0]
24418688 blocks [2/1] [U_]
[=>...................]  recovery =  6.4% (1586560/24418688) finish=1.9min speed=198320K/sec

md0 : active raid1 sdb1[2] sdc1[0]
24418688 blocks [2/1] [U_]
[==>..................]  recovery = 10.5% (2587264/24418688) finish=2.8min speed=129363K/sec

unused devices: <none>

and like this when the process is finished:

server1:~# cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid5] [raid4] [raid6] [raid10]
md1 : active raid1 sdd1[1] sde1[0]
24418688 blocks [2/2] [UU]

md0 : active raid1 sdb1[1] sdc1[0]
24418688 blocks [2/2] [UU]

unused devices: <none>

If you have a look at PV Size in the output of

pvdisplay

you will see that 2 * 23.29GB = 46.58GB are available, however only 40GB (share) + 5GB (backup) + 1GB (media) = 46GB are used which means we could extend one of our logical devices with about 0.5GB. I’ve already shown how to extend an ext3 logical volume (share), so we will resize media now which uses reiserfs. reiserfs filesystems can be resized without unmounting:

lvextend -L1.5G /dev/fileserver/media

server1:~# lvextend -L1.5G /dev/fileserver/media
Extending logical volume media to 1.50 GB
Logical volume media successfully resized

resize_reiserfs /dev/fileserver/media

server1:~# resize_reiserfs /dev/fileserver/media
resize_reiserfs 3.6.19 (2003 www.namesys.com)

resize_reiserfs: On-line resizing finished successfully.

The output of

df -h

looks like this:

server1:~# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda2              19G  666M   17G   4% /
tmpfs                  78M     0   78M   0% /lib/init/rw
udev                   10M   92K   10M   1% /dev
tmpfs                  78M     0   78M   0% /dev/shm
/dev/sda1             137M   17M  114M  13% /boot
/dev/mapper/fileserver-share
40G  177M   38G   1% /var/share
/dev/mapper/fileserver-backup
5.0G  144K  5.0G   1% /var/backup
/dev/mapper/fileserver-media
1.5G   33M  1.5G   3% /var/media

If we want our logical volumes to be mounted automatically at boot time, we must modify /etc/fstab again (like in chapter 3):

mv /etc/fstab /etc/fstab_orig
cat /dev/null > /etc/fstab

vi /etc/fstab

Put the following into it:

# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
/dev/sda2       /               ext3    defaults,errors=remount-ro 0       1
/dev/sda1       /boot           ext3    defaults        0       2
/dev/hdc        /media/cdrom0   udf,iso9660 user,noauto     0       0
/dev/fd0        /media/floppy0  auto    rw,user,noauto  0       0
/dev/fileserver/share   /var/share     ext3       rw,noatime    0 0
/dev/fileserver/backup    /var/backup      xfs        rw,noatime    0 0
/dev/fileserver/media    /var/media      reiserfs   rw,noatime    0 0

If you compare it to our backup of the original file, /etc/fstab_orig, you will notice that we added the lines:

/dev/fileserver/share   /var/share     ext3       rw,noatime    0 0
/dev/fileserver/backup    /var/backup      xfs        rw,noatime    0 0
/dev/fileserver/media    /var/media      reiserfs   rw,noatime    0 0

Now we reboot the system:

shutdown -r now

After the system has come up again, run

df -h

again. It should still show our logical volumes in the output:

server1:~# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda2              19G  666M   17G   4% /
tmpfs                  78M     0   78M   0% /lib/init/rw
udev                   10M  100K   10M   1% /dev
tmpfs                  78M     0   78M   0% /dev/shm
/dev/sda1             137M   17M  114M  13% /boot
/dev/mapper/fileserver-share
40G  177M   38G   1% /var/share
/dev/mapper/fileserver-backup
5.0G  144K  5.0G   1% /var/backup
/dev/mapper/fileserver-media
1.5G   33M  1.5G   3% /var/media

Now we are finished with our LVM on RAID1 setup.

8 Replacing The Hard Disks With Bigger Ones

We are currently using four hard disks with a size of 25GB each (at least we are acting like that). Now let’s assume this isn’t enough anymore, and we need more space in our RAID setup. Therefore we will replace our 25GB hard disks with 80GB hard disks (in fact we will still use the current hard disks, but use their full capacity now – in the real life you would replace your old, small hard disks with new, bigger ones).

The procedure is as follows: first we remove /dev/sdb and /dev/sdd from the RAID arrays, replace them with bigger hard disks, put them back into the RAID arrays, and then we do the same again with /dev/sdc and /dev/sde.

First we mark /dev/sdb1 as failed:

mdadm –manage /dev/md0 –fail /dev/sdb1

server1:~# mdadm –manage /dev/md0 –fail /dev/sdb1
mdadm: set /dev/sdb1 faulty in /dev/md0

The output of

cat /proc/mdstat

looks now like this:

server1:~# cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid5] [raid4] [raid6] [raid10]
md0 : active raid1 sdc1[0] sdb1[2](F)
24418688 blocks [2/1] [U_]

md1 : active raid1 sde1[0] sdd1[1]
24418688 blocks [2/2] [UU]

unused devices: <none>

Then we remove /dev/sdb1 from the RAID array /dev/md0:

mdadm –manage /dev/md0 –remove /dev/sdb1

server1:~# mdadm –manage /dev/md0 –remove /dev/sdb1
mdadm: hot removed /dev/sdb1

cat /proc/mdstat

server1:~# cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid5] [raid4] [raid6] [raid10]
md0 : active raid1 sdc1[0]
24418688 blocks [2/1] [U_]

md1 : active raid1 sde1[0] sdd1[1]
24418688 blocks [2/2] [UU]

unused devices: <none>

Now we do the same with /dev/sdd1:

mdadm –manage /dev/md1 –fail /dev/sdd1

server1:~# mdadm –manage /dev/md1 –fail /dev/sdd1
mdadm: set /dev/sdd1 faulty in /dev/md1

cat /proc/mdstat

server1:~# cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid5] [raid4] [raid6] [raid10]
md0 : active raid1 sdc1[0]
24418688 blocks [2/1] [U_]

md1 : active raid1 sde1[0] sdd1[2](F)
24418688 blocks [2/1] [U_]

unused devices: <none>

mdadm –manage /dev/md1 –remove /dev/sdd1

server1:~# mdadm –manage /dev/md1 –remove /dev/sdd1
mdadm: hot removed /dev/sdd1

cat /proc/mdstat

server1:~# cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid5] [raid4] [raid6] [raid10]
md0 : active raid1 sdc1[0]
24418688 blocks [2/1] [U_]

md1 : active raid1 sde1[0]
24418688 blocks [2/1] [U_]

unused devices: <none>

On a real system you would now shut it down, pull out the 25GB /dev/sdb and /dev/sdd and replace them with 80GB ones. As I said before, we don’t have to do this because all hard disks already have a capacity of 80GB.

Next we must format /dev/sdb and /dev/sdd. We must create a /dev/sdb1 resp. /dev/sdd1 partition, type fd (Linux RAID autodetect), size 25GB (the same settings as on the old hard disks), and a /dev/sdb2 resp. /dev/sdd2 partition, type fd, that cover the rest of the hard disks. As /dev/sdb1 and /dev/sdd1 are still present on our hard disks, we only have to create /dev/sdb2 and /dev/sdd2 in this special example.

fdisk /dev/sdb

server1:~# fdisk /dev/sdb

The number of cylinders for this disk is set to 10443.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): <– p

Disk /dev/sdb: 85.8 GB, 85899345920 bytes
255 heads, 63 sectors/track, 10443 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1        3040    24418768+  fd  Linux raid autodetect

Command (m for help): <– n
Command action
e   extended
p   primary partition (1-4)
<– p
Partition number (1-4): <– 2
First cylinder (3041-10443, default 3041): <– <ENTER>
Using default value 3041
Last cylinder or +size or +sizeM or +sizeK (3041-10443, default 10443): <– <ENTER>
Using default value 10443

Command (m for help): <– t
Partition number (1-4): <– 2
Hex code (type L to list codes): <– fd
Changed system type of partition 2 to fd (Linux raid autodetect)

Command (m for help): <– w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.

Do the same for /dev/sdd:

fdisk /dev/sdd

The output of

fdisk -l

looks now like this:

server1:~# fdisk -l

Disk /dev/sda: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          18      144553+  83  Linux
/dev/sda2              19        2450    19535040   83  Linux
/dev/sda4            2451        2610     1285200   82  Linux swap / Solaris

Disk /dev/sdb: 85.8 GB, 85899345920 bytes
255 heads, 63 sectors/track, 10443 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1        3040    24418768+  fd  Linux raid autodetect
/dev/sdb2            3041       10443    59464597+  fd  Linux raid autodetect

Disk /dev/sdc: 85.8 GB, 85899345920 bytes
255 heads, 63 sectors/track, 10443 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1        3040    24418768+  fd  Linux raid autodetect

Disk /dev/sdd: 85.8 GB, 85899345920 bytes
255 heads, 63 sectors/track, 10443 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot      Start         End      Blocks   Id  System
/dev/sdd1               1        3040    24418768+  fd  Linux raid autodetect
/dev/sdd2            3041       10443    59464597+  fd  Linux raid autodetect

Disk /dev/sde: 85.8 GB, 85899345920 bytes
255 heads, 63 sectors/track, 10443 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot      Start         End      Blocks   Id  System
/dev/sde1               1        3040    24418768+  fd  Linux raid autodetect

Disk /dev/sdf: 85.8 GB, 85899345920 bytes
255 heads, 63 sectors/track, 10443 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot      Start         End      Blocks   Id  System
/dev/sdf1               1        3040    24418768+  8e  Linux LVM

Disk /dev/md1: 25.0 GB, 25004736512 bytes
2 heads, 4 sectors/track, 6104672 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md1 doesn’t contain a valid partition table

Disk /dev/md0: 25.0 GB, 25004736512 bytes
2 heads, 4 sectors/track, 6104672 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md0 doesn’t contain a valid partition table

Now we add /dev/sdb1 to /dev/md0 again and /dev/sdd1 to /dev/md1:

mdadm –manage /dev/md0 –add /dev/sdb1

server1:~# mdadm –manage /dev/md0 –add /dev/sdb1
mdadm: re-added /dev/sdb1

mdadm –manage /dev/md1 –add /dev/sdd1

server1:~# mdadm –manage /dev/md1 –add /dev/sdd1
mdadm: re-added /dev/sdd1

Now the contents of both RAID arrays will be synchronized. We must wait until this is finished before we can go on. We can check the status of the synchronization with

cat /proc/mdstat

The output looks like this during synchronization:

server1:~# cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid5] [raid4] [raid6] [raid10]
md0 : active raid1 sdb1[1] sdc1[0]
24418688 blocks [2/1] [U_]
[=>...................]  recovery =  9.9% (2423168/24418688) finish=2.8min speed=127535K/sec

md1 : active raid1 sdd1[1] sde1[0]
24418688 blocks [2/1] [U_]
[=>...................]  recovery =  6.4% (1572096/24418688) finish=1.9min speed=196512K/sec

unused devices: <none>

and like this when it’s finished:

server1:~# cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid5] [raid4] [raid6] [raid10]
md0 : active raid1 sdb1[1] sdc1[0]
24418688 blocks [2/2] [UU]

md1 : active raid1 sdd1[1] sde1[0]
24418688 blocks [2/2] [UU]

unused devices: <none>

Now we do the same process again, this time replacing /dev/sdc and /dev/sde:

mdadm –manage /dev/md0 –fail /dev/sdc1
mdadm –manage /dev/md0 –remove /dev/sdc1
mdadm –manage /dev/md1 –fail /dev/sde1
mdadm –manage /dev/md1 –remove /dev/sde1

fdisk /dev/sdc
fdisk /dev/sde

mdadm –manage /dev/md0 –add /dev/sdc1
mdadm –manage /dev/md1 –add /dev/sde1

cat /proc/mdstat

Wait until the synchronization has finished.

Next we create the RAID arrays /dev/md2 from /dev/sdb2 and /dev/sdc2 as well as /dev/md3 from /dev/sdd2 and /dev/sde2.

mdadm –create /dev/md2 –auto=yes -l 1 -n 2 /dev/sdb2 /dev/sdc2

server1:~# mdadm –create /dev/md2 –auto=yes -l 1 -n 2 /dev/sdb2 /dev/sdc2
mdadm: array /dev/md2 started.

mdadm –create /dev/md3 –auto=yes -l 1 -n 2 /dev/sdd2 /dev/sde2

server1:~# mdadm –create /dev/md3 –auto=yes -l 1 -n 2 /dev/sdd2 /dev/sde2
mdadm: array /dev/md3 started.

The new RAID arrays must be synchronized before we go on, so you should check

cat /proc/mdstat

server1:~# cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid5] [raid4] [raid6] [raid10]
md3 : active raid1 sde2[1] sdd2[0]
59464512 blocks [2/2] [UU]
[=>...................]  resync =  5.1% (3044224/59464512) finish=5.5min speed=169123K/sec

md2 : active raid1 sdc2[1] sdb2[0]
59464512 blocks [2/2] [UU]
[=>...................]  resync =  5.5% (3312512/59464512) finish=9.3min speed=100379K/sec

md0 : active raid1 sdc1[0] sdb1[1]
24418688 blocks [2/2] [UU]

md1 : active raid1 sde1[0] sdd1[1]
24418688 blocks [2/2] [UU]

unused devices: <none>

After the synchronization has finished, we prepare /dev/md2 and /dev/md3 for LVM:

pvcreate /dev/md2 /dev/md3

server1:~# pvcreate /dev/md2 /dev/md3
Physical volume ”/dev/md2″ successfully created
Physical volume ”/dev/md3″ successfully created

and add /dev/md2 and /dev/md3 to our fileserver volume group:

vgextend fileserver /dev/md2 /dev/md3

server1:~# vgextend fileserver /dev/md2 /dev/md3
Volume group ”fileserver” successfully extended

Now let’s run our *display commands:

pvdisplay

server1:~# pvdisplay
— Physical volume —
PV Name               /dev/md0
VG Name               fileserver
PV Size               23.29 GB / not usable 0
Allocatable           yes (but full)
PE Size (KByte)       4096
Total PE              5961
Free PE               0
Allocated PE          5961
PV UUID               7JHUXF-1R2p-OjbJ-X1OT-uaeg-gWRx-H6zx3P

— Physical volume —
PV Name               /dev/md1
VG Name               fileserver
PV Size               23.29 GB / not usable 0
Allocatable           yes
PE Size (KByte)       4096
Total PE              5961
Free PE               18
Allocated PE          5943
PV UUID               pwQ5AJ-RwVK-EebA-0Z13-d27d-2IdP-HqT5RW

— Physical volume —
PV Name               /dev/md2
VG Name               fileserver
PV Size               56.71 GB / not usable 0
Allocatable           yes
PE Size (KByte)       4096
Total PE              14517
Free PE               14517
Allocated PE          0
PV UUID               300kTo-evxm-rfmf-90LA-4YOJ-2LG5-t4JHnf

— Physical volume —
PV Name               /dev/md3
VG Name               fileserver
PV Size               56.71 GB / not usable 0
Allocatable           yes
PE Size (KByte)       4096
Total PE              14517
Free PE               14517
Allocated PE          0
PV UUID               LXFSW6-7LQX-ZGGU-dV95-jQgg-TK44-U5JOjO

vgdisplay

server1:~# vgdisplay
— Volume group —
VG Name               fileserver
System ID
Format                lvm2
Metadata Areas        4
Metadata Sequence No  26
VG Access             read/write
VG Status             resizable
MAX LV                0
Cur LV                3
Open LV               3
Max PV                0
Cur PV                4
Act PV                4
VG Size               159.98 GB
PE Size               4.00 MB
Total PE              40956
Alloc PE / Size       11904 / 46.50 GB
Free  PE / Size       29052 / 113.48 GB
VG UUID               dQDEHT-kNHf-UjRm-rmJ3-OUYx-9G1t-aVskI1

lvdisplay

server1:~# lvdisplay
— Logical volume —
LV Name                /dev/fileserver/share
VG Name                fileserver
LV UUID                bcn3Oi-vW3p-WoyX-QlF2-xEtz-uz7Z-4DllYN
LV Write Access        read/write
LV Status              available
# open                 1
LV Size                40.00 GB
Current LE             10240
Segments               2
Allocation             inherit
Read ahead sectors     0
Block device           253:0

— Logical volume —
LV Name                /dev/fileserver/backup
VG Name                fileserver
LV UUID                vfKVnU-gFXB-C6hE-1L4g-il6U-78EE-N8Sni8
LV Write Access        read/write
LV Status              available
# open                 1
LV Size                5.00 GB
Current LE             1280
Segments               1
Allocation             inherit
Read ahead sectors     0
Block device           253:1

— Logical volume —
LV Name                /dev/fileserver/media
VG Name                fileserver
LV UUID                H1gagh-wTwH-Og0S-cJNQ-BgX1-zGlM-LwLVzE
LV Write Access        read/write
LV Status              available
# open                 2
LV Size                1.50 GB
Current LE             384
Segments               1
Allocation             inherit
Read ahead sectors     0
Block device           253:2

If your outputs look similar, you have successfully replaced your small hard disks with bigger ones.

Now that we have more disk space (2* 23.29GB + 2 * 56.71GB = 160GB) we could enlarge our logical volumes. Until now you know how to enlarge ext3 and reiserfs partitions, so let’s enlarge our backup logical volume now which uses xfs:

lvextend -L10G /dev/fileserver/backup

server1:~# lvextend -L10G /dev/fileserver/backup
Extending logical volume backup to 10.00 GB
Logical volume backup successfully resized

To enlarge the xfs filesystem, we run

xfs_growfs /dev/fileserver/backup

server1:~# xfs_growfs /dev/fileserver/backup
meta-data=/dev/fileserver/backup isize=256    agcount=8, agsize=163840 blks
=                       sectsz=512   attr=0
data     =                       bsize=4096   blocks=1310720, imaxpct=25
=                       sunit=0      swidth=0 blks, unwritten=1
naming   =version 2              bsize=4096
log      =internal               bsize=4096   blocks=2560, version=1
=                       sectsz=512   sunit=0 blks
realtime =none                   extsz=65536  blocks=0, rtextents=0
data blocks changed from 1310720 to 2621440

The output of

df -h

should now look like this:

server1:~# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda2              19G  666M   17G   4% /
tmpfs                  78M     0   78M   0% /lib/init/rw
udev                   10M  116K  9.9M   2% /dev
tmpfs                  78M     0   78M   0% /dev/shm
/dev/sda1             137M   17M  114M  13% /boot
/dev/mapper/fileserver-share
40G  177M   38G   1% /var/share
/dev/mapper/fileserver-backup
10G  272K   10G   1% /var/backup
/dev/mapper/fileserver-media
1.5G   33M  1.5G   3% /var/media

That’s it! If you’ve made it until here, you should now be used to LVM and LVM on RAID.

mbah Surip, lirik lagu tak gendong

Tak gendong kemana-mana Tak gendong kemana-mana
Tak gendong kemana-mana Tak gendong kemana-mana
Enak donk, mantep donk Enak donk, mantep donk
Daripada kamu naik pesawat kedinginan Daripada kamu naik pesawat kedinginan
Mendingan tak gendong to Mendingan tak gendong ke
Enak to, mantep to Ke enak, mantep ke
Ayo.. Ayo .. Kemana… Kemana …

Tak gendong kemana-mana Tak gendong kemana-mana
Tak gendong kemana-mana Tak gendong kemana-mana
Enak tau Enak tau

Where are you going? Where are you going?
Ok I’m walking Ok I’m walking
Where are you going? Where are you going?
Ok my darling Ok my darling

Ha…Ha…Ha… Ha … ha … ha …

Tak gendong kemana-mana Tak gendong kemana-mana
Tak gendong kemana-mana Tak gendong kemana-mana
Enak donk, mantep donk Enak donk, mantep donk
Daripada kamu naik taksi kesasar Daripada kamu naik taksi kesasar
Mendingan tak gendong to Mendingan tak gendong ke
Enak to, mantep to Ke enak, mantep ke
Ayo.. Ayo .. Mau kemana Mau kemana

Tak gendong kemana-mana Tak gendong kemana-mana
Tak gendong kemana-mana Tak gendong kemana-mana
Enak tau Enak tau

Where are you going? Where are you going?
Ok I’m walking Ok I’m walking
Where are you going? Where are you going?
Ok my darling Ok my darling

Ha.. Ha .. Ha… Haaa… Haaa … ha …

Tak gendong kemana-mana Tak gendong kemana-mana
Enak tau Enak tau
Ha.. Ha .. Ha… Ha …
Ha.. Ha .. Ha… Ha …
Ha.. Ha .. Ha…… Ha … …

Capek….. Capek … ..

setting email ponsel sony ericsson

1. Masuk Messaging – Email – Setting – Account Setting – New Account – Beri nama ‘Mail Yahoo’ – kemudian isi:
2. Email Addres: contoh@yahoo.co.id (Alamat Email Anda)
3. Connect Using: sesuai dengan nama koneksitas gprs Anda
4. Connection Type: pop3
5. Incoming server: pop.mail.yahoo.co.id
6. Username: contoh
7. Password: Isi password email Anda
8. Download: Header only
9. Check Interval: Off
10. Outgoing Server: smtp.mail.yahoo.co.id
11. Username: contoh
12. Password: Isi password Anda
13. Allow Connection: Home
14. Your Name: Isi nama Anda
15. Signature: Masukkan signature Anda
16. Copy Outgoing: Off
17. Encryrption: Incoming dan Outgoing pilih no encryption (bila ingin menggunakan secure connection pilih ssl, tp harus menginstal sertifikat dahulu)
18. Incoming port: 110 (jika pilih ssl: 995)
19. Outgoing: 25 (jika pilih ssl: 465)

Untuk Gmail

1. Masuk messaging – email – setting – account setting – new account – beri nama ‘Gmail’ – kemudian isi:
2. Email Addres:contoh@gmail.com (Alamat Email Anda)
3. Connect Using: sesuai dengan nama koneksitas gprs Anda
4. Connection Type: pop3
5. Incoming server: pop.gmail.com
6. Username: contoh@gmail.com (Isi lengkap dengan @gmail.com juga)
7. Password: Isi password email Anda
8. Download: Header only
9. Check Interval: Off
10. Outgoing Server: smtp.gmail.com
11. Username: contoh@gmail.com (Isi lengkap dengan @gmail.com juga)
12. Password: Isi password Anda
13. Allow Connection: Home
14. Your Name: Isi nama anda
15. Signature: Masukkan signature Anda
16. Copy Outgoing: Off
17. Encryrption: Incoming dan Outgoing pilih ssl
18. Incoming port: 995
19. Outgoing: 465

Jangan lupa untuk mengaktifkan fitur pop3 di yahoo.co.id ataupun gmail.

disalin dari :

http://blogponsel.blogspot.com/2009/01/setting-email-ponsel-sony-ericsson.html

Pengertian Subnetting, Netmask, Network ID, Default Gateway & Broadcast


Subnetting
Kita juga harus menguasai konsep subnetting untuk mendapatkan IP address baru, dimana dengan cara ini kita dapat membuat network ID baru dari suatu network yang kita miliki sebelumnya. Subnetting digunakan untuk memecah satu buah network menjadi beberapa network kecil.

Untuk memperbanyak network ID dari suatu network id yang sudah ada, dimana sebagaian host ID dikorbankan untuk digunakan dalam membuat ID tambahan

Ingat rumus untuk mencari banyak subnet adalah 2 n – 2
N = jumlah bit yang diselubungi

Dan rumus untuk mencari jumlah host per subnet adalah 2 m – 2
M = jumlah bit yang belum diselubungi


Contoh kasus dengan penyelesaian I :

Ip address 130.200.0.0 dengan subnet mask 255.255.224.0 yang diidentifikasi sebagai kelas B.

Subnet mask : 11111111.11111111.11100000.00000000
3 bit dari octet ke 3 telah digunakan , tingal 5 bit yang belum diselubungi maka banyak kelompok subnet yang bisa dipakai adalah kelipatan 2 5 = 32 (256 – 224 = 32)
32 64 96 128 160 192 224

Jadi Kelompok IP yang bisa digunakan dalah ;

130.200.0.0 – 130.200.31.254  subnet loopback
130.200.32.1 – 130.200.63.254
130.200.64.1 – 130.200.95.254
130.200.96.1 – 130.200.127.254
130.200.128.1 – 130.200.159.254
130.200.160.1 – 130.200.191.254
130.200.192.1 – 130.200.223.254

Contoh kasus dengan penyelesaian II :

Terdapat network id 130.200.0.0 dengan subnet 255.255.192.0 yang termasuk juga kelas B, cara lain untuk menyelesaikannya adalah ;

• Dari nilai octet pertama dan subnet yang diberikan, dapat diketahui IP address adalah kelas B yang octet ketiga diselubungi dengan angka 192…
• Hitung dengan rumus (4 oktet – angka yang diselubung) 256 – 192 = 64
• Jadi kelompok subnet yang dapat dipakai adalah kelipatan 64 dan 128.

Jadi kelompok ip yang dapat dipakai adalah
130.200.64.1 sampai 130.200.127.254
130.200.128.1 sampai 130.200.199.254

Kasus ;
Kita memiliki kelas B dengan network ID 130.200.0.0 dengan subnet mask 255.255.224.0

Dengan cara yang sama diatas sebelumnya ;
• Dari nilai octet pertama dan subnet yang diberikan dapat diketahui IP address adalah kelas B dengan octet ketiga terseluibung dengan angka 224
• Hitung dengan rumus (256-224) =32
• Jadi kelompok subnet yang dapat dipakai adalah kelipatan 32 yaitu 64 96 128 160 192

Dengan demikian, kelompok IP address yang dapat dipakai adalah ;
130.200.32.1 sampai 130.200.63.254
130.200.64.1 sampai 130.200.95.254
130.200.96.1 sampai 130.200.127.254
130.200.128.1 sampai 130.200.159.254
130.200.160.1 sampai 130.200.191.254
130.200.192.1 sampai 130.200.223.254

Kasus :

misalkan kita menggunakan kelas C dengan network address 192.168.81.0 dengan subnet mask 255.255.255.240, maka

• Dari nilai octet pertama dan subnet yang diberikan dapat diketahui IP address adalah kelas C dengan oktat ketiga terselubung dengan angka 240
• Hitung (256 – 240) = 16
• Maka kelompok subnet yang dapat digunakan adalah kelipatan 16, yaitu 16 32 48 64 80 96 112 128 144 160 176 192 208 224

Maka kelompok IP address yang dapat digunakan adalah ;

192.168.81.17 sampai 192.168.81.20
192.168.81.33 sampai 192.168.81.46
192.168.81.49 sampai 192.168.81.62
192.168.81.65 sampai 192.168.81.78
192.168.81.81 sampai 192.168.81.94
192.168.81.97 sampai 192.168.81.110
192.168.81.113 sampai 192.168.81.126
192.168.81.129 sampai 192.168.81.142
192.168.81.145 sampai 192.168.81.158
192.168.81.161 sampai 192.168.81.174
192.168.81.177 sampai 192.168.81.190
192.168.81.193 sampai 192.168.81.206
192.168.81.209 sampai 192.168.81.222
192.168.81.225 sampai 192.168.81.238

Kasus :

Sebuah perusahaan yang baru berkembang mempunyai banyak kantor cabang dan tiap kantor cabang mempunyai 255 workstation, network address yang tersedia adalah 164.10.0.0, buatlah subnet dengan jumlah subnet yang terbanyak

Penyelesaian ; 164.10.0.0 berada pada kelas B, berarti octet 3 dan 4 digunakan untuk host, sedangkan 1 kantor cabang ada 254 host, maka ambil 1 bit lagi dari octet ke 3 agar cukup.

Maka subnetmask yang baru
11111111.11111111.11111110.00000000
255. 255. 254. 0

Subnet yang tersedia adalah 256 – 254 = 2, maka subnetnya kelipatan 2 sampai dengan 254.

Jumlah subnet (2 7 – 2) = 128 – 2 = 26 subnet
Jumlah host / subnetnya (2 9 – 2 ) = 512 – 2 = 510 host

164.10.0.0 sampai 164.10.1.0  dibuang
164.10.2 .1 sampai 164.10.3.254
164.10.4.1 sampai 164.10.5.254
164.10.6.1 sampai 164.10.7.254
164.10.8.1 sampai 164.10.9.254
.
.
.
164.10.252.1 sampai 164.10.253.254

Kasus :

Kita mendapatkan IP dari ISP yaitu 192.168.20.0 untuk alamat network dan subnet masknya 255.255.255.192 ini berarti notasi /26.

Jumlah subnet adalah 192, berarti 11000000, maka 22 – 2 = 2
Berapa banyak host per subnet, 26 – 2 = 62 host
Hitung subnet yang valid 256 – 192 = 64 subnet, maka terus tambahkan block size sampai angka subnet mask. 64 + 64 = 128. 128 + 64 = 192, yang tidak valid karena ia adalah sebuah subnet mask. Maka subnet yang valid adalah 64 dan 128.

Subnet 64 128
Host pertama 65 129
Host terakhir 126 190
Alamat Broadcast 127 191

Cara membaca tabel diatas yaitu dari atas ke bawah untuk setiap kolom subnet, contoh: kolom pertama subnet 64 atau lengkapnya 192.168.20.64 memunyai host pertama 65 atau 192.168.20.65, host terakhir 126 atau 192.168.20.126 dan alamat broadcast di 127 atau 192.168.20.127.

Kasus

Kita mendapatkan IP dari ISP yaitu 192.168.10.0 untuk alamat network dan subnet masknya 255.255.255.224 ini berarti notasi /27.

Berapa jumlah subnet, 224 adalah 11100000, jadi 23-3 = 6
Berapa banyak host per subnet, 25 – 2 = 30 host
Hitung subnet yang valid 256 – 224 = 32
32 + 32 = 64
64 + 32 = 96
96 + 32 = 128
128 + 32 = 160
160 + 32 = 192
192 + 32 = 224
224 tidak valid karena ia adalah sebuah subnet mask. Maka subnet yang valid adalah
32, 64, 96,128,160,129,224

Subnet 32 64 96 128 160 192
Host pertama 33 65 97 129 161 193
Host terakhir 62 94 126 158 190 222
Alamat Broadcast 63 95 127 159 191 223

Cara membaca tabel diatas yaitu dari atas ke bawah untuk setiap kolom subnet, contoh: kolom pertama subnet 32 atau lengkapnya 192.168.10.32 memunyai host pertama 33 atau 192.168.10.33, host terakhir 62 atau 192.168.10.62 dan alamat broadcast di 63 atau 192.168.10.63.

Kasus kelas C

Kita mendapatkan IP dari ISP yaitu 192.168.10.0 untuk alamat network dan subnet masknya 255.255.255.224 ini berarti notasi /27.

Berapa jumlah subnet, 224 adalah 11100000, jadi 23-3 = 6
Berapa banyak host per subnet, 25 – 2 = 30 host
Hitung subnet yang valid 256 – 224 = 32
32 + 32 = 64
64 + 32 = 96
96 + 32 = 128
128 + 32 = 160
160 + 32 = 192
192 + 32 = 224
224 tidak valid karena ia adalah sebuah subnet mask. Maka subnet yang valid adalah
32, 64, 96,128,160,129,224

Subnet 32 64 96 128 160 192
Host pertama 33 65 97 129 161 193
Host terakhir 62 94 126 158 190 222
Alamat Broadcast 63 95 127 159 191 223

Cara membaca tabel diatas yaitu dari atas ke bawah untuk setiap kolom subnet, contoh: kolom pertama subnet 32 atau lengkapnya 192.168.10.32 memunyai host pertama 33 atau 192.168.10.33, host terakhir 62 atau 192.168.10.62 dan alamat broadcast di 63 atau 192.168.10.63.

Kasus :

Di sebuah perusahaan manufacturing yang mempunyai banyak bagian dalam perusahaan tersebut, dimana setiap bagian mempunyai 700 host, network address yang didapat adalah 171.168.10.0, berarti ini kelas B…perhatikan bagaimana jika kita menggunakan kelas C karena kelas C hanya dapat menampung host sebanyak 254 !!!

Classless Inter-Domain Rouitng (CIDR)

Suatu metode yang digunakan oleh ISP untuk mengalokasikan sejumlah alamat pada perusahaan, kerumah seorang pelanggan. ISP menyediakan ukuran blok (block size) tertentu.

Contoh : kita mendapatkan blok IP 192.168.32/28. notasi garis miring atau slash notation (/) berarti berapa bit yang bernilai 1 (contoh diatas adalah /28 berarti ada 28 bit yang bernilai 1).

Nilai maksimum setelah garing adala /32. karena satu byte adalah 8 bit dan terdapat 4 byte dalam sebuah alamat IP (4 x 8 = 32). Namun subnet mask terbesar tanpa melihar class alamatnya adalah hanya /30, karena harus menyimpan paling tidak dua buah bit sebagai bit dan host.

Nilai CIDR

255.0.0.0 /8
255.128.0.0 /9
255.192.0.0 /10
255.224.0.0 /11
255.240.0.0 /12
255.248.0.0 /13
255.252.0.0 /14
255.254.0.0 /15
255.255.0.0 /16
255.255.128.0 /17
255.255.192.0 /18
255. 255.224.0 /19
255. 255.240.0 /20
255. 255.248.0 /21
255. 255.252.0 /22
255. 255.254.0 /23
255. 255.255.0 /24
255.255. 255.128 /25
255.255. 255.192 /26
255. 255. 255.224 /27
255. 255. 255.240 /28
255. 255. 255.248 /29
255. 255. 255.252 /30

Keterangan : pola yang dimaksudkan adalah pola 128, 192, 224, 240, 248, 252, dan 254
Dimana 128 dalam binary yaitu = 10000000 (1 bit subnet), 192 dalam binary yaitu 11000000 (2 bit binary) dan seterusnya. Maka hafalkan pola 128, 192, 224, 240, 248, 252 dan 254.

Contoh latihan subnetting : alamat class B

Alamat Network 172.16.0.0 dan subnet mask 255.255.192.0

Subnet 192 = 11000000, 2 2 – 2 = 2
Host 2 14 – 2 = 16.382 (6 bit di octet ketiga, dan 8 bit di octet keempat)
Subnet yang valid 256 – 192 = 64. 64 + 64 = 128

Subnet 64.0 128.0
Host pertama 64.1 128.1
Host terakhir 127.254 192.254
Broadcast 127.255 199.255

Keterangan, maka subnet 64.0 atau 172.16.64.0, mempunyai host pertama 64.1 atau 172.16.64.1 sampai dengan 171.16.127.254 dan alamat broadcastnya 172.16.127.255

Contoh latihan subnetting : alamat class A

Alamat Network 10.0.0.0 dan subnet mask 255.255.0.0

Subnet 255 = 11111111, 2 8 – 2 = 254
Host 2 16 – 2 = 65.534
Subnet yang valid 256 – 255 = 1, 2 , 3 dan seterusnya. (semua di octet kedua). Subnetnya menjadi 10.1.0.0, 10.2.0.0, 10.3.0.0 dan seterusnya sampai 10.254.0.0

Subnet 10.1.0.0 … 10.254.0.0
Host pertama 10.1.0.1 … 10.254.0.1
Host terakhir 10.1.255.254 … 10.254.255.254
Broadcast 10.1.255.255 … 10.254.255.255

NETMASK/SUBNETMASK

Untuk pengelompokan pengalamatan, selain nomor IP dikenal juga netmask atau subnetmask. Yang besarnya sama dengan nomor IP yaitu 32 bit. Ada tiga pengelompokan besar subnet mask yaitu dengan dikenal, yaitu 255.0.0.0 , 255.255.0.0 dan 255.0.0.0.
Pada dunia jaringan, subnetmask tersebut dikelompokkan yang disebut class dikenal tiga class yaitu :
1. Class A, adalah semua nomor IP yang mempunyai subnetmask 255.0.0.0
2. Class B, adalah semua nomor IP yang mempunyai subnetmask 255.255.0.0
3. Class C, adalah semua nomor IP yang mempunyai subnetmask 255.255.255.0

Gabungan antara IP dan Netmask inilah pengalamatan komputer dipakai. Kedua hal ini tidak bisa lepas. Jadi penulisan biasanya sbb :

IP : 202.95.151.129
Netmask : 255.255.255.0

Suatu nomor IP kita dengan nomor IP tetangga dianggap satu kelompok (satu jaringan) bila IP dan Netmask kita dikonversi jadi biner dan diANDkan, begitu juga nomor IP tetangga dan Netmask dikonversi jadi biner dan diANDkan, jika kedua hasilnya sama maka satu jaringan. Dan kita bisa berhubungan secara langsung.

Ketika kita berhubungan dengan komputer lain pada suatu jaringan, selain IP yang dibutuhkan adalah netmask. Misal kita pada IP 10.252.102.12 ingin berkirim data pada 10.252.102.135 bagaimana komputer kita memutuskan apakah ia berada pada satu jaringan atau lain jaringan? Maka yang dilakukan adalah mengecek dulu netmask komputer kita karena kombinasi IP dan netmask menentukan range jaringan kita.
Jika netmask kita 255.255.255.0 maka range terdiri dari atas semua IP yang memiliki 3 byte pertama yang sama. Misal jika IP saya 10.252.102.12 dan netmask saya 255.255.255.0 maka range jaringan saya adalah 10.252.102.0-10.252.102.255 sehingga kita bisa secara langsung berkomunukasi pada mesin yang diantara itu, jadi 10.252.102.135 berada pada jaringan yang sama yaitu 10.252.102 (lihat yang angka-angka tercetak tebal menunjukkan dalam satu jaringan karena semua sama).
Dalam suatu organisasi komersial biasanya terdiri dari beberapa bagian, misalnya bagian personalia/HRD, Marketing, Produksi, Keuangan, IT dsb. Setiap bagian di perusahaan tentunya mempunyai kepentingan yang berbeda-beda. Dengan beberapa alasan maka setiap bagian bisa dibuatkan jaringan lokal sendiri – sendiri dan antar bagian bisa pula digabungkan jaringannya dengan bagian yang lain.
Ada beberapa alasan yang menyebabkan satu organisasi membutuhkan lebih dari satu jaringan lokal (LAN) agar dapat mencakup seluruh organisasi :
 Teknologi yang berbeda. Dalam suatu organisasi dimungkinkan menggunakan bermacam teknologi dalam jaringannya. Semisal teknologi ethernet akan mempunyai LAN yang berbeda dengan teknologi FDDI.
 Sebuah jaringan mungkin dibagi menjadi jaringan yang lebih kecil karena masalah performanasi. Sebuah LAN dengan 254 host akan memiliki performansi yang kurang baik dibandingkan dengan LAN yang hanya mempunyai 62 host. Semakin banyak host yang terhubung dalam satu media akan menurunkan performasi dari jaringan. Pemecahan yang paling sedherhana adalah memecah menjadi 2 LAN.
 Departemen tertentu membutuhkan keamanan khusus sehingga solusinya memecah menjadi jaringan sendiri.

Pembagian jaringan besar ke dalam jaringan yang kecil-kecil inilah yang disebut sebagai subnetting. Pemecehan menggunakan konsep subnetting. Membagi jaringan besar tunggal ke dalam sunet-subnet (sub-sub jaringan). Setiap subnet ditentukan dengan menggunakan subnet mask bersama-sama dengan no IP.

Pada subnetmask dalam biner, seluruh bit yang berhubungan dengan netID diset 1, sedangkan bit yang berhubungan dengan hostID diset 0.
Dalam subnetting, proses yang dilakukan ialah memakai sebagian bit hostID untuk membentuk subnetID. Dengan demikian jumlah bit yang digunakan untuk HostID menjadi lebih sedikit. Semakin panjang subnetID, jumlah subnet yang dibentuk semkain banyak, namun jumlah host dalam tiap subnet menjadi semakin sedikit.

Gambar pembentukan subnet

Cara Pembentukan Subnet :

Misal jika jaringan kita adalah 192.168.0.0 dalm kelas B (kelas B memberikan range 192.168.0.0 – 192.168.255.255). Ingat kelas B berarti 16 bit pertama menjadi NetID yang dalam satu jaringan tidak berubah (dalam hal ini adalah 192.168) dan bit selanjutya sebagai Host ID (yang merupakan nomor komputer yang terhubung ke dan setiap komputer mempunyai no unik mulai dari 0.0 – 255.255). Jadi netmasknya/subnetmasknya adalah 255.255.0.0
Kita dapat membagi alokasi jaringan diatas menjadi jaringan yang kebih kecil dengan cara mengubha subnet yang ada.
Ada dua pendekatan dalam melakukan pembentukan subnet yaitu :
1. Berdasarkan jumlah jaringan yang akan dibentuk
2. Berdasarkan jumlah host yang dibentuk dalam jaringan.

Cara perhitungan subnet berdasarkan jumlah jaringan yang dibutuhkan :

1. Menentukan jumlah jaringan yang dibutuhkan dan merubahnya menjadi biner.
Misalkan kita ingin membuat 255 jaringan kecil dari nomor jaringan yang sudah ditentukan. 255  11111111
2. Menghitung jumlah bit dari nomor 1. Dan jumlah bit inilah yang disebut sebagai subnetID
Dari 255  11111111  jumlah bitnya adalah 8
3. Jumlah bit hostID baru adalah HosiID lama dikurangi jumlah bit nomor 2.
Misal dari contoh diatas hostIDbaru: 16 bit – 8 bit = 8 bit.
4. Isi subnetID dengan 1 dan jumlahkan dengan NetIDLama.
Jadi NetID baru kita adalah NetIDlama + SubNetID :
 11111111.11111111.11111111.00000000 (24 bit bernilai 1 biasa ditulis /24)
Berkat perhitungan di atas maka kita mempunyai 256 jaringan baru yaitu :
192.168.0.xxx, 192.168.1.xxx, 192.168.2.xxx, 192.168.3.xxx hingga 192.168.255.xxx dengan netmash 255.255.255.0.
xxx  menunjukkan hostID antara 0-255
Biasa ditulis dengan 192.168.0/24  192.168.0 menunjukkan NetID dan 24 menunjukkan subnetmask (jumlah bit yang bernilai 1 di subnetmask).
Dengan teknik ini kita bisa mengalokasikan IP address kelas B menjadi sekian banyak jaringan yang berukuran sama.

Cara perhitungan subnet berdasarkan jumlah host adalah sebagai berikut :

1. Ubah IP dan netmask menjadi biner
IP : 192.168.1.0  11000000.10101000.00000000.00000000
Netmask : 255.255.255.0  11111111.11111111. 11111111.00000000
Panjang hostID kita adalah yang netmasknya semua 0  16 bit.
2. Memilih jumlah host terbanyak dalam suatu jaringan dan rubah menjadi biner.
Misal dalam jaringan kita membutuhkan host 25 maka menjadi 11001.
3. Hitung jumlah bit yang dibutuhkan angka biner pada nomor 1. Dan angka inilah nanti sebagai jumlah host dalam jaringan kita.
Jumlah host 25 menjadi biner 11001 dan jumlah bitnya adalah 5.
4. Rubah netmask jaringan kita dengan cara menyisakan angka 0 sebanyak jumlah perhitungan nomor 3.
Jadi netmasknya baru adalah 11111111.11111111.11111111.11100000
Identik dengan 255.255.255.224 jika didesimalkan.
Jadi netmask jaringan berubah dan yang awalnya hanya satu jaringan dengan range IP dari 1 -254 menjadi 8 jaringan, dengan setiap jaringan ada 30 host/komputer

Alokasi Range IP
1 192.168.1.0 – 192.168.1.31
2 192.168.1.32 – 192.168.1.63
3 192.168.1.64 – 192.168.1.95
4 192.168.1.96 – 192.168.1.127
5 192.168.1.128 – 192.168.1.159
6 192.168.1.160 – 192.168.1.191
7 192.168.1.192 – 192.168.1.223
8 192.168.1.224 – 192.168.1.255

Nomor IP awal dan akhir setiap subnet tidak bisa dipakai. Awal dipakai ID Jaringan (NetID) dan akhir sebagai broadcast.
Misal jaringan A 192.168.1.0 sebagai NetID dan 192.168.1.31 sebagai broadcast dan range IP yang bisa dipakai 192.168.1.1-192.168.1.30.

IP ADDRESS

Agar unik setiap computer yang terkoneksi ke Internet diberi alamat yang berbeda. Alamat ini supaya seragam seluruh dunia maka pemberian alamat IP address diseluruh dunia diberikan oleh badan internasional Internet Assigned Number Authority (IANA), dimana IANA hanya memberikan IP address Network ID nya saja sedangkan host ID diatur oleh pemilik IP address tersebut.
Contoh IP address untuk cisco.com adalah 202.93.35.9 untuk www.ilkom.unsri.ac.id dengan IP nya 202.39.35.9

Alamat yang unik terdiri dari 32 bit yang dibagi dalam 4 oktet (8 bit)

00000000 . 00000000 . 00000000 . 00000000
o 1 o 2 o 3 o 4

Ip address dibagi menjadi 2 bagian yaitu Network ID dan Host ID,
Network ID yang akan menentukan alamat dalam jaringan (network address), sedangkan Host ID menentukan alamat dari peralatan jaringan yang sifatnya unik untuk membedakan antara satu mesin dengan mesin lainnya.

Ibaratkan Network ID Nomor jalan dan alamat jalan sedangkan Host ID adalah nomor rumahnya

IP address dibagi menjadi kelas yaitu ;

Kelas yang umum digunakan adalah kelas A sampai dengan kelas C.

Pada setiap kelas angka pertama dengan angka terakhir tidak dianjurkan untuk digunakan karena sebagai valid host id, misalnya kelas A 0 dan 127, kelas B 128 dan 192, kelas C 191 dan 224. ini biasanya digunakan untuk loopback addresss.

Catatan :
• alamat Network ID dan Host ID tidak boleh semuanya 0 atau 1 karena jika semuanya angka biner 1 : 255.255.255.255 maka alamat tersebut disebut floaded broadcast
• alamat network, digunakan dalam routing untuk menunjukkan pengiriman paket remote network, contohnya 10.0.0.0, 172.16.0.0 dan 192.168.10.0

Dari gambar dibawah ini perhatikan kelas A menyediakan jumlah network yang paling sediikit namun menyediakan host id yang paling banyak dikarenakan hanya oktat pertama yang digunakan untuk alamat network bandingkan dengan kelas B dan C.

Untuk mempermudah dalam menentukan kelas mana IP yang kita lihat, perhatikan gambar dibawah ini. Pada saat kita menganalisa suatu alamat IP maka perhatikan octet 8 bit pertamanya.

Pada kelas A : 8 oktet pertama adalah alamat networknya, sedangkan sisanya 24 bits merupakan alamat untuk host yang bisa digunakan.
Jadi admin dapat membuat banyak sekali alamat untuk hostnya, dengan memperhatikan
2 24 – 2 = 16.777.214 host
N ; jumlah bit terakhir dari kelas A
(2) adalah alamat loopback

Pada kelas B : menggunakan 16 bit pertama untuk mengidentifikasikan network sebagai bagian dari address. Dua octet sisanya (16 bits) digunakan untuk alamat host

2 16 – 2 = 65.534

Pada kelas C : menggunakan 24 bit pertama untuk network dan 8 bits sisanya untuk alamat host.

2 8 – 2 = 254

Nomor IP terdiri dari 32 bit yang didalamnya terdapat bit untuk NETWORK ID (NetID) dan HOST ID (HostID). Secara garis besar berikut inilah pembagian kelas IP secara default

GATEWAY/ROUTER

Gateway adalah komputer yang memiliki minimal 2 buah network interface untuk menghubungkan 2 buah jaringan atau lebih. Di Internet suatu alamat bisa ditempuh lewat gateway-gateway yang memberikan jalan/rute ke arah mana yang harus dilalui supaya paket data sampai ke tujuan. Kebanyakan gateway menjalankan routing daemon (program yang meng-update secara dinamis tabel routing). Karena itu gateway juga biasanya berfungsi sebagai router. Gateway/router bisa berbentuk Router box seperti yang di produksi Cisco, 3COM, dll atau bisa juga berupa komputer yang menjalankan Network Operating System plus routing daemon. Misalkan PC yang dipasang Unix FreeBSD dan menjalankan program Routed atau Gated. Namun dalam pemakaian Natd, routing daemon tidak perlu dijalankan, jadi cukup dipasang gateway saja.
Karena gateway/router mengatur lalu lintas paket data antar jaringan, maka di dalamnya bisa dipasangi mekanisme pembatasan atau pengamanan (filtering) paket-paket data. Mekanisme ini disebut Firewall.
Sebenarnya Firewall adalah suatu program yang dijalankan di gateway/router yang bertugas memeriksa setiap paket data yang lewat kemudian membandingkannya dengan rule yang diterapkan dan akhirnya memutuskan apakah paket data tersebut boleh diteruskan atau ditolak. Tujuan dasarnya adalah sebagai security yang melindungi jaringan internal dari ancaman dari luar. Namun dalam tulisan ini Firewall digunakan sebagai basis untuk menjalankan Network Address Translation (NAT).
Dalam FreeBSD, program yang dijalankan sebagai Firewall adalah ipfw. Sebelum dapat menjalankan ipfw, kernel GENERIC harus dimodifikasi supaya mendukung fungsi firewall. Ipfw mengatur lalu lintas paket data berdasarkan IP asal, IP tujuan, nomor port, dan jenis protocol. Untuk menjalankan NAT, option IPDIVERT harus diaktifkan dalam kernel.

DIVERT (mekanisme diversi paket kernel)
Socket divert sebenarnya sama saja dengan socket IP biasa, kecuali bahwa socket divert bisa di bind ke port divert khusus lewat bind system call. IP address dalam bind tidak diperhatikan, hanya nomor port-nya yang diperhatikan. Sebuah socket divert yang dibind ke port divert akan menerima semua paket yang didiversikan pada port tersebut oleh mekanisme di kernel yang dijalankan oleh implementasi filtering dan program ipfw. Mekanisme ini yang dimanfaatkan nantinya oleh Network Address Translator.
Itulah beberapa bahasan awal yang akan mengantar kita ke pembahasan inti selanjutnya.

BROADCAST

Alamat ini digunakan untuk mengirim/menerima informasi yang harus diketahui oleh seluruh host yang ada pada suatu jaringan. Seperti diketahui, setiap paket IP memiliki header alamat tujuan berupa IP Address dari host yang akan dituju oleh paket tersebut. Dengan adanya alamat ini, maka hanya host tujuan saja yang memproses paket tersebut, sedangkan host lain akan mengabaikannya. Bagaimana jika suatu host ingin mengirim paket kepada seluruh host yang ada pada jaringannya? Tidak efisien jika ia harus membuat replikasi paket sebanyak jumlah host tujuan. Pemakaian bandwidth/jalur akan meningkat dan beban kerja host pengirim bertambah, padahal isi paket-paket tersebut sama. Oleh karena itu, dibuat konsep broadcast address. Host cukup mengirim ke alamat broadcast, maka seluruh host yang ada pada network akan menerima paket tersebut. Konsekuensinya, seluruh host pada jaringan yang sama harus memiliki broadcast address yang sama dan alamat tersebut tidak boleh digunakan sebagai nomor IP untuk host tertentu.
Jadi, sebenarnya setiap host memiliki 2 alamat untuk menerima paket : pertama adalah nomor IP yang bersifat unik dan kedua adalah broadcast address pada jaringan tempat host tersebut berada. Broadcast address diperoleh dengan membuat seluruh bit host pada nomor IP menjadi 1. Jadi, untuk host dengan IP address 167.205.9.35 atau 167.205.240.2, broadcast addressnya adalah 167.205.255.255 (2 segmen terakhir dari IP Address tersebut dibuat berharga 11111111.11111111, sehingga secara desimal terbaca 255.255). Jenis informasi yang dibroadcast biasanya adalah informasi routing.

dikutip dari:

http://f4bregaz.blogspot.com/2008/08/pengertian-subnetting-network-id.html

Ten Reasons why Linux is really a Religion

After browsing through the amazing feedback in response to the many Linux articles on ITWire, I have come to a very clear conclusion – Linux is a religion.  Here’s a bunch of reasons why its so.Number 10: There are an amazing number of zealots for whom Linux can do no wrong.  As far as they are concerned, whatever Windows does, Linux does better.  Whether or not there is truth in each situation is totally irrelevant.

Number 9: Speaking in tongues.  Is there another explanation for this: tar -czvf eglinux.tar.gz *.txt

Number 8: So many different churches (distributions), so much in common.  Just as the Catholics, the Anglicans, Pentecostals and the Evangelicals are minor variations on a theme, so are Ubuntu, Suse, Knoppix and Fedora.

Number 7: Adherents of one body of religion almost never ‘change sides.’  Sure an Anglican might become a Pentecostal, but very rare is the Muslim that becomes Catholic.  Similarly, your average Linux devotee will happily move from church to church, will never cross to “the dark side” and join the Winfidels.

Number 6: Linux devotees read their bible (man pages) regularly.  How else can they know the names of all their prophets and how, specifically, to pray to them?

Number 5: Religion is a personal choice – one where the aficionado may take as much or as little as they choose.  With (at a least 313 according to my count of DistroWatch today) many variations on a theme, true-believers may make a specific choice, or become the founder of their very own church.  Try doing that with Windows.

Number 4: In the beginning was the image.iso, and the installer saw that it was good, but the image was without form in the void.  On the first day the installer separated the Linux from the Windows, and he saw that it was good.  On the second day, the installer created the file system and on the third, he separated the programs from the user data.  On the fourth day, the installer created the cron utility to separate the night from the day and to know the seasons.  Come the fifth day, the file system was commanded to teem with programs and eventually, on the sixth day the file system was made to bring forth users.  Not surprisingly on the final day, spare inodes were collected.

Number 3: Tithing.  When did any other OS ever ask you for money?  Note, spam doesn’t count!  There are two choices in the world of software – either pay up front or pay nothing and be nagged to “help the developers.”

Number 2: Step into any church on a Sunday morning – the place is filled with pasty-looking misfits.  Do you see a connection?

Number 1: We all bow down to the great Linus Torvalds.  Need I say more?

As I said, there would be a bonus set of five reasons why Windows is not a religion.

Looping a slide show using Openoffice

Because OpenOffice.org isn’t exactly like other office suites, treating it like other office suites can’t unleash its full potential. Unless you have a lot of time to explore OpenOffice.org’s features, you probably won’t discover all of them on your own. So we’ve compiled some OpenOffice.org tips and tricks that will help you move past the manual functions you’re used to and launch you into the full publishing potential of OpenOffice.org.

Overall Tips for all OpenOffice.org

Applications Like the common interfaces and functions in other office suites, the OpenOffice.org suite also has common interfaces and functions. Many of these functions make OpenOffice.org applications different from other office programs, but unless you know how to use them, chances are you won’t use them. Here’s how to take advantage of some of OpenOffice.org’s common features.

Use Templates

You can get by manually formatting every aspect of your OpenOffice.org creation, but if you often compose the same type of documents, you should take advantage of templates. OpenOffice.org templates don’t function exactly like other office suite templates. OpenOffice.org protects the default template so you can’t make changes to the default accidentally like you can in other office programs. You can use OpenOffice.org’s pre-programmed Auto Pilot templates to take advantage of common forms already programmed, or follow these steps to create a custom template:

  1. Format a document you wish to use as a template, or open a document you’ve already saved.
  2. Assign character, paragraph, page and frame styles using the Stylist. (See Open the Stylist below for more information on styles.)
  3. Delete any text you don’t want to appear in every document based on your template. (The styles you create remain even after deleting the text.)
  4. Select File | Templates | Save. (See Figure 1.) Don’t use File | Save As because this saves the template incorrectly and makes it hard to use in the future.
  5. Click the Organizer button.
  6. Select any folder but the Default folder.
  7. Right click and select New.
  8. Place your cursor in the Untitled folder name and change it to “My Templates.”
  9. Click Close.
  10. In the Categories box, select My Templates.
  11. Type a name for your template in the New Template field.
  12. Click OK.

Figure 1: To use templates properly in all the OpenOffice.org applications, you must save the template correctly by using File | Templates | Save. Don’t use file type Save As.

When you want to use your custom template, follow these steps:

  1. Select File | New | Templates and Documents.
  2. Double click the category to which you assigned your template (My Templates).
  3. Select your template name, and click Open.
  4. Begin creating your new document using the predefined styles and format in your custom template.
  5. Save the new document with a new name in the folder of your choice.

Creating a custom template might take a little more time the first time you create a new document, spreadsheet or presentation. But, you’ll quickly make up that time with the time you save on subsequent creations.

Open the Stylist

Another common feature among OpenOffice applications is the Stylist. (See Figure 2.) The Stylist is a floating window that can help you easily apply styles to every aspect of your document. You can manually format each aspect of your document, spreadsheet or presentation, but without using styles, you’re missing many of OpenOffice.org’s unique functions. When you apply styles, the OpenOffice.org Word Processor becomes more than a typewriter, OpenOffice.org Spreadsheet becomes more than just a calculator, and OpenOffice.org Presentation becomes more than just a slideshow. Follow these tips to open and use the Stylist:

Figure 2: The Stylist is a common feature among all OpenOffice.org programs. It gives you quick access to apply and modify all the styles available in your program, including paragraph, character, page, frame, numbering, cell and slide styles.

To open the Stylist window, select Format | Stylist, click the icon on the main toolbar, or press F11.

Once the Stylist is open, you can use it to apply or modify already set styles, create your own custom styles or quickly fill in formatting. The Stylist not only helps you format paragraphs, characters, cells and slides like the style settings in other office suites, but it also helps you create custom page and frame styles. By creating custom page and frame styles, you can be sure the formats of your pages are consistent and that your objects (usually graphics or text boxes that sit in a frame) are also consistent.

Follow these steps to easily create your own custom styles:

  1. Create a paragraph, cell, set of characters, slide, frame, page or ordered list manually formatted the way you want it to always appear.
  2. Select your formatted item.
  3. Click the New Style from Selection button in the Stylist window.
  4. Type a unique style name based on the description of the style. (For example, if you are creating a page style for the first page of a letter, name the page style “Letter Page1.”)
  5. Click OK.

Once you’ve created your style, you can use the Stylist to go back and modify or add formatting aspects to your style. To modify a set style, right click the selected style in the Stylist and select Modify. The window that appears gives you several options for modifying aspects of your style. (See Figure 3.) Some of the formatting tabs are not available when you manually format an item using the Format menu. Explore the options in this window to make your styles behave exactly as you want.

Figure 3: This dialog appears when you create or modify a style using the Stylist. It has formatting tabs with options not available when you manually format an item using the Format menu.

OpenOffice.org Word Processor Tips and Tricks

After you learn to use OpenOffice.org’s templates and styles, a new world of formatting possibilities opens, especially in the Word Processor. Below are a few littleknown tips and tricks to make your documents immediately publishable.

Automatically Update Headers

This trick only applies to longer documents that use headers and have several sections or chapters. But it will also help you learn how to add other important aspects to smaller documents. First, create a document that includes headers, is divided in sections with headings that you want to automatically update as a header, and you must have already applied a custom heading style to these section headings. Think of this tip as helping you create running heads for a long document.

  1. Select Tools | Outline Numbering. (See Figure 4.)
  2. Click the Numbering tab.
  3. In the Paragraph Style pulldown menu, select the paragraph style you have applied to the headings you want to automatically appear as headers. (If your headings are set as “Chapter Title,” select “Chapter Title.”)
  4. Click OK.
  5. Place your cursor in the heading area of a page with the page style that will include these headers.
  6. Select Insert | Fields | Other.
  7. Click the Document tab.
  8. In the Type box, select Chapter.
  9. In the Format box, select Chapter name.
  10. Click Insert.
  11. The text of your most recent heading will appear in the gray field. (See Figure 5.)
  12. As you continue to create the document, anything assigned that heading style in the main body of your document will appear in the header field.

Figure 4: Setting up Outline Numbering according to the custom heading styles you’ve created lets you automatically update document headers, create a Table of Contents and use the Navigator window to organize your document.

Figure 5: When you insert a field to display the Chapter name, the most recent heading with the style applied displays in the field. If you change the content of that heading, the field automatically changes as well.

When you set your own Outline Numbering by following the first four steps of this tip, you have also set up your document to automaticallly create Tables of Contents, to display heading levels in the OpenOffice.org Navigator, and to create other automatic fields such as bookmarks and cross references.

Turn Off AutoCompletion and other AutoCorrect and AutoFormat Features

Some features of OpenOffice.org’s Word Processor that are highly customizable are the default word completion, AutoCorrect and AutoFormat. Unfortunately, you can’t simply toggle a button or uncheck a menu command to turn off some of these features, such as word completion. Follow the steps below to customize these features:

  1. Select Tools | AutoCorrect/AutoFormat.
  2. Click the Word Completion tab. (See Figure 6.)
  3. Uncheck the Enable word completion box to turn off word completion, or change any of the other settings available, such as the keystroke used to accept word completion suggestions.
  4. Click OK.

Once you’ve discovered this dialog, you can explore the different tabs to change your AutoCorrect and AutoFormat preferences. If you ever want to go back to the default settings, click the Reset button. To quickly stop all AutoFormatting that occurs while you type, select Format | Auto Format | While Typing and make sure the check beside the menu option disappears.

Figure 6: To turn off the OpenOffice.org word completion feature, while still keeping other AutoCorrect options, select Tools | AutoCorrect/AutoFormat, click the Word Completion tab and uncheck the Enable word completion box.

Make Sure the Correct Bullets Transfer to Your MS Word Documents

One of the most appealing features of OpenOffice.org is its ability to export documents in several formats, including Microsoft Word, with little or no formatting lost. This makes OpenOffice.org a compatible word processor when you trade documents with colleagues that don’t use OpenOffice.org; however, some formatting, such as bullets, don’t transfer as well to Microsoft Word. This lack of continuity is simply because Microsoft uses MS Symbol for its bullets and OpenOffice.org uses StarSymbol. Instead of getting frustrated when you export a document with bullets into MS Word format, follow these steps to change your bullet format before you export.

  1. Open the Stylist window by selecting Format | Stylist or pressing F11.
  2. Click the Character Styles button to display all character styles.
  3. Right click Bullets and select Modify.
  4. Click the Font tab.
  5. Select a font in the Font field that you know both OpenOffice.org and Microsoft Word use, such as New Century Schoolbook. (See Figure 7.)
  6. Click OK.
  7. Place your cursor anywhere within the bulleted list.
  8. Right click and select Numbering/Bullets.
  9. Click the Options tab.
  10. Click the button next to Character.
  11. Scroll to select a font that you know both OpenOffice.org and Microsoft Word use, such as New Century Schoolbook.
  12. Click the bullet in the special characters dialog and click OK.
  13. Click OK again.
  14. Repeat steps 7 to 13 for all bulleted lists in your document.
  15. Your bulleted lists will now export with the same format in Microsoft Word.

Figure 7: Simply changing the default font used for bullets to one commonly available in both OpenOffice.org and Microsoft Word, such as New Century Schoolbook, can make bulleted lists created in OpenOffice.org transfer easily and completely to Microsoft Word format.

Note: Create a template containing your commonly used bullet lists by following these steps so you don’t have to change your bullet format each time you want to export your document to MS Word. Just use the bullet template you’ve created and the formatting changes are intact.

OpenOffice.Org Spreadsheet Tips and Tricks

Because OpenOffice.org Spreadsheet follows many of the same conventions as other spreadsheet programs, such as Microsoft Excel, there are fewer tips and tricks for Spreadsheet functions. In addition to taking advantage of the Stylist and templates, the following tips might be helpful:

Wrap Text in Cells

You can wrap text OpenOffice.org Spreadsheet cells once you know where to find the option. Follow the steps below to learn the trick to wrapping text within a spreadsheet cell:

  1. Select the cell or cells with the text you want to wrap.
  2. Right click and select Format Cells.
  3. Click the Alignment tab. (See Figure 8.)
  4. In the Properties area, check the Automatic line break box.
  5. Click OK.

Figure 8: Instead of trying to look for a Wrap Text option in OpenOffice.org Spreadsheet, check the Automatic line break box in the Alignment tab of the Format Cells dialog.

Print What You Want to Print

Like other spreadsheet progams that give you the option to choose to print a selection or just the active spreadsheet, OpenOffice.org Spreadsheet gives you the same options; they’re just found in a different dialog. To make your spreadsheets print the way you want, here are a few steps to help you set these options:

  1. To print only the active sheet:
  2. Select Tools | Options.
  3. In the left navigation tree, click the small “+” next to Spreadsheet to expand it.
  4. Click Print.
  5. Check Print only selected sheet. (See Figure 9.)

Figure 9: Because OpenOffice.org Spreadsheet’s print dialog does not give you the option to print only the active spreadsheet, you must activate the Print only selected sheet option by selecting Tools | Options, and then Spreadsheet | Print.

To define the cells you want to print in a specific sheet:

  1. Select the cells you want to print.
  2. Select Format | Print Range | Define.

You can also select Format | Print Range | Edit to manually set other options for the print range.

OpenOffice.org Presentation Tips and Tricks

OpenOffice.org Presentation includes many of the same functions of other presentation slideshow programs. But some of these functions are found on different dialogs in OpenOffice.org. Follow the steps below to perform some common Presentation functions:

Enter the Same Information on Every Presentation Slide

Many presentations need to have a consistent element, such as a logo or page number on every slide. Inserting information on each slide is easy once you understand the following trick:

  1. In the lower left-hand corner of your Presentations window are three buttons. Click the middle Master View button.
  2. Use the Drawing toolbar to enter text boxes, other objects or fields, such as page numbers.
  3. When you’re done entering the items that should appear on every page, click the Slide View button to the left of the Master View button.
  4. Each slide should contain the text or objects you just inserted in the Master view.

Loop a Slideshow

To set a slideshow to loop, or repeat itself, until you press escape in OpenOffice.org Presentation, take the following steps:

  1. Switch to Slide View by clicking the third button from the top on the righthand side of the Presentations window.
  2. Select all the slides in your presentation.
  3. Choose Automatic from the Transition field in the dynamic toolbar that appears at the top of the Slide View screen.
  4. Set the time between each slide using the time spinner next to the Transition field.
  5. Select Slideshow | Slideshow Settings.
  6. Under Type in the dialog that appears, choose Auto. (See Figure 10.)
  7. Set the time spinner to 0 for continuous viewing.
  8. Click OK.
  9. Start the slideshow by clicking the Start Slideshow button, the bottom button on the right-hand side of the Presentation window.
  10. The slideshow will loop continuously.
  11. Press Esc to stop the slideshow.

Figure 10: To finish setting up the looping slideshow, set the type of slideshow to Auto and the time spinner to 0 for continuous viewing.

Once you know many of the tips and tricks that make the OpenOffice.org applications behave similarly to (and in many cases better than) other office suites, you can begin truly using OpenOffice.org to replace your other office programs. It’s then that you’ll discover you are finally free to create your own office documents.

Jadwal Bus DAMRI ke Bandara Soekarno-Hatta

Bagi yang memerlukan jadwal dan lokasi Bus Damri bisa dilihat disini

Strategi Kaum Pagan Menuju The New World Order (Bag.3)

Illuminati modern lahir di Bavaria pada tahun 1773, tiga tahun sebelum para tokoh Mason menandatangani piagam kemerdekaan Amerika Serikat. Sebelum Illuminati ‘lahir’, gerakan paganis bernama Freemasonry telah dahulu ada di Eropa dan berkembang dengan pesat di sana. Nyaris semua negara dan kerajaan di Eropa tersentuh oleh gerakan Freemason yang lahir di Skotlandia pada sekitar tahun 1314-an.

Para tetua pagan Yahudi seperti Rotschild melihat bahwa strategi mereka akan bisa lebih efektif dan cepat tercapai bila Illuminati dan Freemasonry bersatu. Sebab itu, pada tahun 1780, Baron Franz Friedrich Knigge direkrut menjadi anggota Illuminati dan dengan cepat menjadi salah satu tokoh penting Illuminati Eropa. Sebelumnya, Knigge ini merupakan salah satu tokoh sentral Freemasonry Eropa. Atas usahanya inilah, keduanya bias dipersatukan dan menjadi organisasi klandestine okultis yang begitu efektif, tidak saja di Eropa namun menggapai daratan Amerika dan lainnya.

Penyatuan Illuminati dan Freemasonry “diresmikan” dalam Kongres Wilhelmsbad pada 29 Agustus 1782 di mana Adam Weishaupt dan Knigge memimpin kongres tersebut. Semua yang hadir disumpah untuk tidak membocorkan kepada siapa pun, termasuk kepada anggota keluarga terdekat, apa saja yang terjadi dan diputuskan dalam pertemuan rahasia tersebut.

Comte de Vireu, seorang Masonik dari Lodge du Martinist di Lyons, Perancis Selatan—sebuah wilayah yang kental dengan nuansa Esoteris dan gerejanya memuja Yohanes sebagai Sang Kristus serta Maria Magdalena sebagai The Illuminatrix (Yang Tercerahkan), ikut hadir dalam Kongres di Wilhelmsbad. Sepulangnya dari acara, dia ditanya oleh isterinya tentang apa saja yang dibahas dalam pertemuan.

Terikat dengan sumpah setia, dan tentu saja ancamannya, Comte de Virieu hanya menyatakan bahwa apa yang terjadi dalam kongres sungguh-sungguh mengerikan. “Semua yang terjadi, adalah jauh lebih serius dari apa yang pernah kalian bayangkan selama ini. Konspirasi yang disusun telah benar-benar dirancang dengan sangat matang, sistematis, dan penuh dengan kejutan. Banyak orang penting terlibat dan tentunya dana yang disediakan juga tidak terbatas. Saya berkeyakinan, seluruh kerajaan dan gereja di Eropa ini tidak akan mampu membendung konspirasi tersebut. Ini benar-benar menakutkan, ” ungkapnya.

Atas desakan isterinya dan juga sejumlah kolega, akhirnya de Virieu menyatakan keluar dari perkumpulan.

Dengan sangat licin, Illuminati yang telah bersatu dengan Freemasonry terus bergerak. Mereka berada di belakang setiap revolusi, peperangan, dan peristiwa besar dunia. Nyaris semua pergantian penguasa di sejumlah negeri besar Eropa dan Amerika tidak lepas dari tangan kotor mereka.

Menundukkan Tiga Agama Besar

Satu hal yang jarang diketahui umum, gerakan paganis Yahudi yang juga disebut sebagai kaum Talmudian ini merupakan gerakan untuk menghancurkan semua agama langit. Taurat Musa mereka ganti dengan Talmud; Ajaran Nabi Isa a.s. dikotori dengan tangan Paulus, Yahudi dari Tarsus; dan ke dalam Islam mereka menyusupkan Abdullah bin Saba’, Yahudi dari Yaman yang mengaku-aku sebagai pembela keluarga Ali r.a. dan mengajarkan pengikutnya agar hanya mencintai Ali r.a. dan mengecam ketiga sahabat Nabi SAW lainnya seperti Abu Bakar r.a., Umar bin Khattab r.a., dan Ustman bin Affan r.a.

Mereka ini memiliki dendam kesumat terhadap Gereja yang telah menumpas para tetua mereka pada tahun 1307. Sebab itu mereka berupaya agar Gereja bisa ditundukkan dan menjadi pelayan kepentingan mereka. Salah satu bukti adalah surat balasan dari Rabi Yahudi di Konstantinopel kepada warga Yahudi yang tinggal di Arles, Perancis, yang menyatakan, “Jadilah kamu pemeluk Kristen, namun tetaplah pelihara Talmud di dalam hatimu. Agar kamu bisa menghancurkan mereka dari dalam…”

Konspirasi mereka tetap berjalan dengan penuh kerahasiaan. Satu persatu negeri-negeri besar jatuh dalam cengkeraman mereka. Dari daratan Eropa, mereka menjangkau Amerika, dan juga seluruh dunia. Sejarah dunia yang kita kenal sekarang merupakan hasil kerja mereka. Hanya saja, sejarah resmi tidak pernah mencatat bahwa semua ini merupakan hasil dari kerja keras mereka, karena industri penulisan dunia pun dimiliki oleh jaringan mereka.

Tulisan bagian empat akan membahas konspirasi mereka di abad ke-20, di mana mereka berusaha menaklukkan dunia lewat peperangan dan pendirian lembaga-lembaga internasional seperti PBB, World Bank, dan sejenisnya. Salah satu program PBB yang akan dibahas nanti adalah tentang Codex Alimentarius, sebuah program pengendalian populasi manusia di mana Rockefeller menjadi salah satu penggeraknya. (bersambung/rd)

sumber : eramuslim

Follow

Get every new post delivered to your Inbox.