LVM changes

4 views
Skip to first unread message

Andrew Garner

unread,
Jun 8, 2010, 3:48:16 PM6/8/10
to hollan...@googlegroups.com
I guess I should throw a note out about the recent lvm changes, as Tim
started testing a few of them.

I've pulled out the lvm library bits from the mysql-lvm plugin into a
generic lvm package, holland.lib.lvm. This was largely done to
separate out the test suite more easily and apply this to other LVM
based plugins (which might not necessarily deal with MySQL).
holland.lib.lvm comes with a test suite that builds a simple LVM
deployment on top of /dev/loopX and runs through various bits of the
library. That currently has about 93% code coverage (including branch
coverage) per python-coverage 3.3.1, and I expect more tests will be
added over time.

The mysql-lvm plugin itself has gotten a couple minor features:

- a new [mysqld] section can be specified to use a particular mysqld
binary for innodb recovery and tweak some of the memory settings for
the bootstrap mysqld process
- there's a provisional [tar] section that accepts exclude parameters
that get passed down to the GNU tar command. This defaults to
excluding mysql.sock (which is harmlessly skipped with a warning
previously), but in some cases excluding the binary logs or other
files from the datadir will be useful. There's probably several other
tar parameters that would be useful here as well.

There is also a clone of the mysql-lvm plugin called mysqldump-plugin
I wrote during a lazy Sunday about a week ago and merged in yesterday.
This is included in the holland-mysqllvm package and is almost
identical to mysql-lvm. Rather than performing a simple tar of the
data directory, we fire up a bootstrap mysqld process using the
snapshot as a datadir and hand off control to
holland.backup.mysqldump.

mysqldump-lvm accepts almost all the parameters of mysql-lvm (except
innodb-recovery and the tar settings) along with almost everything
that the existing mysqldump plugin accepts. The only feature of the
existing mysqldump plugin not really supported is bin-log-position -
the bootstrap mysqld disables the binary and relays logs to avoid any
conflicts with the "real" mysqld process, so mysqldump --master-data
will never work in the mysqldump-lvm plugin.

~Andy

Tim Soderstrom

unread,
Jun 8, 2010, 4:33:18 PM6/8/10
to hollan...@googlegroups.com
Hi Andy!

I assume these changes are unlikely to change moving forward (at least for a while)? If so, I can work on writing up the Wiki docs on this. Doing a video about LVM backups was on my todo list next so I can covert some of those then too if these are polished enough.

Changes look really good to me and, in fact, I like the idea of adding in things like [mysqld] sections. Could apply eventually to other providers as well.

> --
> WIKI: http://wiki.hollandbackup.org
> CODE: http://github.com/holland-backup
> UNSUBSCRIBE: holland-deve...@googlegroups.com
>

Andrew Garner

unread,
Jun 8, 2010, 4:52:14 PM6/8/10
to hollan...@googlegroups.com
On Tue, Jun 8, 2010 at 3:33 PM, Tim Soderstrom
<t...@moocowproductions.org> wrote:
> Hi Andy!
>
> I assume these changes are unlikely to change moving forward (at least for a while)? If so, I can work on writing up the Wiki docs on this. Doing a video about LVM backups was on my todo list next so I can covert some of those then too if these are polished enough.
>
> Changes look really good to me and, in fact, I like the idea of adding in things like [mysqld] sections. Could apply eventually to other providers as well.

I don't expect any major changes to the config format of either plugin
and I'm pretty happy with the basic architecture with mysql[dump]-lvm,
so no sweeping changes there. Previously there wasn't a way to
specify any of the mysqld values, or a specific value for the mysqld
binary (although you could tweak the global path in holland.conf), so
[mysqld] makes a lot of sense. I'm a little indecisive about the
addition of the [tar] section to mysql-lvm but I suspect additional
parameters will be added there over time to give further customization
over the tar process.

mysql-lvm should be 100% compatible with the old config format - I
only added a [mysqld]/[tar] section that all should have sane defaults
and shouldn't need to be specified. I would classify mysqldump-lvm as
"experimental", but mostly because it's not well-tested yet. I don't
think there will be any major change that would invalidate
documentation of the existing plugins - the most I see would be
allowing further tweaking in [mysqld].

~Andy

Reply all
Reply to author
Forward
0 new messages