linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Dominique Quatravaux <dom@idealx.com>
To: linux-lvm@redhat.com
Cc: pierre.machard@idealx.com, Benoit Picaud <benoit@idealx.com>,
	'Mathias BROSSARD' <mbrossard@idealx.com>
Subject: [linux-lvm] [BUG] Spaces in LVM1 LV names => *deep trouble* when converting to LVM2
Date: Wed, 10 May 2006 22:26:14 +0200	[thread overview]
Message-ID: <44624C66.4050600@idealx.com> (raw)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi, I encountered a very serious bug with LVM today. I'm using
lvm2-2.01.04-5 from Debian stable, kernel 2.6.17-rc3

# lvm version
  LVM version:     2.01.04 (2005-02-09)
  Library version: 1.01.00-ioctl (2005-01-17)
  Driver version:  4.6.0

What I did:

    * created a LV in an LVM1 VG using EVMS (yeah, I know) with a
      space in the name (yeah, yeah, I know, I know :-));
    * converted the VG to LVM2 using vgconvert;
    * as a result the space in the LVM1 metadata was converted over
      into a space in LVM2 textual metadata, which causes a nice
      "Parse error line 123" for every subsequent LVM command on that
      VG, including "vgcfgrestore"...

Of course I did that on the root VG of my work laptop (Backups? What
backups?) and ended up in the aforementioned pickle. I tried some dd
stunts to overwrite the space with a dash, having discovered the
correct offset and block size with strace() (which for the record were
respectively one block and 2560 bytes, YMMV) - But bummer, some
wiseguy put a CRC32 checksum in there! :-) I had to recompile a custom
version of lvm that passes NULL as the checksum_fn parameter to
text_vg_import_fd (again for the record, that's a trivial one-line
patch in function _vg_read_raw_area, in format-text.c around line 286).

The situation definitely needs some fixing. My humble suggestions:

    * vgconvert should surface-test the LVM1 metadata as strictly as
      the command-line "lvcreate" tool does on its arguments;
    * there should be a mechanism for dealing with corrupt LVM
      metadata, at the minimum a global command-line switch to
      temporarily disable checksum verifications.

Now investigating backup software *real seriously* :-) Thanks for your
work on the Linux LVM suite,

- --
Dominique QUATRAVAUX                           Ing�nieur senior
01 44 42 00 08                                 IDEALX

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFEYkxmMJAKAU3mjcsRApAFAJ4tCEJ0pK1bIBWruaq5VDu2izf75gCeKQCC
zzsNGFC6lPaRBvpRy2am/TM=
=ad0C
-----END PGP SIGNATURE-----

             reply	other threads:[~2006-05-10 20:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-10 20:26 Dominique Quatravaux [this message]
2006-05-10 20:36 ` [linux-lvm] [BUG] Spaces in LVM1 LV names => *deep trouble* when converting to LVM2 Alasdair G Kergon
2006-05-10 20:40   ` Alasdair G Kergon
2006-05-11  7:55     ` Dominique Quatravaux
2006-05-10 21:20   ` [Evms-devel] " Kevin Corry

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44624C66.4050600@idealx.com \
    --to=dom@idealx.com \
    --cc=benoit@idealx.com \
    --cc=linux-lvm@redhat.com \
    --cc=mbrossard@idealx.com \
    --cc=pierre.machard@idealx.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).