Posts Tagged ‘something’

Migrate Webserver and SQL data from old SATA Hard drive to SSD to boost websites performance / Installing new SSD KINGSTON 120GB hard disk on Linux

Monday, March 28th, 2016

Blog and websites hosted on a server were giving bad performance lately and the old SATA Hard Disk on the Lenovo Edge server seemed to be overloaded from In/Out operations and thus slowing down the websites opeining time as well as SQL queries (especially the ones from Related Posts WordPress plugin was quite slow. Sometimes my blog site opening times were up to 8-10 seconds.

To deal with the issue I obviously needed a better speed of I/O of hard drive thus as I've never used SSD hard drives so far,  I decided to buy a new SSD (Solid State Drive) KINGSTON SV300S37A120G, 605ABBF2, max UDMA/133  hard disk.
Mounting the hard disk physically on the computer tower case wasn't a big deal as there are no rotating elements of the SSD it doesn't really matter how it is mounted main thing is that it is being hooked up somewhere to the case.

I was not sure whether the SSD HDD is supported by my Debian GNU / Linux so I had see whether Linux Operating System has properly detected your hard disk use dmesg

1. Check if SSD Hard drive is supported in Linux


linux:~# dmesg|grep -i kingston
[    1.182734] ata5.00: ATA-8: KINGSTON SV300S37A120G, 605ABBF2, max UDMA/133
[    1.203825] scsi 4:0:0:0: Direct-Access     ATA      KINGSTON SV300S3 605A PQ: 0 ANSI: 5


linux:~# dmesg|grep -i sdb
[    1.207819] sd 4:0:0:0: [sdb] 234441648 512-byte logical blocks: (120 GB/111 GiB)
[    1.207847] sd 4:0:0:0: [sdb] Write Protect is off
[    1.207848] sd 4:0:0:0: [sdb] Mode Sense: 00 3a 00 00
[    1.207860] sd 4:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    1.207928]  sdb: unknown partition table
[    1.208319] sd 4:0:0:0: [sdb] Attached SCSI disk


Well great news as you see from above output obviously the Kingston SSD HDD was detected by the kernel.
I've also inspected whether the proper dimensions of hard drive (all 120 Gigabytes are being detected by the OS):


linux:~# fdisk -l /dev/sdb
Disk /dev/sdb: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders, total 234441648 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Even better as the proper HDD sizing was detected by Linux kernel.
Next thing to do was of course to create ext4 filesystem on the SSD HDD.
I wanted to give 2 separate partitions for my Webserver Websites DocumentRoot directories which all lay under the standard Apache location inside /var/www as well as MySQL data folder which is also under the standard Debian based Linuces – /var/lib/mysql as the SQL data directory was just 3.3 GB size, I've decided to reserve 20GB gigabytes for the MySQL and another 100 GB for my PHP / CSS / JS / HTML and other data files /var/www.

2. Create SSD partitions with cfdisk

Hence I needed to create:

1. SSD partition of 100GB
2. SSD partition of 20GB

I have cfdisk installed and I believe, the easiest way to create the partitions is using interactive partitioner as CFDISK instead of fdisk: so in order to make the proper partitions I've ran


linux:~# cfdisk /dev/sdb

I' will skip explainig details on how to use CFDISK as it is pretty standard – display or manipulate disk partition table tool.
Just press on NEW button (moving with arrow keys buttons) and choose the 2 partitions size 100000 and 20000 MB (one thing to note here is that you have to choose between Primary and  Logical creation of partitions, as my SSD is a secondary drive and I already have a ) and then press the
WRITE button to save all the partition changes.

!!! Be very careful here as you might break up your other disks data make sure you're really modifying the SSD Hard Drive and not your other /dev/sda or other attached external Hard drive or ATA / SATA disk.
Press the WRITE button only once you're absolutely sure, you do it at your own (always create backup of your other data and don't blame me if something goes wrong) …

Once created the two partitions will look like in the screenshot below:


3. Create ext4 filesystem 100 and 20 GB partitions

Next thing to do before the two partitions are ready to mount under Webserver's files documentroot /var/www and /var/lib/mysql is to create ext4 filesystem, though some might prefer to stick to ext3 or reiserfs partition, I would recommend you use ext4 for the reason ext4 according to my quick research is said to perform much better with SSD Hard Drives.

The tool to create the ext4 filesystems is mkfs4.ext4 it is provided by debian package e2fsprogs I have it already installed on my server, if you don't have it just go on and install it with:

linux:~# apt-get install –yes e2fsprogs


To create the two ext4 partitions run:

linux:~# mkfs4.ext4 /dev/sdb5


linux:~# mfs4.ext4 /dev/sdb6

Here the EXT4 filesystem on partition that is supposed to be 100 Gigabytes will take 2, 3 minutes as the dimensions of partition are a bit bigger, so if you don't want to get boring go grab a coffee, once the partitions are ready you can evaluate whether everyhing is properly created with fdisk you should get output like the one below


linux:~# fdisk -l /dev/sdb
Disk /dev/sdb: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders, total 234441648 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1              63   234441647   117220792+   5  Extended
/dev/sdb5             126    39070079    19534977   83  Linux
/dev/sdb6        39070143   234441647    97685752+  83  Linux


4. Mount newly created SSD partitions under /var/www and /var/lib/mysql

Before I mounted /var/www and /var/lib/mysql in order to be able to mount under the already existing directories I had to:

