Last week I have to import a large (above 4 GB) MySQL dump, wich includes InnoDB tables. The dump was made with –extended-insert=false, so we have many single operations to do. It takes me above 50 hours (sic !) by doing a simple source datadump.sql in the MySQL console. Load on the machine was near 1,02.

Next time I will do it like that:


create database DATABASE charset=CHARSET;
use DATABASE;
set names CHARSET;
set FOREIGN_KEY_CHECKS=0;
set AUTOCOMMIT=0;
source datadump.sql;
COMMIT;

While inserting data with above example, the load skips up to 4,90 – 5,30, so the 2-core machine was not boring.
It is realy fast :)

Having a simple LAMP guest Linux Vserver Debian etch we can do a dist-upgrade in minutes.
1. Stop the guest vserver, and make a copy of it. Just in case if something goes wrong.
2. Start the guest vserver, and enter it. Type as root:

# sed -i -e “s#etch#lenny#g” /etc/apt/sources.list

your file will look some like this:

deb http://ftp.pl.debian.org/debian/ lenny main
deb-src http://ftp.pl.debian.org/debian/ lenny main
deb http://security.debian.org lenny/updates main

3. Do: apt-get update
4. Start praying ;-) and type: apt-get dist-upgrade
5. Done ?

You probably have a syslog-ng daemon, and if it wouldn’t run, chceck the config files. In a Linux guest vserver you should comment line:

file(“/proc/kmsg” log_prefix(“kernel: “));

and then start your syslog-ng daemon.
It take me 10 minutes to upgrade my Debian guest vserver on my notebook :)

Tak, proszę państwa – takie cudo jest możliwe w PLD Linux ! :) Autorem cuda jest Zbyniu.

Jeśli ktoś nie śledzi pld-kernel-pl czy pld-devel (a warto), to i tak zachęcam do testowania. Gotowe paczki dostępne są w sieci (linki poniżej). Testuję arch x86_64 na lapku (+ nvidia) i działa pięknie.

i686: http://carme.pld-linux.org/~arekm/aa/
x86_64: ftp://pld-mirror.domainmaker.pl/various/

Od kilkudziesięciu dni pracuje nowy, publiczny mirror PLD Linux.

adres: ftp://pld-mirror.domainmaker.pl/ (i ten adres podmieniamy w /etc/poldek/repos.d/pld.conf w miejsce domyślnego ftp.th.pld-linux.org)

Na maszynie dostępne są:
Th – i686, noarch, x86_64, ppc
Ac – i686 amd64 noarch i386
RescueCD, Live CD 2.0.

Aktualny limit łącza: ~20 Mbps
Mirror rpm Ac i Th synchronizowany jest z ep09 (ftp.th.pld-linux.org) co godzinę, via rsync.

Zasoby sprzętowe dzięki uprzejmości:

DomainMaker Sp. z o.o.
85-022 Bydgoszcz, ul. Gdańska 107
www.domainmaker.pl

The mission:
Add 2 SATA II disks in machine with Adaptec 3405, upgrade controller’s firmware/BIOS too.

The hardware:
Adaptec 3405 with 2 SAS MAX3147RC disks as RAID 1, I added 2 WD7500AYYS-01RCA SATA disks wich we need to merge on RAID 1 as let’s say a backup place.

Notice:
As usually, exaple will be made on machine powerd by PLD Linux ;-)

Build/install package arcconf. In my example: arcconf-5.30-1.x86_64.rpm and check what we’ve got on board.

# arcconf GETVERSION
Controllers found: 1
Controller #1
==============
Firmware : 5.2-0 (15611)
Staged Firmware : 5.2-0 (15611)
BIOS : 5.2-0 (15611)
Driver : 1.1-5 (2437)
Boot Flash : 5.2-0 (15611)

Command completed successfully. So, we’ve got one Adaptec 3405 device, it’s ID is 1. That ID will be useful later. Check device status:


# arcconf GETSTATUS 1
Controllers found: 1
Logical device Task:
Logical device : 0
Task ID : 100
Current operation : Rebuild
Status : In Progress
Priority : High
Percentage complete : 28
Command completed successfully.

To make things more interesting, I purposefully removed out one of the SAS disks for a feew seconds ;-) Simulation of array damage. Let’s put SATA disks, and upgrade controller’s software.


# wget http://download.adaptec.com/raid/asr/fw_bios/3405_fw_b15728.exe
# unzip 3405_fw_b15728.exe
# ls -lh
razem 2,5M
-rw-r--r-- 1 root root 256K kwi 1 17:44 acusas.exe
-rw-r--r-- 1 root root 196K kwi 1 17:44 afu.exe
-rw-r--r-- 1 root root 629K kwi 1 17:44 as340501.ufi
-rw-r--r-- 1 root root 1,4M kwi 1 17:44 as340502.ufi
-rw-r--r-- 1 root root 2,9K kwi 5 18:12 Relnotes.txt
-rw-r--r-- 1 root root 82 cze 11 00:32 UcliEvt.log

OK, let’s do it !

# arcconf ROMUPDATE 1 as3405
Controllers found: 1
You must restart the system for firmware updates to take effect.
Are you sure you want to continue?
Press y, then ENTER to continue or press ENTER to abort: y
Updating controller 1 firmware...Succeeded
A new software image has been applied to controller 1.
Command completed successfully.

What was done ?

# arcconf GETVERSION 1
Controllers found: 1
Controller #1
==============
Firmware : 5.2-0 (15611)
Staged Firmware : 5.2-0 (15728)
BIOS : 5.2-0 (15611)
Driver : 1.1-5 (2437)
Boot Flash : 5.2-0 (15728)
Command completed successfully.

We need to reboot our machine to set the changes, will do that later. Let’s check added disks.


# arcconf GETCONFIG 1
Device #2
Device is a Hard drive
State : Ready
Supported : Yes
Transfer Speed : SATA 3.0 Gb/s
Reported Channel,Device : 0,2
Reported Location : Connector 0, Device 2
Vendor : WDC
Model : WD7500AYYS-01RCA
Firmware : 30.04G30
Serial number : WD-WCAPT0615906
Size : 715404 MB
Write Cache : Unknown
FRU : None
S.M.A.R.T. : No
Device #3
Device is a Hard drive
State : Ready
Supported : Yes
Transfer Speed : SATA 3.0 Gb/s
Reported Channel,Device : 0,3
Reported Location : Connector 0, Device 3
Vendor : WDC
Model : WD7500AYYS-01RCA
Firmware : 30.04G30
Serial number : WD-WCAPT0636669
Size : 715404 MB
Write Cache : Unknown
FRU : None
S.M.A.R.T. : No

All OK, since now, we can create new array. The arcconf’s help, suggests to type:

arcconf CREATE 1 LOGICALDRIVE Name BACKUP Rcache RON Wcache WB Size MAX Raid1 Channel0 ID2 Channel0 ID3

so, we type:

# arcconf CREATE 1 LOGICALDRIVE Name BACKUP MAX 1 0 2 0 3
Controllers found: 1
Do you want to add a logical device to the configuration?
Press y, then ENTER to continue or press ENTER to abort: y
Creating logical device: BACKUP
Command completed successfully.

The dmesg will tell us, that there is a new device added, in my example it was /dev/sdb – all done ;)