Showing entries 11 to 20 of 39
« 10 Newer Entries | 10 Older Entries »
Displaying posts with tag: lvm (reset)
Spreading .ibd files across multiple disks; the optimization that isn’t

Inspired by Baron's earlier post, here is one I hear quite frequently -

"If you enable innodb_file_per_table, each table is it's own .ibd file.  You can then relocate the heavy hit tables to a different location and create symlinks to the original location."

There are a few things wrong with this advice:

  1. InnoDB does not support these symlinks.  If you run an ALTER TABLE command, what you will find is that a new temporary table is created (in the original location!), the symlink is destroyed, and the temporary table is renamed.  Your "optimization" is lost.
  2. Striping (with RAID) is usually a far better optimization.  Striping a table across multiple disks effectively balances the  'heavy hit' access across many more disks.  With 1 disk/table you are …
[Read more]
Using LVM snapshot filesystems for development database instances

The Problem

Developers often need to have a development database copy of the live production system you are using in able to allow them to test their code and to test new functionality and make schema changes to the database for this new functionality to work.

That’s normal and happens everywhere. A typical DBA task is to make a copy of the live system, sometimes to remove any confidential or sensitive information which perhaps the development database users should not be able to see, and then give them access to this development instance. The developers then “hack away”, changing their code and perhaps things in the database until they are ready to put these new changes into production when they then come along and discuss how to apply these changes into the live systems.

Once the development database has been created it soon becomes stale so often the developers want a new up to date copy …

[Read more]
Easy Python: display LVM details in XML

If you need to work with LVM in your scripts but haven’t found a good method to access details about Logical Volume Groups, here’s a simple Python script that will print the details about any volumes on your system. This could be useful for writing a partition check script for your MySQL data directory (if you’re not using a standard monitoring system like Nagios).

import sys
import os
import commands
import subprocess
import select

def lvm():
    print ""
    LVM_PATH = "/sbin"
    LVM_BIN = os.path.join(LVM_PATH, 'lvm')
    argv = list()
    argv.append(LVM_BIN)
    argv.append("lvs")
    argv.append("--nosuffix")
    argv.append("--noheadings")
    argv.append("--units")
    argv.append("b")
    argv.append("--separator")
    argv.append(";")
    argv.append("-o")
    argv.append("lv_name,vg_name,lv_size")

    process = subprocess.Popen(argv, stdout=subprocess.PIPE)
    output = ""
    out = process.stdout.readline()
    output += out
    lines = …
[Read more]
mylvmbackup 0.13 has been released

I am happy to announce that mylvmbackup version 0.13 has now been released. This release includes a fix for a nasty bug in on of the recently added Perl hooks (precleanup.pm) and some added functionality (better support for remote rsync backups).

From the ChangeLog: 

  • Deleted sample precleanup.pm hook as it has potential to cause harm and is too specialized on a particular use case (BUG#394668)
  • Added support for rsync via SSH (BUG#392462)
  • Fixed InnoDB recovery in case a relative path to the MySQL data directory is defined (BUG#38337), improved the documentation of relpath in the man page.

 

Setting up LVM on Suse Linux

You can do all sorts of magic with LVM, like backing up MySQL using file system snapshots, but in order to do so you need to set it first. When installing a new computer with Suse Linux I found that this was harder than expected, unless you know what to do. Needless to say, I didn't, but some friends gave me a hand on IRC, and now I do. :-)

So I wrote a little article about this which you can find here, in an effort to save others some time. The article is about setting up LVM with Suse Yast, but you can probably use it for other flavors of Linux, too.

Setting up LVM on Suse Linux

You can do all sorts of magic with LVM, like backing up MySQL using file system snapshots, but in order to do so you need to set it first. When installing a new computer with Suse Linux I found that this was harder than expected, unless you know what to do. Needless to say, I didn't, but some friends gave me a hand on IRC, and now I do. :-)

So I wrote a little article about this which you can find here, in an effort to save others some time. The article is about setting up LVM with Suse Yast, but you can probably use it for other flavors of Linux, too.

mylvmbackup-0.12 has been released

After a long hiatus, I am happy to announce that mylvmbackup version 0.12 has now been released. This release includes a large number of improvements, minor code cleanups, as well as some new functionality. In particular, I would like to thank Matthew Boehm, Tim Stoop, Baron Schwartz, Ville Skyttä and Ronald Bradford for their contributions.

Some notable highlights from the ChangeLog:

  • Removed the absolute path names to external tools (make sure $PATH is correct)
  • Added --log-err to the startup options of the recovery instance to avoid cluttering the server's error log
  • Added support for hooks written as Perl Modules. (Matthew Boehm)
  • Added support for date/time-formatted path names for backupdir and mountdir (Matthew Boehm)
  • Backupdir and …
[Read more]
My upcoming talks and events

My calendar for the upcoming months is already filling up with conferences, trade fairs and other events at which I'll speak about MySQL. Here's a quick overview:

  • This coming Thursday at 15:00 CET, I'll be speaking about "Backing up MySQL using file system snapshots" at the MySQL University. The session will be hosted live using DimDim, which is a great online conferencing and presentation system (Flash required). Attendance is free, so come and join me if you want to learn more about this backup technique!
  • On Friday, 6th of March at 15:15 I'll give a presentation about "MySQL Backup and Security" in the …
[Read more]
MySQL University: Backing up MySQL using file system snapshots

This Thursday (February 26th, 14:00 UTC), Lenz Grimmer will give a MySQL University session on Backing up MySQL using file system snapshots. Lenz is a member of the MySQL Community team and the maintainer of the mylvmbackup tool. mylvmbackup is a tool for quickly creating backups of a MySQL server's data files. To perform a backup, mylvmbackup obtains a read lock on all tables and flushes all server caches to disk, creates a snapshot of the volume containing the MySQL data directory, and unlocks the tables again. The snapshot process takes only a small amount of time. When it is done, the server can continue normal operations, while the actual file backup proceeds.

For MySQL University sessions, point …

[Read more]
mylvmbackup-0.11 has been released

Some days ago, I released version 0.11 of mylvmbackup a Perl script that performs consistent backups of a MySQL server by using LVM filesystem snapshots. The source archive as well as a generic RPM can be found on the project home page, packages for many Linux distributions are available on the openSUSE Build service.

This release includes some new functionality as well as numerous bug fixes and improvements, most notably:

  • Added support for using rsnap as a backup backend (Matt Lohier)
  • The documentation is now maintained in POD style instead of asciidoc (Matthew Boehm)
  • Support using non-GNU tar and …
[Read more]
Showing entries 11 to 20 of 39
« 10 Newer Entries | 10 Older Entries »