1. Stop Apache and MySQL server
2. Move Mysql and Apache Documentroot and Data directories to -bak
3. Create new empty /var/www and /var/lib/mysql direcotries
4. Copy backpups ( /var/www-bak and /var/lib/mysql-bak ) to the newly mounted ext4 SSD partitions

To achieve that I had to issue following commands:

linux:~# /etc/init.d/apache2 stop
linux:~# /etc/init.d/mysql stop

linux:~# mv /var/www /var/www-bak
linux:~# mv /var/lib/mysql /var/lib/mysql-bak

linux:~# mkdir /var/www
linux:~# mkdir /var/lib/mysql
linux:~# chown -R mysql:mysql /var/lib/mysql

Then to manually mount the SSD partitions:

linux:~# mount  /dev/sdb5 /var/lib/mysql
linux:~# mount /dev/sdb6 /var/www

To check that the folders are mount into the SSD drive, ran mount cmd:


linux:~# mount
/dev/sda1 on / type ext3 (rw,errors=remount-ro)
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
udev on /dev type tmpfs (rw,mode=0755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
/dev/sdc1 on /backups type ext4 (rw)
/dev/sdb5 on /var/lib/mysql type ext4 (rw,relatime,discard,data=ordered))
/dev/sdb6 on /var/www type ext4 (rw,relatime,discard,data=ordered))


That's great now the filesystem mounts fine, however as it an SSD drive and SSD drives are being famous for having a number of limited writes on disk before the drive lifetime is over it is a good idea to increase a bit the lifetime of the SSD by mounting the SSD partitions with noatime and errors=remount-ro (in order to not log file access times to filesystem table and to remount the FS read only in case of some physical errors of the drive).

5. Configure SSD partitions to boot every time Linux reboots

Now great, the filesystems gets mounted fine so next thing to do is to make it automatically mount every time the Linux OS boots up, this on GNU / Linux is done through /etc/fstab, for my 2 ext4 partitions this is the content to add at the end of /etc/fstab:


/dev/sdb5               /var/lib/mysql      ext4        noatime,errors=remount-ro       0       1
/dev/sdb6               /var/www        ext4    noatime,errors=remount-ro       0       1


quickest way to add it without a text editor is to echo to the end of file:

linux:~# cp -rpf /etc/fstab /etc/fstab.bak_25_03_2016
linux:~# echo ' /dev/sdb5               /var/lib/mysql      ext4        noatime,errors=remount-ro,discard       0       1' >> /etc/fstab
linux:~# echo ' /dev/sdb6               /var/www        ext4    noatime,errors=remount-ro,discard       0       1 ' >> /etc/fstab

Then mount again all the filesystems including the 2 new created SSD (100 and 20 GB) partitions:

linux:~# umount /var/www
linux:~# umount /var/lib/mysql
linux:~# mount -a

To assure properly mounted with noatime and remount-ro on errors options:

linux:~# mount | grep -i sdb
/dev/sdb5 on /var/lib/mysql type ext4 (rw,noatime,errors=remount-ro)
/dev/sdb6 on /var/www type ext4 (rw,noatime,errors=remount-ro)


It is also a good idea to check a statistics of disk free command:

linux:~# df -h|grep -i sdb
/dev/sdb5         19G  0G    19G  0% /var/lib/mysql
/dev/sdb6         92G   0G    92G  0% /var/www

6. Copy all Webserver and SQL data from backupped directories to new SSD mounted

Last but not least is to copy all original content files from /var/www-bak and /var/lib/mysql-bak to the new freshly  created SSD partitions, though copying the files can be made with normal linux copy command (cp),
I personally prefer rsync because rsync is much quicker and more efficient in copying large amount of files in my case this were 48 Gigabytes.

To copy files from with rsync:


linux:~# rsync -av –log-file /var/log/backup.log  /var/www-bak /var/www
linux:~# rsync -av –log-file /var/log/backup.log  /var/lib/mysql-bak /var/lib/mysql

Then ofcourse, finally to restore my websites normal operation I had to bring up the Apache Webservers and MySQL service


linux:~# /etc/init.d/apache2 start
linux:~# /etc/init.d/mysql start

7. Optimizing SSD performance with periodic trim (discard of unused blocks on a mounted filesystem)

As I digged deeper into how to even further optimize SSD drive performance I learned about the cleaning action TRIM of the partitions for a long term performance proper operation, to understand it better think about trimming like Windows degrament operatin.

fstrim – discard unused blocks on a mounted filesystem

fstrim [-o offset] [-l length] [-m minimum-free-extent] [-v] mountpoint

fstrim is used on a mounted filesystem to discard (or "trim") blocks which are not in use by the filesystem. This is useful for
solid-state drives (SSDs) and thinly-provisioned storage.

By default, fstrim will discard all unused blocks in the filesystem. Options may be used to modify this behavior based on range or
size, as explained below.

Trimming is really necessery, otherwise SSD become very slow after some time. All modern SSD's support TRIM, but older SSD's from before 2010 usually don't.
Thus for an older SSD you'll want to check this on the website of the manufacturer.

As I mentioned earlier TRIM is not supported by all SSD drives, to check whether TRIM is supported by SSD:

linux:~# hdparm -I /dev/sdb|grep -i -E 'trim|discard'
                  *          Data set Management TRIM supported (limit 1 block)

