Installing Percona Server 5.1 on Lucid (and after MariaDB)

I installed MariaDB 5.1 onto a server. It worked well, but I wanted to move towards Percona Server, looking towards the future and possibly later using Percona XtraDB Cluster.

My first attempts at doing this involved removing the APT repository for MariaDB and adding one for Percona DB:

deb http://repo.percona.com/apt lucid main
deb-src http://repo.percona.com/apt lucid main

Trying to install percona-server-server-5.1 and percona-server-client-5.1 with libmysql16 didn’t work. The command complained that there were unmet dependencies: mysql-common. According to Bug #877018, an install of the Percona Server version of libmysql16 was needed.

Turns out that my version of libmysql16 was a MariaDB version, not a Percona version – and the Percona version wasn’t to be installed:

# apt-cache policy libmysqlclient16
libmysqlclient16:
  Installed: 5.1.62-mariadb115~lucid
  Candidate: 5.1.62-mariadb115~lucid
  Version table:
 *** 5.1.62-mariadb115~lucid 0
        100 /var/lib/dpkg/status
     5.1.61-rel13.2-430.lucid 0
        500 http://repo.percona.com/apt/ lucid/main Packages
     5.1.61-0ubuntu0.10.04.1 0
        500 http://192.168.6.162/ubuntu/ lucid-updates/main Packages
        500 http://192.168.6.162/ubuntu/ lucid-security/main Packages
     5.1.41-3ubuntu12 0
        500 http://192.168.6.162/ubuntu/ lucid/main Packages

Forcing the install of the proper version of libmysql16 took care of that:

# apt-get --reinstall install libmysqlclient16=5.1.61-rel13.2-430.lucid
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libevent-1.4-2
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
  libmariadbclient16
The following packages will be DOWNGRADED:
  libmysqlclient16
0 upgraded, 0 newly installed, 1 downgraded, 1 to remove and 3 not upgraded.
Need to get 3,691kB of archives.
After this operation, 6,259kB of additional disk space will be used.
Do you want to continue [Y/n]? y
WARNING: The following packages cannot be authenticated!
  libmysqlclient16
Install these packages without verification [y/N]? y
Get:1 http://repo.percona.com/apt/ lucid/main libmysqlclient16 5.1.61-rel13.2-430.lucid [3,691kB]
Fetched 3,691kB in 16s (231kB/s)
(Reading database ... 100664 files and directories currently installed.)
Removing libmariadbclient16 ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
dpkg: warning: downgrading libmysqlclient16 from 5.1.62-mariadb115~lucid to 5.1.61-rel13.2-430.lucid.
(Reading database ... 100657 files and directories currently installed.)
Preparing to replace libmysqlclient16 5.1.62-mariadb115~lucid (using .../libmysqlclient16_5.1.61-rel13.2-430.lucid_i386.deb) ...
Unpacking replacement libmysqlclient16 ...
Setting up libmysqlclient16 (5.1.61-rel13.2-430.lucid) ...

Processing triggers for libc-bin ...
ldconfig deferred processing now taking place

However, there were parts of the MySQL installation that were not accounted for by the removal of MariaDB nor by the installation of Percona Server. Removing these would also remove everything that depended on MySQL server – and Percona Server could not be installed until they were removed. I took care of this impasse by incorporating them into a single `apt-get` command using the syntax to remove and add packages at the same time (note the plus and minus package suffixes):

apt-get install mysql-client-core-5.1- percona-server-client-5.1+ percona-server-server-5.1+ mysql-server-core-5.1-

After a copious amount of output, this final command took care of everything: Percona Server was live. I restarted things that might have broken with MySQL going down and all was well with Percona Server 5.1.

Moving a VMware ESXi 4.0 Guest From One Host to Another

To move an ESXi 4.0 guest is not all that hard – but you must be aware of several things along the way. Taken one step at a time, it won’t be difficult. In this discussion, we assume that you are moving from one ESXi 4.0 host to another – both with the same architecture. (Anything other than that gets much more complicated.)

First, make sure there are no snapshots. Snapshots are not compatible with this process and must be eliminated altogether.

Then, shut down the guest system. We don’t want the guest changing as it is copied across.

The next step is to copy the guest files from the original host to the destination host. This is the longest step considering you probably have gigabytes of data to transfer. This is also done from the ESXi command line.

I would normally use rsync but it doesn’t exist on an ESXi 4.0 system; use scp to copy the files. Your files for the guest should be located in /vmfs/volumes/datastoreX/guest/ where datastoreX is the data store containing the guest and guest is the name of the guest host. If you renamed the host in one of the GUIs such as VSphere Client, then this will reflect the original name.

Make a directory in the remote host (using the ESXi command line interface) in one of the data stores, and then use commands like these from the original host:

cd /vmfs/volumes/datastoreX/guest
scp * remotehost:/vmfs/volumes/datastoreY/guest/

This will copy the files to the remote host.

However, copying is not enough. Log into the remote host and go to the place you copied the files to. Check over the file ending in .vmx for any references to disks that must be changed. Convert remote host paths to local disk paths – you will probably need to know the long hexadecimal path for any paths, so list that before you start editing. If you execute a cd command to the directory containing the guest host, the long path will be in the prompt.

Next you must register the host so the system knows about it. Use this command at the command line to do this:

vim-cmd solo/registervm /vmfs/volumes/datastoreY/guest/guest.vmx

Now, to get the host started: start the host from VSphere Client. The client will give you a question to answer about where the guest came from. Click on the guest’s Summary tab and select I copied it. (which should be the default) and click Ok.

The guest will start up – and discover that the MAC address of its network interface has changed. For Linux, this means a new ethernet interface, and the configuration of the old interface is ignored: that means that there will be no network connectivity. Enter the console and change the old configuration from eth0 to eth1 (or whatever is appropriate; find out with ifconfig -a). This change varies by which Linux distribution you use; for Ubuntu, the configuration is in /etc/network/interfaces.

While you don’t have to reboot, it doesn’t hurt to do so after this change – and it tests the system in a clean reboot. The system should start up cleanly.

Now don’t forget to remove the original. Using the VSphere Client, right-click on the host and select Delete from Disk. This will remove the guest host entirely from the system and delete all of its files. If you want to retain the files, instead select Remove from Inventory which essentially unregisters the host, so that the system is not managing it – but the disk files remain.

Fixing an Android Phone that Locks on Boot

My Android phone started locking up upon boot during the initialization done by the Swapper app. My phone – a Samsung Mesmerize a/k/a Samsung Fascinate – is running cyanogenmod 7 and a shameful number (150+) of apps. I actually reduced the number of apps from its previous high of 300+ (“There’s an App for that! And I have it right here!”)

A Google search and I found a description of how to enter Safe Mode on the Samsung Fascinate.

I also found details on why using swap on Android doesn’t make sense, as well as discussion on the cyanogenmod wiki about why swap is not necessary.

Armed with this information, I booted my Samsung Mesmerize into Safe Mode. This is done by pressing the Menu button when the Samsung display appears (or is it the cyanogenmod logo?). When the system recognizes Safe Mode, it will buzz several times, then continue normally. However, the display will have “Safe Mode” in the lower left hand corner.

Having booted into Safe Mode, I went into Settings > Applications > Manage Applications… and removed Swapper from the device. I then rebooted, and started in normal mode. Fortunately for me, Swapper was indeed the culprit (if it hadn’t thrown up a dialog box, I would have been stumped!).

Now without swap, the device seems to almost be more responsive – perhaps swap was not such a good idea after all.

Putting Fedora 16 onto a Dell Optiplex 745

I purchased a Dell Optiplex 745 (ultra small form factor) from a used equipment sale at the local university. I had hoped that it would be low power as well, but that does not seem to be the case – although a more modern computer is always going to be more efficient (or at least you would think so).

First, I had to reset the BIOS as it had been password protected against changes. Resetting the BIOS was simple: remove the password jumper in the system, boot fully once, then replace the password jumper. The full description is available at eHow. The only sticking point was trying to find the jumper in the case; it turned out to be roughly in the center of the board underneath one of the airflow covers. If you are looking at the system from the top – with the front facing you – the relevant cover is in the back left corner, and the jumper (a tiny blue shiny plastic jumper with extended grasping handle) is towards the center of the board.

I’ve not yet found how to reset the “title” that comes up when the system is booted; this does not seem to be in the BIOS settings anywhere. I could fully reset the CMOS entirely (rather than just the password) but that always scares me – what else will be lost?

Trying to use the CDROM, I ran into some difficulties. It appears it may be easy to put the CDROM in incorrectly; be sure to put it in the right way and seat it fully.

I decided I would put Fedora 16 on this system – and went with Fedora 16 64bit. This went quite smoothly and the system runs well. Specifically, I went with the Fedora 16 XFCE spin – which means it runs fast and light. Running a lightweight desktop on a fast machine is even nicer than I would have expected. I did load WindowMaker but haven’t yet tried it. Who knows – I might try 9wm once.

I loaded up everything that one needs for a home desktop: DVD playback, MP3 playback, and so on. I couldn’t get Parole to work with DVDs, so I went with Totem instead. In the same manner, I installed RhythmBox to play MP3s. I also had no problems getting Flash or Java to work. On the web, an excellent resource for all of these steps is at LinuxForDummies. Video and sound were recognized without problem.

This is definitely a nice setup: both the hardware (the Optiplex 745) and the software (Fedora XFCE 64-bit spin) are recommended.

Solaris 11 Certification Exam Comes off Beta Soon!

The new certification test from Oracle, Oracle Certified Associate, Oracle Solaris 11 System Administrator, is currently in beta and is priced much lower than the standard tests (US$50 compared to US$300). This test will help you get the certification of the same name. However, the beta period is ending soon: April 28, 2012.

Note that this is different from the Oracle Certified Professional, Oracle Solaris 11 System Administrator certification.

It is also still possible to get certified for Solaris 10.

Follow

Get every new post delivered to your Inbox.

Join 36 other followers