[linux-lvm] Question on duplicating equally-sized HDs with dd and changing VG name and PV UUIDs

Holger Rauch holger.rauch at heitec.de
Mon Sep 10 08:59:21 UTC 2007


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
> ?
> [...]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/linux-lvm/attachments/20070910/dd2f2503/attachment.sig>


More information about the linux-lvm mailing list