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

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

 



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

_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

[Index of Archives]     [Gluster Users]     [Kernel Development]     [Linux Clusters]     [Device Mapper]     [Security]     [Bugtraq]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]

  Powered by Linux