linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Lars Ellenberg <linux-lvm@linbit.com>
To: linux-lvm@redhat.com
Subject: Re: [linux-lvm] moving logical volumes to another system *remotely* -	how?
Date: Fri, 23 Feb 2007 18:32:20 +0100	[thread overview]
Message-ID: <20070223173220.GD9124@soda.linbit> (raw)
In-Reply-To: <45DF0F5B.6000506@wpkg.org>

/ 2007-02-23 16:59:23 +0100
\ Tomasz Chmielewski:
> paddy@panici.net schrieb:
> >On Fri, Feb 23, 2007 at 12:48:07PM +0100, Tomasz Chmielewski wrote:
> >>I have a server which stores several LVM-2 logical volumes.
> >>
> >>As this system is pretty loaded, I'd like to move some of the logical
> >>volumes to another machine. It has to be done remotely, so I can't do it
> >>as described in the LVM HOWTO (where one basically adds/replaces disks in one machine).
> >>
> >>My common sense tells me that I should:
> >>
> >>1. Unmount/not use the logical volumes on the source server
> >>2. Make volumes of the same size on the target server
> >>3. Copy it somehow over network
> >>
> >>
> >>I'm not sure of 2 (make volumes of exactly the same size) 
> >check your PE size, otherwise does what it says on the tin.
> 
> Hmm, how? I just want to move some (not all) logical volumes.
> 
> I guess fdisk is a good idea?
> 
> # fdisk -l /dev/LVM2/ocsi1
> 
> Disk /dev/LVM2/ocsi1: 3221 MB, 3221225472 bytes
> 
> 
> 3221225472 / 1024 = 3145728
> 
> 
> lvcreate -L3145728k -n ocsi1 LVM2
> 
> Hmm, hopefully, it's the right size?


how about:
lvs --units k

> >>and 3 (how to copy it all over network, if possible, using SSH only).
> >netcat and dd over forwarded port
> 
> Thanks for the idea.

dd if=/dev/$vg/$lv bs=32M |
	buffer -S 10m -s 512k |
	gzip -1 |
ssh -T $target -- \
	"gunzip |
	buffer -s 512k |
	dd bs=32M of=/dev/$t_vg/$t_lv"

-- 
: Lars Ellenberg                            Tel +43-1-8178292-55 :
: LINBIT Information Technologies GmbH      Fax +43-1-8178292-82 :
: Vivenotgasse 48, A-1120 Vienna/Europe    http://www.linbit.com :

  reply	other threads:[~2007-02-23 17:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-23 11:48 [linux-lvm] moving logical volumes to another system *remotely* - how? Tomasz Chmielewski
2007-02-23 12:44 ` paddy
2007-02-23 15:59   ` Tomasz Chmielewski
2007-02-23 17:32     ` Lars Ellenberg [this message]
2007-02-23 21:27       ` [linux-lvm] workaround for RHEL4 + LVM2 inactive snapshot kernel panic Rob Ostrander
2007-03-02 11:42       ` [linux-lvm] moving logical volumes to another system *remotely* - how? Tomasz Chmielewski
2007-03-02 11:58         ` Bryn M. Reeves

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=20070223173220.GD9124@soda.linbit \
    --to=linux-lvm@linbit.com \
    --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).