linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: malahal@us.ibm.com
To: linux-lvm@redhat.com
Subject: Re: [linux-lvm] Question on duplicating equally-sized HDs with dd and changing VG name and PV UUIDs
Date: Mon, 10 Sep 2007 10:17:09 -0700	[thread overview]
Message-ID: <20070910171709.GA5117@us.ibm.com> (raw)
In-Reply-To: <20070910085921.GC22296@heitec.net>

I don't think so. /dev/sdb will have the same partition table as
/dev/sda from the sfdisk command.  I bet you need to run pvcreate and
vgcreate before running the rest of the script.

Thanks, Malahal.

Holger Rauch [holger.rauch@heitec.de] wrote:
> Hi Lars (and all the other list members),
> 
> first of all, thanks for this nice little script (and I see nothing wrong
> with that :-))) ), but it assumes that VG backupvg and the underlying VG
> has already been created, right? I see no pvcreate and vgcreate invocations
> in there. Is this on purpose, i.e. is that already done just by duplicating
> the partition table using sfdisk?
> 
> Thanks in advance for clarifying things.
> 
> Kind regards,
> 
> 	Holger
> 
> On Fri, 07 Sep 2007, Lars Ellenberg wrote:
> 
> > [...]
> > what is wrong with
> >  sfdisk -d /dev/sda | sfdisk /dev/sdb
> >  lvs -o attr,name,size --noheadings rootvg |
> >  while read a n s; do
> >  	[[ $a == -* ]] || continue;
> > 	lvcreate -L $s -n $n backupvg ;
> > 	# dd bs=1M if=/dev/rootvg/$n of=/dev/backupvg/$n
> >  done
> > ?
> > [...]

  reply	other threads:[~2007-09-10 17:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-07 12:13 [linux-lvm] Question on duplicating equally-sized HDs with dd and changing VG name and PV UUIDs Holger Rauch
2007-09-07 17:53 ` Lars Ellenberg
2007-09-10  8:59   ` Holger Rauch
2007-09-10 17:17     ` malahal [this message]
2007-09-11 10:00       ` Holger Rauch
2007-09-11 10:12         ` Holger Rauch
2007-09-12  0:21           ` LVM UUID generation (was Re: [linux-lvm] Question on duplicating equally-sized HDs with dd and changing VG name and PV UUIDs) Daniel Tuijnman
2007-09-17 21:19           ` [linux-lvm] Question on duplicating equally-sized HDs with dd and changing VG name and PV UUIDs Alasdair G Kergon
2007-09-19 16:04             ` Holger Rauch

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=20070910171709.GA5117@us.ibm.com \
    --to=malahal@us.ibm.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).