It's easiest to let the system perform an automatic TRIM. That can be done in several ways.

The quickest way for trimming is to place into /etc/rc.local trim  commands, in my case it was the following commands:


fstrim -v /var/lib/mysql
fstrim -v /var/www

To add it I've used my favourite vim text editor.
Adding commands to rc.local will make SSD trimming be executed at boot time so this will reduce a bit the downtime during the trim with some time so perhaps for those like me which are running a crually important websites a better

An alternative way is to schedule a daily cron job to do just place a new job in /etc/cron.daily/trim e.g.:

linux:~# vim /etc/cron.daily/trim


fstrim -v /var/lib/mysql
fstrim -v /var/www

linux:~# chmod +x /etc/cron.daily/trim

However the best way to enable automatic trimming to SSD  is to just add the discard parameter to /etc/fstab I've already done that earlier in this article.

Not really surprising the increase of websites opening (page load times) were decreased dramatically web page loading waiting time fall down 2 to 2.5 times, so the moral of story for me is always when possible from now on to use SSD in order to have superb websites opening times.

To sum it up what was achieved with moving my data into SSD Drive, before moving websites and SQL data to SSD drive the websites were opening for 6 to 10 seconds now sites open in 2 to 4.5 seconds which is below 5 seconds (the normal waiting time for a user to see your website).
By the way it should be not a news forfor people that are into Search Engine Optimization but might be for some of unexperienced new Admins and Webmasters that, all that all page opening times that  exceeds 5 secs is considered to be a slow website (and therefore perhaps not worthy to read).
The high load page times >5 secs makes the website also less interesting not only for end users but also for search engines (Google / Yahoo / Bing / Baidoo etc.) will is said to crawl it less if website is slow.
Search Engines are said to Index much better and crawl more frequently into more responsive websites.
Hence implementing SSD to a server and decreasing the page load time should bring up my visitors stats a bit too.

Well that's all for today, hope you enjoyed 🙂

Share this on

Mount remote Linux SSHFS Filesystem harddisk on Windows Explorer SWISH SSHFS file mounter and a short evaluation on what is available to copy files to SSHFS from Windows PC

Monday, February 22nd, 2016


I'm forced to use Windows on my workbook and I found it really irritating, that I can't easily share files in a DropBox, Google Drive, MS OneDrive, Amazon Storage or other cloud-storage free remote service. etc.
I don't want to use DropBox like non self-hosted Data storage because I want to keep my data private and therefore the only and best option for me was to make possible share my Linux harddisk storage
dir remotely to the Windows notebook.

I didn't wanted to setup some complex environment such as Samba Share Server (which used to be often a common option to share file from Linux server to Windows), neither wanted to bother with  installing FTP service and bother with FTP clients, or configuring some other complex stuff such as WebDav – which BTW is an accepted and heavily used solution across corporate clients to access read / write files on a remote Linux servers.
Hence, I made a quick research what else besides could be used to easily share files and data from Windows PC / notebook to a home brew or professional hosting Linux server.

It turned out, there are few of softwares that gives a similar possibility for a home lan small network Linux / Windows hybrid network users such, here is few of the many:

  • SyncThingSyncthing is an open-source file synchronization client/server application, written in Go, implementing its own, equally free Block Exchange Protocol. The source code's content-management repository is hosted on GitHub







  • OwnCloud – ownCloud provides universal access to your files via the web, your computer or your mobile devices







  • Seafile – Seafile is a file hosting software system. Files are stored on a central server and can be synchronized with personal computers and mobile devices via the Seafile client. Files can also be accessed via the server's web interface


I've checked all of them and give a quick try of Syncthing which is really easy to start, just download the binary launch it and configure it under https://Localhost:8385 URL from a browser on the Linux server.
Syncthing seemed to be nice and easy to configure solution to be able to Sync files between Server A (Windows) and Server B(Linux) and guess many would enjoy it, if you want to give it a try you can follow this short install syncthing article.
However what I didsliked in both SyncThing and OwnCloud and Seafile and all of the other Sync file solutions was, they only supported synchronization via web and didn't seemed to have a Windows Explorer integration and did required
the server to run more services, posing another security hole in the system as such third party softwares are not easily to update and maintain.

Because of that finally after rethinking about some other ways to copy files to a locally mounted Sync directory from the Linux server, I've decided to give SSHFS a try. Mounting SSHFS between two Linux / UNIX hosts is
quite easy task with SSHFS tool

In Windows however the only way I know to transfer files to Linux via SSHFS was with WinSCP client and other SCP clients as well as the experimental:

As well as few others such as ExpandDrive, Netdrive, Dokan SSHFS (mirrored for download here)
I should say that I first decided to try copying few dozen of Gigabyte movies, text, books etc. using WinSCP direct connection, but after getting a couple of timeouts I was tired of WinSCP and decided to look for better way to copy to remote Linux SSHFS.
However the best solution I found after a bit of extensive turned to be:

SWISH – Easy SFTP for Windows

Swish is very straight forward to configure compared to all of them you download the .exe which as of time of writting is at version 0.8.0 install on the PC and right in My Computer you will get a New Device called Swish next to your local and remote drives C:/ D:/ , USBs etc.


As you see in below screenshot two new non-standard buttons will Appear in Windows Explorer that lets you configure SWISH


