[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

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



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
> ?
> [...]

Attachment: signature.asc
Description: Digital signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]