Multi Disk MySQL

For performance reasons, separating DBs to Multiple hard disks can be beneficial

In Linux, when you want to include a directory for a database, you add a symbolic link ( Using the ln -s targetdir command), in Windows, there are no symbolic links, and Windows Shortcuts ( Via right click create shortcut ) don’t work

The truth is, MySQL enables Symbolic Links in Windows by default, but you have to do it the MySQL way

MySQL is a file based database engine, you should be able to see a folder for every database run by your database engine, Now to move one of those DBs to a different directory or hard drive, you just copy it to the new destination and create a file db_name.sym then, within that plain text file, you can add D:datadb_name where D:datadb_name is the folder containing the MySQL files.

You should be good to go if you have moved the directory of the database to d:data, but if you copied it, the copy in the original MySQL data directory will be used

You are done, Now you should experience the extra performance of combining disks, the closest it gets without RAID and a reformat, surely this is assuming the DBs are used evenly

But there are other reasons why you may want to do this, one of which is, when you want to compile all user data in a directory, So DBs that person creates using your server management software puts all that person’s software in one place so that when he or she requests a backup, you know what to send him/her

Enjoy

Linux Debian Lenny and apt-cacher

Mama i’m comming home

Back to Debian, as when i thought about it, i Don’t really like Ubuntu, what has it added, i still don’t know the difference between UBUNTU and Debian, Debian keeps a legal document that promises to never do what redhat once did, ubuntu does not, Debian has a Blue Background, and ubuntu has a color that i don’t know the name of, Besides, Hardy shipped with XEN not functional on my 64Bit and i had to wait for a long time to have it fixed, Lenny here i am.

To begin with, Why download the DVD or worse the 5 DVDs, i downloaded a CD (Or get the NetInstall CD), then install 1 copy from that CD, now install apt-cacher and the software you use will be cached on your network, My apt-cacher is installed inside a virtual machine, when i want to install another copy of lenny, i simply allow it to download from the internet, and after picking a mirror in the installer, i specify a proxy as http://192.168.0.133:3142/ and i will never have to download that package twice.

Better yet, the CD or DVD get outdated fast, this one keeps refreshing itself with the latest packages, and i can save Debian (The distro i love most) some bandwidth.

After the install, remember to change your repository lines so that a url like http://ftp.us.debian.org becomes http://192.168.0.133:3142/ftp.us.debian.org, Also fix that on the install that hosts the cache.

Great stuff right !

S.M.A.R.T (SMART) data of hard drives under linux

The results of the commands on this post are Here

On windows, You can use speedfan, under linux you can read the smart data as follows

Use the smartctl command, but first you must install the package

apt-get install smartmontools

1- Checking for smart support, (All recent hard drives have it but you need to enable it in BIOS)

smartctl -i /dev/sdb

2- Enable reading it

smartctl -s on -d ata /dev/sdb

See it

smartctl -d ata -H /dev/sdb

Read more

smartctl -d ata -a /dev/sdb

Now some manufacturer specific smart atributes exist, you need to google them out, Also smart is not definitive, if S.M.A.R.T data says ok but there is a ticking noise in your hard drive, Don’t trust the hardware data, get backup.

Some hard drives like the Samsung Spinpoint come with extensive diagnostics software, My 3 2.5′ disks pass the test, pass the smart test, and tick when warm, i will let you know if it was the tick of death sometime soon

Debian 5 lenny is out and i can’t find Synaptics !

So, ALT+F2 then gksudo synaptics… sometimes i get the message you can run synaptics without a password, but synaptics does not show up, aptitude is there, but where is synaptics ?

Anyway, i am glad lenny is out, i have been waiting for it since last year, and i thought downloading it would be a challenge when the rush comes, The download came in at full speed and the both the text installer and the GUI installer work like a charm.

Did i mention it is not 1 DVD ! the thing is a 5 DVD, But i don’t think it is wise to download them all, Just download the first CD, and when you need a package, let the software get it from the internet for you.

all you need is the first CD or DVD, most packages you will need are there, and whatever is missing the installer can get for you from the internet !

Anyway, i have not yet checked it out fully, when i do, i will update you all.

asterisk 1.6 install and deploy.

Asterisk with chan mobile.
So, my lovely TUSI-M does not work, it has legacy USB ports, I want USB 2.0.

Got an old celeron PC I had somewhere, found out it had 1GB of DDR1 ram, a 2.53GHz processor, a P4i65GV Motherboard with Bios 1.80 (Asrock), And an 80GB hard disk, fits the bill perfect.
the good thing about this motherboard is that it has 8 USB ports (2.0), The bad thing, A Celeron processor, An old celeron processor.
I installed an X100P (That I got in the mail today) on the PC.
1- Installed Ubuntu 8.04 32Bit from DVD, a default DVD install, user name (yazeed), Password (ZeDevildetail), and hostname (asterisk).

2- Now i need to enable VNC access, see This post in the ubuntu forums
3- Restarted Ubuntu to make sure the previous step works.
4- Installed Samba by starting Synaptic Package manager, Searching for Samba, and marking samba for install, 2 more packages are requiered, agreed to

install them when prompted after hitting the apply button, Same to install openssh. And miraculesly, when I start ubuntu on the machine, I can poin my VNC

viewer to asterisk:2
5- I installed RealVNC on my windows machine (The viewer only, if you install the server you will need a serial number).
6- logged in via VNC.
7- Downloaded Asterisk 1.6.0.5 along with the addons 1.6, DAHDI linux, Dahdi tools, and libpri 1.4.7 to /usr/src, DAHDI is what used to be ZAPTEL ,

LibPri is for T1, E1, J1 and I don’t need it, Just thought I’d install it anyway , So I unpacked them to that same directory I am in.
8- Before I install anything, I probably need to satisfy some dependancies, and add some tools so I can make managing the system easy later on,
Running aptitude
LAMP task: PHP would help me write stuff I can fix online !
the, MySQL with root password being “whatdevil”

Now from Synaptics package manager
GCC 3+, G++ 4.1, cpp and other compiler stuff ubuntu tells me about
Ncurses devel
Libtermcap-devel
Kernel development headers
Kernel development headers (SMP)
GCC++
Openssl and its dev package
Newt-devel
Zlib-devel
unixOBDC and unixOBDC devel
libtool
gnu make
Bison for CLI (yacc and)
Libnewt for zttool – ztcfg

Now that i have installed everything with synaptics that looks like the above, i will

Start with the Zaptel – Now dahdi driver….

cd /usr/src/DAHDIblahblah

make

makeinstall

cd /usr/src/asterisk-1.6blahblah

make clean

./configure

make menuselect

…Now from Menu select, i am looking for dependencies that i need so that i can compile everything in asterisk 1.6….

up to now, i need

CURL OK
PostgreSQL OK
sqlite
sqlite3

Cryptographic digital signatures

jabber

netsnmp

spandsp

resample

jack ??

osptk

ssl

radius

freetds

asound

portaudio

res_jabber

iksemel

openh323

isdnnet

misdn

suppserv

nbs

usb

vpbapi

speexdsp

verbis

ogg

curl

gtk

lua

ldap

imap_tk

gmime

Asterisk sound packages in multiple formats, both basic and extra