Next and final step before you have the SSHFS remote Linux filesystem visible on Windows Xp / 7 / 8 / 10 is to fill in remote Linux hostname address (or even better fill in IP to get rid of possible DNS issues), UserName (UserID) and Direcory to mount.


Then you will see the SSHFS moutned:


You will be asked to accept the SSH host-key as it used to be unknown so far


That's it now you will see straight into Windows Explorer the remote Linux SSHFS mounted:


Once setupped a Swish connection to copy files directly to it you can use the Send to Embedded Windows dialog, as in below screenshot


The only 3 problem with SWISH are:

1. It doesn't support Save password, so on every Windows PC reboot when you want to connect to remote Linux SSHFS, you will have to retype remote login user pass.
Fron security stand point this is not such a bad thing, but it is a bit irritating to everytime type the password without an option to save permanently.
The good thing here is you can use Launch Key Agent
as visible in above screenshot and set in Putty Key Agent your remote host SSH key so the passwordless login will work without any authentication at
all however, this might open a security hole if your Win PC gets infected by virus, which might delete something on remote mounted SSHFS filesystem so I personally prefer to retype password on every boot.

2. it is a bit slow so if you're planning to Transfer large amounts of Data as hundreds of megabytes, expect a very slow transfer rate, even in a Local  10Mbit Network to transfer 20 – 30 GB of data, it took me about 2-3 hours or so.
SWISH is not actively supported and it doesn't have new release since 20th of June 2013, but for the general work I need it is just perfect, as I don't tent to be Synchronizing Dozens of Gigabytes all the time between my notebook PC and the Linux server.

3. If you don't use the established mounted connection for a while or your computer goes to sleep mode after recovering your connection to remote Linux HDD if opened in Windows File Explorer will probably be dead and you will have to re-enable it.

For Mac OS X users who want to mount / attach remote directory from a Linux partitions should look in fuguA Mac OS X SFTP, SCP and SSH Frontend

I'll be glad to hear from people on other good ways to achieve same results as with SWISH but have a better copy speed while using SSHFS.

Share this on

Fix “Secure Connection Failed” – An error occured SSL received a record that exceeded the maximum permissible length howto

Monday, September 14th, 2015

