Jumat, 13 Agustus 2010

Mount Partisi LVM di ubuntu karmic

Kemarin malam saya terpaksa buka puasa di kantor karena harus menginstall Server Development yang sudah di belikan 2 hard disk baru dengan kapasitas yang lebih besar. Server sebelumnya hanya menggunakan 1 hard disk 80 Gb (kecil banget yahh).Hard disk yang baru 250 Gb lumayan lahh.
Proses instalasi standar dengan RAID 1 dan LVM agar suatu saat bisa di Resize jika punya Hard disk lagi.
Sebenernya yang jadi masalah adalah ketika saya sudah selesai install dan akan mencopy data di server lama.Hard disk ketika saya mount ke ubuntu karmic kesayangan saya tidak serta merta bisa di mount.Nih error pertama kali yang saya dapatkan ketika mount hard disk tersebut
/mnt# mount /dev/sdb2 /mnt/devel/
mount: unknown filesystem type 'LVM2_member'

Setelah tanya mbah google ternyata File system LVM butuh perlakuan khusus di ubuntu :
1.Deteksi keberadaan Volume Group dengan mengetikan perintah berikut:
/mnt# pvscan
The program 'pvscan' is currently not installed. You can install it by typing:
apt-get install lvm2
pvscan: command not found
Jika ternyata muncul error seperti di atas maka install terlebih dahulu lvm2
2. /mnt# apt-get install lvm2
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
watershed
The following NEW packages will be installed:
lvm2 watershed
0 upgraded, 2 newly installed, 0 to remove and 8 not upgraded.
3. lalu scan Volume Group dengan perintah:
/mnt# pvscan
PV /dev/sdb2 VG VolGroup00 lvm2 [74.41 GB / 0 free]
Total: 1 [74.41 GB] / in use: 1 [74.41 GB] / in no VG: 0 [0 ]
Terlihat di situ LVM berada di VolGroup00.
4. Mount Partisi LVM ke tempat yang sudah di tentukan. Di tempat saya di letakan di /mnt/devel/
/mnt# mount /dev/VolGroup00/LogVol00 /mnt/devel/
mount: special device /dev/VolGroup00/LogVol00 does not exist
5. Jika muncul message seperti di atas berarti Volume belum aktif. Aktifkan dengan perintah
/mnt#sudo vgchange -ay
2 logical volume(s) in volume group "VolGroup00" now active
6. Lakukan perintah untuk mount mount seperti langkah 4.
/dev/mapper/VolGroup00-LogVol00 looks like swapspace - not mounted
mount: you must specify the filesystem type
jika muncul error seperti diatas maka mungkin kita salah mendeteksi LogVolnya lihat dengan perintah :
# lvdisplay
--- Logical volume ---
LV Name /dev/VolGroup00/LogVol01
VG Name VolGroup00
LV UUID uYMV2O-KpoN-RXGc-a0Bz-yRcJ-Q8eK-NCyWhn
LV Write Access read/write
LV Status available
# open 0
LV Size 70.41 GB
Current LE 2253
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 252:0

--- Logical volume ---
LV Name /dev/VolGroup00/LogVol00
VG Name VolGroup00
LV UUID JH25po-Jawk-RaGu-0six-j9HA-fBXV-pSRtka
LV Write Access read/write
LV Status available
# open 0
LV Size 4.00 GB
Current LE 128
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 252:1

7. Terlihat bahwa LogVolnya 01 bukan 00 sehingga mountnya menjadi :

# mount /dev/VolGroup00/LogVol01 /mnt/devel/

Jika tidak ada error maka partisi LVM sudah termount dan tinggal copy datanya saja.

Selamat mencoba semoga sukses...he he he...

Rabu, 11 Agustus 2010

Tips mysql menampilkan Nomor

Bagi anda yang menggunakan mysql tentunya sering di minta menampilkan data. Data-data yang di tampilkan banyak jumlahnya dah harus di cantumkan Nomor urutnya.Berikut trik kecil yang bisa di gunakan untuk menampilkan Nomor.

