vicker313 tech blog

November 28, 2009

Solve Gnome Desktop Missing Problem

Filed under: Linux — Tags: , , — vicker313 @ 8:00 am

Sometime after you do something on your Linux (such as distribution upgrade), your Gnome desktop will turn into black color and showing nothing. If you create anything on the black desktop, it will actually go to your home directory.

This indicates your desktop path is point to your home directory instead of your desktop directory, to solve this problem:

  1. Edit ~/.config/users.dirs.dirs with your favorite editor (aware that .config is hidden).
  2. Look for the keyword XDG_DESKTOP_DIR, it might point to $HOME. Edit it to $HOME/Desktop.
    XDG_DESKTOP_DIR="$HOME/Desktop"
  3. Log out and log in again to see the changes.

November 21, 2009

Upgrade Ubuntu Platform from ISO without Burning a CD

Filed under: Linux — Tags: , — vicker313 @ 8:00 am

Dozen of methods to upgrade Ubuntu Platform, either through Update Manager or through CD. Steps below show you how to upgrade Ubuntu Platform (for example from 9.04 to 9.10) from ISO without burning to CD:

  1. Download the Alternate version of Ubuntu Installation CD from Ubuntu Official Website. The differences between Alternate version and the normal version include:
    1. Alternate version doesn’t have Live CD features.
    2. Alternate version is text based.
    3. Alternate version has CD upgrade features (and the normal one does not have).
  2. Mount the ISO using command below (assume that the name of your ISO is ubuntu-alternate.iso, located at /home/james and the mount point you want to set is /mnt/iso)
    mount -o loop /home/james/ubuntu-alternate.iso /mnt/iso
  3. Change directory to /mnt/iso
    cd /mnt/iso
  4. Run cdromupgrade as ROOT user (and key in your password) and continue with the upgrade.
    sudo ./cdromupgrade

November 14, 2009

Ultrium Tape Drive Performance Issue

Filed under: Server — Tags: , , , , — vicker313 @ 8:00 am

Recently I have setup a server to backup some data using Ultrium Tape Drive (Ultrium 960). The cartridge that I used was LTO3, able to store 800GB compressed data and 400GB uncompressed data. According to the specification, Ultrium Tape Drive was able to write  160MB data to tape in one second.

I installed a SCSI card to the server (PCI Express slot) and connected the tape drive to the server using a SCSI cable. First attempt was disappointed, the server cannot even detect the tape drive. Originally the server was Fedora Core 6, so I reinstalled it with Red Hat Enterprise 5.3 and OK, server was able to detect the tape drive. Now I used a simple TAR command to backup the data:

tar cvf /dev/st0 /backup

However the writing speed is very slow (around 30MB/s), few times slower than what the specification mentioned. First I suspected the bottle net might be the PCI Express, but no since the transfer rate was more than 160MB according to Google. Than I tested out the transfer rate of the SATA hard disk and it was the bottle neck. I used command below to benchmark the transfer rate of the hard disk:

dd if=/dev/zero of=test.bin bs=1M count=1000

The command basically will write 1GB of dummy data to your hard disk, and it will summarize the time and transfer rate after it finished (you can remove the dummy data afterward). It turned out the transfer rate was way to slow for a SATA hard disk (it should be around 160MB/s, but it turned out to be 30MB/s). After some digging, I found out that the server is using RAID 5, which potentially will result a performance bottle neck. Once again, I reinstalled the server with RAID 0+1.

Now I ran again command above and the result was positive, around 350MB/s. However I tried out the TAR command to backup data to the Ultrium Tape Drive, it was still slow, around 40MB/s. Lastly I tried to use a different block size in the TAR command:

tar cvfb /dev/st0 128 /backup

Option b in the TAR command referred to block factor, which 1 block factor equal to 512 bytes. Since I am using 128 block factor, it will result block size of 64KB. The default block factor is 20, which the block size will be 10KB. At last the transfer rate seemed great, around 100MB/s. While reading from tape was around 150MB/s.

November 7, 2009

Drop Data File from Oracle Database

Filed under: Oracle — Tags: , — vicker313 @ 9:29 am

You want to start an Oracle Database, but fail because of 1 particular data file is missing (for some reason). And you want to drop the data file in order to start the database:

  1. Log in SQLPLUS as SYSDBA
    sqlplus / as sysdba
  2. Start database in mount mode
    start mount
  3. Then remove the missing data file with statement below
    alter database datafile 'missing datafile' offline drop

November 1, 2009

Install Oracle in Text Mode For Linux

Filed under: Oracle — Tags: , , — vicker313 @ 9:22 am

Basically Oracle Installer doesn’t support text mode installation, which the Oracle Universal Installer need to be run on GUI. So to install Oracle in machine with Linux without GUI:

  1. Find another Linux machine with GUI (must be Linux, Windows will not work)
  2. SSH to the machine (let’s say IP is 192.168.1.2) that you want to install Oracle, with the -X (X11 forward) option:
    ssh -X oracle@192.168.1.2
  3. Run the installer, and the OUI will run on the machine that you’re using (the one with GUI)
    ./runInstaller

Blog at WordPress.com.