linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: "Dieter Stüken" <stueken@conterra.de>
To: LVM general discussion and development <linux-lvm@redhat.com>
Subject: Re: [linux-lvm] Copying LVM from one system to another
Date: Tue, 11 Jul 2006 21:12:38 +0200	[thread overview]
Message-ID: <44B3F826.7010100@conterra.de> (raw)
In-Reply-To: <32F72C4D4D0EC8458CA5BFD76A6D6C680ACF3C0B@gimli.xb.local>

Shaun Mccullagh wrote:
> Thanks very much, but the problem is I want be able to restore my LVM filesystems from a backup. 
> This is why I came with the idea of booting the PC I want to restore from a USB stick. 
> The idea is the stick has a copy of the backup client. The LVM filesystems are mounted under 
> /restore and I restore all the data to /restore.
> 
> How do I tell LVM the data has moved? I've experimented using this method but I noticed devmapper 
> complains when I boot the PC from the newly restored data.

Do you have any concrete error message, which give a hint about what goes wrong?

If you mount a file system, the mount command first looks into /etc/fstab to find
the device to mount. So you may configure your mount points by editing /etc/fstab.

This is very different with LVM! There is no such configuration that determines your
LVM layout. Instead all data describing the layout of your LVM is saved on the LVM
disk(s) them self! When LVM starts up, it scans all disks to find for LVM informations.
If all this configurations are consistent (if you have several LVM disk), the VGs and
LVs are registered by name, regardless on which device they are found. 
LVM then writes a protocol of all it found to /etc/lvm/backup. 
Changing the configuration is not as easy as editing some config file, 
as there is no such thing! Instead it is not necessary at all.

In your case, I would suggest to create an independent volume group on the other
disk with a different VG-name. The LVs may have the same names on both VGs.
If you put them into different hosts, you may synchronize/backup them via network.
Else you may put both VGs into the same hosts without problems, mounting the LVs manually
and copy the data directly.

Don't worry about any config-files to save. You may connect any LVM disk to any IDE
port and it should be recognized automatically.

If you move an VG from one host to an other, you should do an "vgexport" first.
I don't know if this is still necessary with LVM2. I accidentally moved VGs back
and forth even without using lvexport and did not found a problem.

Dieter.

  reply	other threads:[~2006-07-11 19:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-10 14:01 [linux-lvm] Copying LVM from one system to another Shaun Mccullagh
2006-07-10 17:18 ` Ming Zhang
2006-07-11 17:48   ` Dieter Stüken
2006-07-11 18:03     ` Shaun Mccullagh
2006-07-11 19:12       ` Dieter Stüken [this message]
2006-07-11 19:50         ` Shaun Mccullagh
2006-07-11 18:10     ` Ming Zhang

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=44B3F826.7010100@conterra.de \
    --to=stueken@conterra.de \
    --cc=linux-lvm@redhat.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).