Contoh anda ingin menampilkan Nomor dan Nama dari table kelas:
SELECT @rownum:=@rownum+1 'No',name As Nama from tblkelas (SELECT @rownum:=0) Nomor where limit=100;

Senin, 09 Agustus 2010

upgrade Open Office 2.4 ke 3.02 di ubuntu hardy

Sebenernya tulisan ini sudah banyak di posting dan terkesan basi. Cuma karena blog ini juga sebagai referensi pribadi maka ga da salahnya saya tulis lagi langkah-langkah ketika saya upgrade dari OO 2.4 ke OO 3.02. Kelebihan dari OO 3.02 adalah bisa membuka file docx yaitu format yang di miliki MS Office 2007. Berikut langkah-langkahnya;

1.Download OO terbaru di sini sesuai dengan type linux anda.
2.Hapus OO yang lama : sudo apt-get remove openoffice *.*
jika ada pertanyaan untuk menghapus open office sebelumnya seperti ini:
aspell aspell-en dictionaries-common gnome-spell iamerican ibritish ispell
language-support-en language-support-translations-en
language-support-writing-en myspell-en-gb myspell-en-us myspell-en-za
openoffice.org-base-core openoffice.org-calc openoffice.org-common
openoffice.org-core openoffice.org-draw openoffice.org-gnome
openoffice.org-gtk openoffice.org-help-en-gb openoffice.org-help-en-us
openoffice.org-hyphenation openoffice.org-hyphenation-en-us
openoffice.org-impress openoffice.org-l10n-common openoffice.org-l10n-en-gb
openoffice.org-l10n-en-za openoffice.org-style-human
openoffice.org-thesaurus-en-au openoffice.org-thesaurus-en-us
openoffice.org-writer python-uno thunderbird-locale-en-gb wamerican wbritish
0 upgraded, 0 newly installed, 36 to remove and 0 not upgraded.
After this operation, 352MB disk space will be freed.
Do you want to continue [Y/n]? y
3. Extrak souce OO 3.02 tar.gz
sudo tar -xzvf OOo_3.2.0_LinuxX86-64_install_en-US_deb.tar.gz
4. masuk ke directory DEBS di Open Office
cd /home/tiva/Desktop/OOO320_m12_native_packed-1_en-US.9483/DEBS/
5. Install file deb Open Officenya
sudo dpkg -i *.*
Selecting previously deselected package ooobasis3.2-base.
(Reading database ... 92535 files and directories currently installed.)
Unpacking ooobasis3.2-base (from ooobasis3.2-base_3.2.0-12_amd64.deb) ...
Selecting previously deselected package ooobasis3.2-binfilter.
Unpacking ooobasis3.2-binfilter (from ooobasis3.2-binfilter_3.2.0-12_amd64.deb) ...
Selecting previously deselected package ooobasis3.2-calc.
Unpacking ooobasis3.2-calc (from ooobasis3.2-calc_3.2.0-12_amd64.deb) ...
Selecting previously deselected package ooobasis3.2-core01.
Unpacking ooobasis3.2-core01 (from ooobasis3.2-core01_3.2.0-12_amd64.deb) ...
Selecting previously deselected package ooobasis3.2-core02.
Unpacking ooobasis3.2-core02 (from ooobasis3.2-core02_3.2.0-12_amd64.deb) ...
Selecting previously deselected package ooobasis3.2-core03.
Unpacking ooobasis3.2-core03 (from ooobasis3.2-core03_3.2.0-12_amd64.deb) ...

6. Tampilakn shorcut di menu dengan terlebih dulu masuk ke directory desktop integration.
cd desktop-integration/
sudo dpkg -i openoffice.org3.2-debian-menus_3.2-9472_all.deb
Selecting previously deselected package openoffice.org-debian-menus.
(Reading database ... 97142 files and directories currently installed.)
Unpacking openoffice.org-debian-menus (from openoffice.org3.2-debian-menus_3.2-9472_all.deb) ...
Setting up openoffice.org-debian-menus (3.2-9472) ...

Selamat mengupgrade Open Office anda.