[zfs-discuss] Re: [osol-discuss] Cloning a disk w/ ZFS in it

2006-10-30 Thread Asif Iqbal

On 10/20/06, Darren J Moffat [EMAIL PROTECTED] wrote:

Asif Iqbal wrote:
 On 10/20/06, Darren J Moffat [EMAIL PROTECTED] 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.

 Will it catch the ZFS fs part? For some reason I thought dd is not aware
 of ZFS

dd isn't ware of ZFS that is correct, but then dd isn't ware of UFS or
VxFS or anything else either.  You are accessing the raw vtoc slices
below what ZFS cares about.

So yes it will include the ZFS pool.



After the dd I swapped it with the original disk and I can login fine.
But the zpool is complaining

SUNW-MSG-ID: ZFS-8000-CS, TYPE: Fault, VER: 1, SEVERITY: Major
EVENT-TIME: Mon Oct 30 12:11:44 MST 2006
PLATFORM: Sun Fire(TM) X2100  , CSN: 0634FU1003, HOSTNAME: host.domain.net
SOURCE: zfs-diagnosis, REV: 1.0
EVENT-ID: 09bfd531-5ba3-ef5c-d35c-e85b379d46c7
DESC: A ZFS pool failed to open.  Refer to
http://sun.com/msg/ZFS-8000-CS for more information.
AUTO-RESPONSE: No automated response will occur.
IMPACT: The pool data is unavailable
REC-ACTION: Run 'zpool status -x' and either attach the missing device or
   restore from backup.

Login incorrect
host.domain.net console login: root
Password:
Last login: Mon Oct 30 11:04:04 on console
Sun Microsystems Inc.   SunOS 5.10  Generic January 2005
# bash
bash-3.00# zpool status -x
pool: udns
state: FAULTED
status: One or more devices could not be opened.  There are insufficient
   replicas for the pool to continue functioning.
action: Attach the missing device and online it using 'zpool online'.
  see: http://www.sun.com/msg/ZFS-8000-D3
scrub: none requested
config:

   NAMESTATE READ WRITE CKSUM
   udnsUNAVAIL  0 0 0  insufficient replicas
 c1d0s7UNAVAIL  0 0 0  cannot open




--
Darren J Moffat




--
Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
___
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

2006-10-22 Thread Krzys
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

2006-10-22 Thread Jonathan Edwards
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


[zfs-discuss] Re: [osol-discuss] Cloning a disk w/ ZFS in it

2006-10-20 Thread Darren J Moffat

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.


--
Darren J Moffat
___
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

2006-10-20 Thread Richard Elling - PAE

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


[zfs-discuss] Re: [osol-discuss] Cloning a disk w/ ZFS in it

2006-10-20 Thread Victor Latushkin

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.

Victor





___
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

2006-10-20 Thread Torrey McMahon

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

2006-10-20 Thread Richard Elling - PAE

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