Skip to content

mylvmbackup 0.3 now released

I am happy to announce version 0.3 of mylvmbackup, a tool that performs consistent backups of a MySQL server's tables using Linux LVM snapshots.

Special thanks go to Fred Blaise, who contributed the majority of the new features that have been added to this new release:

  • It is now possible to use an external configuration file /etc/mylvmbackup.conf to store the options. This is probably more convenient than having to pass a slew of options on the command line or having to hack the script itself to change the default values. This new feature requires the Config::IniFiles Perl module to be installed, a sample configuration file is included in the package.
  • The logging to the console has been visually enhanced by including a time stamp and the message category (e.g. Info, Warning or Error). In addition to that, it is now possible to log messages to a local or remote syslog server. This feature requires the Sys::Syslog Perl module.
  • The man page has now been converted into an asciidoc file, which makes it easier to generate other document formats as well, e.g. a HTML version.
  • Several small bugs have been fixed, too: see the ChangeLog for details.
If you are looking for a convenient backup tool to create fast and consistent MySQL backups, please give mylvmbackup a try! You feedback is appreciated. A tarball and RPM are now available for download from the project's home page. Thanks!

Hot-swapping the CD-ROM drive in my Thinkpad T42 UltraBay with SUSE Linux 10.1

While browsing the fabolous ThinkWiki pages I stumbled over this little gem: the lt_hotswap kernel module finally allows me to eject the CD-ROM drive in my Thinkpad T42's UltraBay without having to shut down Linux first. This module makes sure that the device is properly unregistered from the kernel's device list. Now I can replace it with e.g. a second battery on the fly and don't have to shutdown the OS completely! The installation on my SUSE Linux 10.1 system was quite easy: after downloading the source tarball from the SourceForge.net download page I performed the following commands:
tar zxvf lt_hotswap-0.3.6.tar.gz
cd lt_hotswap-0.3.6
make
sudo make install
sudo rcacpid restart
modprobe lt_hotswap

You need to have the kernel-source package installed, as well as the gcc compiler, of course. Now when I eject the little lever that allows me to pull out the CD-ROM drive from the UltraBay, the following message appears in /var/log/messages:

lt_hotswap: Requesting IDE eject!
lt_hotswap: Attempting to eject

Now the CD-ROM drive can be safely pulled from the UltraBay and e.g. exchanged with an additional battery. Inserting the battery yields the following kernel message:

kernel: ACPI: Battery Slot [BAT1] (battery present)

The battery info also appears in /proc/acpi/battery and is fully operational. Unfortunately battery monitoring tools like KPowersave or gkrellm don't display the second battery, but at least the kernel is happily using it. I can remove the battery again, but this event does not seem to get registered properly - the second battery remains visible in /proc/acpi/battery, but shows zero capacity and the "present" state does not change. But at least replacing the CD-ROM drive with the battery now workes fine, which was my major concern. And it is still possible to re-insert the CD-ROM drive again:

kernel: ide1: BM-DMA at 0x1868-0x186f, BIOS settings: hdc:pio, hdd:pio
kernel: Probing IDE interface ide1...
kernel: hdc: HL-DT-STCD-RW/DVD DRIVE GCC-4242N, ATAPI CD/DVD-ROM drive
kernel: ide1 at 0x170-0x177,0x376 on irq 15
kernel: hdc: ATAPI 24X DVD-ROM CD-R/RW drive, 2048kB Cache, UDMA(33)

If you want to enable the lt_hotswap module at bootup, you need to add its name to the MODULES_LOADED_ON_BOOT variable in the /etc/sysconfig/kernel configuration file.

If your Laptop uses an external docking station to host a CD-ROM drive, there are some good news for you: according to Andreas Jaeger's blog, the upcoming openSUSE 10.2 will actually provide a generic Dockutils framework that will support docking/undocking functionality for different laptops and vendors. It will be interesting to find out if this covers UltraBay devices as well.

mylvmbackup version 0.2 has been released

I am happy to announce that version 0.2 of the mylvmbackup tool is now available!

mylvmbackup is a Perl script for quickly performing backups of a MySQL server's databases using the Linux Logical Volume Manager (LVM). It creates a consistent LVM snapshot of the server's data directory which is then backed up without further blocking the server's operation.

After version 0.1 was published in May this year, I did not really get much feedback about it. I had some ideas for improvements (see the TODO file included in the package), but never got around to actually start working on them.

Thanks to Robin H. Johnson from the Gentoo project for contributing a number of new options and features as well as some code cleanups. His changes motivated me to make a few more modifications and improvements by myself, which have now been rolled into a new release.

The new options provide some more flexibility in the way the script handles the logical volumes and how the backup files are being created. I also overhauled the building and packaging and added a Makefile to automate these procedures. For details, please refer to the ChangeLog and check the manual page and the README for additional info.

A tarball and RPM of version 0.2 can now be downloaded from the project page.

The SVN repository can now be browsed using WebSVN as well.

Please give it a try! Your feedback is very welcome.

tweetbackcheck