When I was trying to establish a new Internal Business SSL certificate on one of the 6 months planned SPLIT projects (e.g. duplicate a range systems environment to another one), I've stumbled a very odd SSL issue. Once I've setup all the virtualhost SSL configurations properly (identical SSL configuration directives and Apache Webserver version to another host and testing in a browser I was getting the following error:

Secure Connection Failed

An error occurred during a connection to

SSL received a record that exceeded the maximum permissible length.

(Error code: ssl_error_rx_record_too_long)

Below is a screenshot:

The page you are trying to view can not be shown because the authenticity of the received data could not be verified. Please contact the web site owners to inform them of this problem. Alternatively, use the command found in the help menu to report this broken site.

The first logical thing to do was to check the error.log but there was no any errors there that point me to anything meaningful, besides that the queries I was making to the Domain doesn't show off as requests neither in Apache access.log nor in error.log so this was puzzling.
I thought I might have messed up something during Key file / CSR generation time so I revoked old certificate and reissued it.


$ openssl x509 -text -in |less ertificate: Data: Version: 3 (0x2) Serial Number:

Shows that all is fine with certificate Then when trying to test remote certificate with SSL command:


openssl s_client -CApath -connect

: There was an error After plenty of research in Google I come to conclusion something is either wrong with Listen httpd.conf directive or NameVirtualHost is binded to port 80 or some other port different from 443, however surprisingly I did not used the NameVirtualHost at all in my apache config. After a lot of pondering I finally spot it. The whole certificate isseus were caused by:

< – Less than sign

which I missaw and forget to clean up from template during IP paste (obtained from /sbin/ifconfig |grep -i xx.xx.xx.xx). So finally in order to fix the SSL error I had to just delete <, e.g.:

<VirtualHost <>

had to become:



Such a minor thing took me 3 hours of pondering to resolve and thanksfully it is finally fixed! Then of course had to restart Apache to make fixed Vhost settings working:

# apachectl stop; sleep 2; apachectl start

So now the SSL works again, thanks God!

Share this on

Sunday of the Blind in Orthodox Church, 6th week after Easter (Passover)

Monday, May 18th, 2015





This Sunday I was to Church and part of our Gospel Reading that occurs on every Holy Liturgy in the Orthodox Church this time we had the following reading:

Gospel of John Jesus Heals the Man Born Blind

1 And as Jesus passed by, he saw a man which was blind from his birth.
2 And his disciples asked him, saying, Master, who did sin, this man, or his parents, that he was born blind?
3 Jesus answered, Neither hath this man sinned, nor his parents: but that the works of God should be made manifest in him.
4 I must work the works of him that sent me, while it is day: the night cometh, when no man can work.
5 As long as I am in the world, I am the light of the world.
6 When he had thus spoken, he spat on the ground, and made clay of the spittle, and he anointed the eyes of the blind man with the clay,
7 And said unto him, Go, wash in the pool of Siloam, (which is by interpretation, Sent.) He went his way therefore, and washed, and came seeing.
8 The neighbours therefore, and they which before had seen him that he was blind, said, Is not this he that sat and begged?
9 Some said, This is he: others said, He is like him: but he said, I am he.
10 Therefore said they unto him, How were thine eyes opened?
11 He answered and said, A man that is called Jesus made clay, and anointed mine eyes, and said unto me, Go to the pool of Siloam, and wash: and I went and washed, and I received sight.
12 Then said they unto him, Where is he? He said, I know not.

The Pharisees Investigate

13 They brought to the Pharisees him that aforetime was blind.
14 And it was the sabbath day when Jesus made the clay, and opened his eyes.
15 Then again the Pharisees also asked him how he had received his sight. He said unto them, He put clay upon mine eyes, and I washed, and do see.
16 Therefore said some of the Pharisees, This man is not of God, because he keepeth not the sabbath day. Others said, How can a man that is a sinner do such miracles? And there was a division among them.
17 They say unto the blind man again, What sayest thou of him, that he hath opened thine eyes? He said, He is a prophet.

18 But the Jews did not believe concerning him, that he had been blind, and received his sight, until they called the parents of him that had received his sight.
19 And they asked them, saying, Is this your son, who ye say was born blind? how then doth he now see?
20 His parents answered them and said, We know that this is our son, and that he was born blind:
21 But by what means he now seeth, we know not; or who hath opened his eyes, we know not: he is of age; ask him: he shall speak for himself.
22 These words spake his parents, because they feared the Jews: for the Jews had agreed already, that if any man did confess that he was Christ, he should be put out of the synagogue.
23 Therefore said his parents, He is of age; ask him.

24 Then again called they the man that was blind, and said unto him, Give God the praise: we know that this man is a sinner.
25 He answered and said, Whether he be a sinner or no, I know not: one thing I know, that, whereas I was blind, now I see.
26 Then said they to him again, What did he to thee? how opened he thine eyes?
27 He answered them, I have told you already, and ye did not hear: wherefore would ye hear it again? will ye also be his disciples?
28 Then they reviled him, and said, Thou art his disciple; but we are Moses' disciples.
29 We know that God spake unto Moses: as for this fellow, we know not from whence he is.
30 The man answered and said unto them, Why herein is a marvellous thing, that ye know not from whence he is, and yet he hath opened mine eyes.
31 Now we know that God heareth not sinners: but if any man be a worshipper of God, and doeth his will, him he heareth.
32 Since the world began was it not heard that any man opened the eyes of one that was born blind.
33 If this man were not of God, he could do nothing.
34 They answered and said unto him, Thou wast altogether born in sins, and dost thou teach us? And they cast him out.

Spiritual Sight and Blindness

35 Jesus heard that they had cast him out; and when he had found him, he said unto him, Dost thou believe on the Son of God?
36 He answered and said, Who is he, Lord, that I might believe on him?
37 And Jesus said unto him, Thou hast both seen him, and it is he that talketh with thee.
38 And he said, Lord, I believe. And he worshipped him.
39 And Jesus said, For judgment I am come into this world, that they which see not might see; and that they which see might be made blind.
40 And some of the Pharisees which were with him heard these words, and said unto him, Are we blind also?
41 Jesus said unto them, If ye were blind, ye should have no sin: but now ye say, We see; therefore your sin remaineth.

As you read above the Lord Jesus Christ healed the blind-born person by which manifesting Himself as a True expectedMessiah The Saviour of the Lord a Prophet and a True and Only Begotten Son of God.

The words of God directly fought the great proudness of Jewish Pharsiee wise people (thinking that know the Law better than the Lord himself). Their selfishness and great self-conceit make their soul which was in a terrible state to suffer because their produness was insulted by the truthful words and they felt wounded. They rejected the Lords words with a question by which Jewish (people) and nowadays often non-believers and even christian manifested wrath, selfishness and even mockery with contempt.

John 9:40 Are we blind also?

Answering the Pharisee's questions, The Lord has depicted there spiritual state, which was the main reason for their question. 

41 Jesus said unto them, If ye were blind, ye should have no sin: but now ye say, We see; therefore your sin remaineth.

The Pharisee's considered for spiritual seers,  in a highes level understandanding God, his laws covenant and respectively spiritual realm, so they did not need any further grown in God's knowledge, thus rejecting the true teaching which was taught by God himself.

False doctrines of this blind teachers are fruit of human proud and self-conceit. 
The proud understand himself as a independent, self-sufficient and not like a God dependent creation, the earthly life as something eternal and death and eternity for unexisting.

For this people God's plan was something not existing but God was understood as the Jewish law false teachers understanding of right and wrong in a way they have associated the eternal God with the scriptures, idolizing scriptures and inverting their meaning giving them a completely different meaning to fulfill their own passions.

This people who were to be the jewish intelligentia have recognized the human reason for a world ruler.
All the thoughts of the flesh crawl the land, the human understanding to this carnal men is completely sacrificed to the earth in which he wants to arrange his life to be all time pleasure of sin.
In this empty and unreachable goal was forced all the  fleshly and spiritual powers of both pharisees and sadukees. 

The Lord show them that the humbliness and remembrance of the dead should be the true lifely goal of man and it is  the humble-wisdom that gives an insight to eternity.

Achiving humble-Wisdom contradicts the wordly and strive for virtues and therefore it is not being considered worth for man and society material understanding of good and progress.
The one achiving spiritual knowledge understands himself as a tiny unimportant particle in a huge universe of things (generations, times, paste and future events of human history).

What the Lord Jesus Christ tried to point to this blind teachers is that only the Mind and heart of humble in contrasting to the proudness and high-minded people they were could accept God's Christian teaching and to all the time endeavor in achiving the christian virties.
The non-blind person sees and feels the great failure of (his mainly) and then all surrounding humanity fallen nature and because of this soul-pain and internal and desire for salvation and spiritual resurrection and restoration are ready to joyfully accept the Saviour Lord Jesus Christ.

Let us make from our heart a spiritual altar of God and there through our mind to sacrifice spiritual sacrifices of tenderness, repentance, confession, humble heartness (which God would not despise (Ps. 50:19) Amen 

Share this on

Your Firefox profile cannot be loaded. It may be missing or inaccessible – Fix

Tuesday, May 27th, 2014


When I opened firefox I was offered that firefox cleans some data. Pressing on it took a long so I killed firefox process from Windows taskmanager (taskmgr).  . Next time Firefox was started I got the error (warning):

Your Firefox profile cannot be loaded. It may be missing or inaccessible"

Firefox version is 29.0.1.

Once the dialog, Firefox fails to further open. To fix Your Firefox profile cannot be loaded. It may be missing or inaccessible press windows-key+R to invoke <Open program prompt and type in:


In explorer Window that will pop=up rename the folder labelled "Firefox" to something like old-Firefox.
On next start of firefox, you will be offered to recrate "the missiong profile and it will force Firefox to re-create profile.

If you want to import some of your old data into the new profile afterwards: Recovering important data from an old profile check Recovering important data from an old profile Another approach is to to go to Firefox profile folder and delete profiles.ini, this will also make firefox recreate the file on its next start. Enjoy ! 🙂


Share this on

Mysql: How to disable single database without dropping or renaming it

Wednesday, January 22nd, 2014

mysql rename forbid disable database howto logo, how to disable single database without dropping it
A colleague of mine working on MySQL database asked me How it is possible to disable a MySQL database. He is in situation where the client has 2 databases and application and is not sure which of the two databases the application uses. Therefore the client asked one of the database is disabled and wait for few hours and see if something will break / stop working and in that way determine which of the two database is used by application.

My first guess was to backup both databases and drop one of them, then if it is the wrong one to restore from the SQL dump backup, however this wasn't acceptable solution. So second I though of RENAME of database to another one and then reverting the name, however as it is written in MySQL documentation RENAME database function was removed from MySQL (found to be dangerous) since version 5.1.23 onwards. Anyhow there is a quick hack to rename mysql database using a for loop shell script one below:

mysql -e "CREATE DATABASE \`new_database\`;"
for table in `mysql -B -N -e "SHOW TABLES;" old_database`
  mysql -e "RENAME TABLE \`old_database\`.\`$table\` to \`new_database\`.\`$table\`"
  mysql -e "DROP DATABASE \`old_database\`;"

Other possible solution was to change permissions of Application used username, however this was also complicated from mysql cli, hence I thought of installing and using PHPMyAdmin to make modify of db user permissions easier but on this server there wasn't Apache installed and MySQL is behind a firewall and only accessible via java tomcat host.

Finally after some pondering what can be done I came with solution to request to disable mysql database using chmod in /var/lib/mysql/data/, i.e.:

sql-server:~# chmod 0 /var/lib/mysql/databasename

Where databasename is the same as the database is named listable via mysql cli.

After doing it that way with no need to restart MySQL server database stopped to appear in show databases; and client confirmed that disabled database is no longer needed so we proceeded dropping it.

Hope this little article will help someone out there. Cheers :

Share this on

Prodigy night and Spirit of Burgas 2012 – few impressions

Tuesday, August 7th, 2012

The Prodigy Spirit of Burgas 2012 - How to steal a jet fighter latest prodigy album

As a kid I have been very big fan of The Prodigy. Prodigy were considered absolutely revolutionary style band in the 1995 – 2004 years. As an ex-big fan of the band and cause of the fact I happened to be near to Burgas I decided to attend their performance on August the 5-th.
Spirit of Burgas as every year happens on the beach of Burgas.

A large number of nice underground rock / punk / jazz / reggae etc. continuing for days is not so common on the balkans so Spirit of Burgas is quite a unique undeground music gathering …
Spirit of Burgas is taking place now for a 4-th year and starting to become an established Electronic, Dance, Metal feast here on Balkans.

Below is a list of all the bands that played on Spirit of Burgas 3 days feast this year;
Spirit of Burgas year 2012 bands agenda for 3 days list picture

The 1 night entrance fee was quite expensive 40 EUR, but for a famous band as Prodigy and the rest of bands bands playing on other beach scenes I guess the price was fair. The 3 days entrance fee worth it money much more though, for 3 days ticket the price was 60 EUR. The beer price too high; 1 beer price was 1.60 EUR. For a richer countries this prices are nothing and OK but for the low salaries in Bulgaria the beer price was killing.

Besides the high price, the only beer one can buy on the beach was Becks (taking me out the choice to buy another beer brand!). Everywhere around was those annoying writings on both billboards and video sceens B’ECKSPERIENCE, Jack Daniels, DSK Bank etc. Advertsiments should be but this was a bit over-stretched!….

Prodigy performance started about 10:30 on the so called Main Stage – a big scene facing the sea. Prodigy break out and enter, the scene right after a performance of modern punk band SUM 41

I don’t know the music works of SUM 41 that’s why I skipped most of their concert checking the other stages perf-s. On most of other stages mostly Bulgarian Punk / Rock / Alternative musicians were playing.
Prodigy’s scene break-up was done with some famous buzzling sounds known from their works, as you can see from the videos I post below.
The Stage was very over-crowded, according to some estimations the concert was attended by about 15 000 people ! ! !. Considering the decay in Prodigy popularity I guess this was quite a good number.
During The Prodigy‘s play all the other scenes were shut off in order to allow everybody to enjoy Prodigy.

I should admit, the music beats and ruffs were just great, but I didn’t liked the vox messages “Keith Flinth”, was spreading; Saying some iditic phrases like:

Where is my People?, My Prodigy People, My Voodoo People and plenty of other non-sense

As a Christian I know pretty well Prodigy’s music message is not in consonance in Christianity and hence I didn’t liked to be associated as a “prodigy person”, cause I don’t want to be associated with people who preach evil. Something else, showing off the low prodigy vocal culture was his frequent use of the F*CK word, which btw was probably the most used word by almost every musician playing on every scene all night long…

The scene lightning was rich but not bright, enough to clearly distinguish what is happening on the scene.
On the back stage, there was the name of latest prodigy album – How To Steal a Jet Fighter with a background of an old jet fighter plane.

Prodigy Vocalist Keith Flinth on main stage spirit of burgas 2012

The group scene performance was quite aggressive as always, actually probably it is the primitive behavior of the band and the primitiveness in music that attracts the crowds. People nowadays are too much civilized that the wild primitive deep in us is something we hardly miss as ppl.

The Prodigy in the beginning @ Spirit of Burgas 04.08.2012

The Prodigy – Breathe, Live @ Spirit of Burgas 2012

Prodigy Spirit of Burgas 2012 Black Sea Party Zone 1

The Prodigy Spirit of Burgas 2012 Black Sea Party Zone 2

Prodigy Spirit of Burgas 2012 Black Sea Party Zone 3

Prodigy Spirit of Burgas 2012 Black Sea Party Zone 4

Prodigy Spirit of Burgas 2012 Black Sea Party Zone 5

Prodigy Spirit of Burgas 2012 Black Sea Party Zone 6

Prodigy Spirit of Burgas 2012 Black Sea Party Zone 7

Prodigy Spirit of Burgas 2012 Black Sea Party Zone 8

The Prodigy – Spirit of Burgas 2012 Black Sea Party Zone 9

Prodigy Spirit of Burgas 2012 Black Sea Party Zone 10

By the way during the concert all around the scene, there was massive marijuana smoke (not to say fog 🙂 ). Probably kilos of “Mara” (as smokers call it for short in BG) was smoken by fans during the 1.15 mins group performance.
As a result, many of the ruffling fans were in a tranced “Nirvana” state 🙂
Something, I’ve noticed is the quality of Prodigy performance, has severely fallen if compared to old concerts of the band period 1999 – 2002.
One moment in the concert was really pissing off for me, when Keith Flinth instructed the public to GET DOWN, saying something like:

Now everybody GET DOWN, I SAID GET DOWN – the sheep fans just followed the ORDER squatting; This was pure “MIND CONTROL” – almost everyone squatted unquestionably.
A girl behind me tried to push me down, to make me kneel down as I refused to squat 🙂
I told her that “I don’t follow orders, jokingly and didn’t squatted 🙂

This squatting from Christian position looked like exactly like worshipping Prodigy as [ idol (God) substitute ] …
The concert end up in a very stupid way; there was no encore performance, not even introduction of the band members to the people and even a no simply BYE to the fans. They just shut off and went away silently like a beaten dogs 🙂

Following the end of Prodigy performance on the neighbor Stage, the “legendary” Bulgarian Punk / Rock old-school band KONTROL was playing. I had great fun with KONTROL as I used to be very much loving the band back in my metal years 🙂 KONTROL’s performance was just great, but unfortunately the scene lightning was again shit and the big Video Screens was switched off so I could see the band hardly. After KONTROL’s end up another hard-core Bulgarian band jumped the scene (PIRANNHA). This guys, were completely funny and i really disliked them as they were heavily copying Venom, even their logo was copied from Venom’s Goat Pentagram (the band mascot was a Satanic Pentagram on wheels (complete iditiosm) :D)
The vocal were cursing themselves, screaming funnily “F*CK PIRANNHA, F*CK PIRANNHA !” 🙂

Spirit of Burgas was supposed to close about 5 in the morning, but I was too busy and I left in 2:45, spending few minutes listening to some kind of nice sounding Drum and Bass DJ playing on the main stage.

Share this on

How to completely disable Replication in MySQL server 5.1.61 on Debian GNU / Linux

Monday, July 16th, 2012


Some time ago on one of the Database MySQL servers, I've configured replication as it was required to test somethings. Eventually it turned out replication will be not used (for some reason) it was too slow and not fitting our company needs hence we needed to disable it.

It seemed logical to me that, simply removing any replication related directives from my.cnf and a restart of the SQL server will be enough to turn replication off on the Debian Linux host. Therefore I proceeded removed all replication configs from /etc/my/my.cnf and issued MySQL restart i. e.:

sql-server:~# /etc/init.d/mysql restart

This however didn't turned off replication,as I thought and in phpmyadminweb frontend interface, replication was still appearing to be active in the replication tab.

Something was still making the SQL server still act as an Replication Slave Host, so after a bit of pondering and trying to remember, the exact steps I took to make the replication work on the host I remembered that actually I issued:


Onwards I run:


and found in the database the server was still running in Slave Replication mode

Hence to turn off the db host run as a Slave, I had to issue in mysql cli:

mysql> STOP SLAVE;
Query OK, 0 rows affected, 1 warning (0.01 sec)
Query OK, 0 rows affected, 1 warning (0.01 sec)

Then after a reload of SQL server in memory, the host finally stopped working as a Slave Replication host, e.g.

sql-server:~# /etc/init.d/mysql restart

After the restart, to re-assure myself the SQL server is no more set to run as MySQL replication Slave host:

Empty set (0.00 sec)

Cheers 😉

Share this on

How to count lines of PHP source code in a directory (recursively)

Saturday, July 14th, 2012

Count PHP and other programming languages lines of source code (source code files count) recursively

Being able to count the number of PHP source code lines for a website is a major statistical information for timely auditting of projects and evaluating real Project Managment costs. It is inevitable process for any software project evaluation to count the number of source lines programmers has written.
In many small and middle sized software and website development companies, it is the system administrator task to provide information or script quickly something to give info on the exact total number of source lines for projects.

Even for personal use out of curiousity it is useful to know how many lines of PHP source code a wordpress or Joomla website (with the plugins) contains.
Anyone willing to count the number of PHP source code lines under one directory level, could do it with:::

serbver:~# cd /var/www/wordpress-website
server:/var/www/wordpress-website:# wc -l *.php
17 index.php
101 wp-activate.php
1612 wp-app.php
12 wp-atom.php
19 wp-blog-header.php
105 wp-comments-post.php
12 wp-commentsrss2.php
90 wp-config-sample.php
85 wp-config.php
104 wp-cron.php
12 wp-feed.php
58 wp-links-opml.php
59 wp-load.php
694 wp-login.php
236 wp-mail.php
17 wp-pass.php
12 wp-rdf.php
15 wp-register.php
12 wp-rss.php
12 wp-rss2.php
326 wp-settings.php
451 wp-signup.php
110 wp-trackback.php
109 xmlrpc.php
4280 total

This will count and show statistics, for each and every PHP source file within wordpress-website (non-recursively), to get only information about the total number of PHP source code lines within the directory, one could grep it, e.g.:::

server:/var/www/wordpress-website:# wc -l *.php |grep -i '\stotal$'
4280 total

The command grep -i '\stotal$' has \s in beginning and $ at the end of total keyword in order to omit erroneously matching PHP source code file names which contain total in file name; for example total.php …. total_blabla.php …. blabla_total_bla.php etc. etc.

The \s grep regular expression meaning is "put empty space", "$" is placed at the end of tital to indicate to regexp grep only for words ending in string total.

So far, so good … Now it is most common that instead of counting the PHP source code lines for a first directory level to count complete number of PHP, C, Python whatever source code lines recursively – i. e. (a source code of website or projects kept in multiple sub-directories). To count recursively lines of programming code for any existing filesystem directory use find in conjunction with xargs:::

server:/var/www/wp-website1# find . -name '*.php' | xargs wc -l
1079 ./wp-admin/includes/file.php
2105 ./wp-admin/includes/media.php
103 ./wp-admin/includes/list-table.php
1054 ./wp-admin/includes/class-wp-posts-list-table.php
105 ./wp-admin/index.php
109 ./wp-admin/network/user-new.php
100 ./wp-admin/link-manager.php
410 ./wp-admin/widgets.php
108 ./wp-content/plugins/akismet/widget.php
104 ./wp-content/plugins/google-analytics-for-wordpress/wp-gdata/wp-gdata.php
104 ./wp-content/plugins/cyr2lat-slugs/cyr2lat-slugs.php
652239 total

As you see the cmd counts and displays the number of source code lines encountered in each and every file, for big directory structures the screen gets floated and passing | less is nice, e.g.:

find . -name '*.php' | xargs wc -l | less

Displaying lines of code for each file within the directories is sometimes unnecessery, whether just a total number of programming source code line is required, hence for scripting purposes it is useful to only get the source lines total num:::

server:/var/www/wp-website1# find . -name '*.php' | xargs wc -l | grep -i '\stotal$'

Another shorter and less CPU intensive one-liner to calculate the lines of codes is:::

server:/var/www/wp-website1# ( find ./ -name '*.php' -print0 | xargs -0 cat ) | wc -l

Here is one other shell script which displays all file names within a directory with the respective calculated lines of code

For more professional and bigger projects using pure Linux bash and command line scripting might not be the best approach. For counting huge number of programming source code and displaying various statistics concerning it, there are two other tools – SLOCCount
as well as clock (count lines of code)

Both tools, are written in Perl, so for IT managers concerned for speed of calculating projects source (if too frequent source audit is necessery) this tools might be a bit sluggish. However for most projects they should be of a great add on value, actually SLOCCount was already used for calculating the development costs of GNU / Linux and other projects of high importance for Free Software community and therefore it is proven it works well with ENORMOUS software source line code calculations written in programming languages of heterogenous origin.

sloccount and cloc packages are available in default Debian and Ubuntu Linux repositories, so if you're a Debilian user like me you're in luck:::

server:~# apt-cache search cloc$
cloc - statistics utility to count lines of code
server:~# apt-cache search sloccount$
sloccount - programs for counting physical source lines of code (SLOC)

Well that's all folks, Cheers en happy counting 😉

Share this on