Re: [zfs-discuss] Re: [osol-discuss] Cloning a disk w/ ZFS in it
yeah disks need to be identical but why do you need to do prtvtoc and fmthard to duplicate the disk label (before the dd), I thought that dd would take care of all of that... whenever I used dd I used it on slice 2 and I never had to do prtvtoc and fmthard... Juts make sure disks are identical and that is the key. Regards, Chris On Fri, 20 Oct 2006, Richard Elling - PAE wrote: minor adjustments below... Darren J Moffat wrote: Asif Iqbal wrote: Hi I have a X2100 with two 74G disks. I build the OS on the first disk with slice0 root 10G ufs, slice1 2.5G swap, slice6 25MB ufs and slice7 62G zfs. What is the fastest way to clone it to the second disk. I have to build 10 of those in 2 days. Once I build the disks I slam them to the other X2100s and ship it out. if clone really means make completely identical then do this: boot of cd or network. dd if=/dev/dsk/sourcedisk of=/dev/dsk/destdisk Where sourcedisk and destdisk are both localally attached. I use prtvtoc and fmthard to duplicate the disk label (before the dd) Note: the actual disk geometry may change between vendors or disk firmware revs. You will first need to verify that the geometries are similar, especially the total number of blocks. For dd, I'd use a larger block size than the default. Something like: dd bs=1024k if=/dev/dsk/sourcedisk of=/dev/dsk/destdisk The copy should go at media speed, approximately 50-70 MBytes/s for the X2100 disks. -- richard ___ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss !DSPAM:122,45390d6810494021468! ___ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
Re: [zfs-discuss] Re: [osol-discuss] Cloning a disk w/ ZFS in it
you don't really need to do the prtvtoc and fmthard with the old Sun labels if you start at cylinder 0 since you're doing a bit - bit copy with dd .. but, keep in mind: - The Sun VTOC is the first 512B and s2 *typically* should start at cylinder 0 (unless it's been redefined .. check!) - The EFI label though, reserves the first 17KB (34 blocks) and for a dd to work, you need to either: 1) dd without the slice (eg: dd if=/dev/rdsk/c0t0d0 of=/dev/rdsk/ c1t0d0 bs=128K) or 2) prtvtoc / fmthard (eg: prtvtoc /dev/rdsk/c0t0d0s0 /tmp/ vtoc.out ; fmthard -s /tmp/vtoc.out /dev/rdsk/c1t0d0s0) .je On Oct 22, 2006, at 12:45, Krzys wrote: yeah disks need to be identical but why do you need to do prtvtoc and fmthard to duplicate the disk label (before the dd), I thought that dd would take care of all of that... whenever I used dd I used it on slice 2 and I never had to do prtvtoc and fmthard... Juts make sure disks are identical and that is the key. Regards, Chris On Fri, 20 Oct 2006, Richard Elling - PAE wrote: minor adjustments below... Darren J Moffat wrote: Asif Iqbal wrote: Hi I have a X2100 with two 74G disks. I build the OS on the first disk with slice0 root 10G ufs, slice1 2.5G swap, slice6 25MB ufs and slice7 62G zfs. What is the fastest way to clone it to the second disk. I have to build 10 of those in 2 days. Once I build the disks I slam them to the other X2100s and ship it out. if clone really means make completely identical then do this: boot of cd or network. dd if=/dev/dsk/sourcedisk of=/dev/dsk/destdisk Where sourcedisk and destdisk are both localally attached. I use prtvtoc and fmthard to duplicate the disk label (before the dd) Note: the actual disk geometry may change between vendors or disk firmware revs. You will first need to verify that the geometries are similar, especially the total number of blocks. For dd, I'd use a larger block size than the default. Something like: dd bs=1024k if=/dev/dsk/sourcedisk of=/dev/dsk/destdisk The copy should go at media speed, approximately 50-70 MBytes/s for the X2100 disks. -- richard ___ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss !DSPAM:122,45390d6810494021468! ___ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss ___ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
Re: [zfs-discuss] Re: [osol-discuss] Cloning a disk w/ ZFS in it
minor adjustments below... Darren J Moffat wrote: Asif Iqbal wrote: Hi I have a X2100 with two 74G disks. I build the OS on the first disk with slice0 root 10G ufs, slice1 2.5G swap, slice6 25MB ufs and slice7 62G zfs. What is the fastest way to clone it to the second disk. I have to build 10 of those in 2 days. Once I build the disks I slam them to the other X2100s and ship it out. if clone really means make completely identical then do this: boot of cd or network. dd if=/dev/dsk/sourcedisk of=/dev/dsk/destdisk Where sourcedisk and destdisk are both localally attached. I use prtvtoc and fmthard to duplicate the disk label (before the dd) Note: the actual disk geometry may change between vendors or disk firmware revs. You will first need to verify that the geometries are similar, especially the total number of blocks. For dd, I'd use a larger block size than the default. Something like: dd bs=1024k if=/dev/dsk/sourcedisk of=/dev/dsk/destdisk The copy should go at media speed, approximately 50-70 MBytes/s for the X2100 disks. -- richard ___ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
Re: [zfs-discuss] Re: [osol-discuss] Cloning a disk w/ ZFS in it
Victor Latushkin wrote: Darren J Moffat wrote: Asif Iqbal wrote: Hi I have a X2100 with two 74G disks. I build the OS on the first disk with slice0 root 10G ufs, slice1 2.5G swap, slice6 25MB ufs and slice7 62G zfs. What is the fastest way to clone it to the second disk. I have to build 10 of those in 2 days. Once I build the disks I slam them to the other X2100s and ship it out. if clone really means make completely identical then do this: boot of cd or network. dd if=/dev/dsk/sourcedisk of=/dev/dsk/destdisk Where sourcedisk and destdisk are both localally attached. It seems that if you clone disks bit for bit you'll end up with the same hostid for all boxes and this may be confusing. Isn't this why insert name of deity made flash archives? Does ZFS work with flash? ___ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
Re: [zfs-discuss] Re: [osol-discuss] Cloning a disk w/ ZFS in it
Victor Latushkin wrote: It seems that if you clone disks bit for bit you'll end up with the same hostid for all boxes and this may be confusing. Geez, just spoof them to something different, if you must. -- richard ___ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss