Re: [zfs-discuss] Adding mirrors to an existing zfs-pool]

2011-07-28 Thread Bob Friesenhahn

On Thu, 28 Jul 2011, David Dyer-Bennet wrote:

I'm still impressed by the ability to attach and detach arbitrary numbers
of disks to mirrors.  It makes upgrading mirrored disks very very safe,


Zfs mirrors are super-cool.  They are really flexible and recover 
quickly.


Bob
--
Bob Friesenhahn
bfrie...@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,http://www.GraphicsMagick.org/
___
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss


Re: [zfs-discuss] Adding mirrors to an existing zfs-pool]

2011-07-28 Thread David Dyer-Bennet

On Tue, July 26, 2011 09:55, Cindy Swearingen wrote:
>
> Subject: Re: [zfs-discuss] Adding mirrors to an existing zfs-pool
> Date: Tue, 26 Jul 2011 08:54:38 -0600
> From: Cindy Swearingen 
> To: Bernd W. Hennig 
> References: <342994905.11311662049567.JavaMail.Twebapp@sf-app1>
>
> Hi Bernd,
>
> If you are talking about attaching 4 new disks to a non redundant pool
> with 4 disks, and then you want to detach the previous disks then yes,
> this is possible and a good way to migrate to new disks.
>
> The new disks must be the equivalent size or larger than the original
> disks.
>
> See the hypothetical example below.
>
> If you mean something else, then please provide your zpool status
> output.
>
> Thanks,
>
> Cindy
>
>
> # zpool status tank
>   pool: tank
>   state: ONLINE
>   scan: resilvered 1018K in 0h0m with 0 errors on Fri Jul 22 15:54:52 2011
> config:
>
>  NAMESTATE READ WRITE CKSUM
>  tankONLINE   0 0 0
>  c4t1d0  ONLINE   0 0 0
>  c4t2d0  ONLINE   0 0 0
>  c4t3d0  ONLINE   0 0 0
>  c4t4d0  ONLINE   0 0 0
>
>
> # zpool attach tank c4t1d0 c6t1d0
> # zpool attach tank c4t2d0 c6t2d0
> # zpool attach tank c4t3d0 c6t3d0
> # zpool attach tank c4t4d0 c6t4d0
>
> The above syntax will create 4 mirrored pairs of disks.

I was somewhat surprised when I first learned of this.  In my head, I now
remember it as "a single disk in ZFS seems to be treated as a one-disk
mirror".  Previously, in my head, single disks were very different objects
from mirrors!

I'm still impressed by the ability to attach and detach arbitrary numbers
of disks to mirrors.  It makes upgrading mirrored disks very very safe,
since I can perform the entire procedure without ever reducing redundancy
below my starting point (using the classic attach new, resilver, detach
old sequence, repeated for however many disks were in the original
mirror).

-- 
David Dyer-Bennet, d...@dd-b.net; http://dd-b.net/
Snapshots: http://dd-b.net/dd-b/SnapshotAlbum/data/
Photos: http://dd-b.net/photography/gallery/
Dragaera: http://dragaera.info

___
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss


Re: [zfs-discuss] Adding mirrors to an existing zfs-pool

2011-07-26 Thread Fajar A. Nugraha
On Tue, Jul 26, 2011 at 1:33 PM, Bernd W. Hennig
 wrote:
> G'Day,
>
> - zfs pool with 4 disks (from Clariion A)
> - must migrate to Clariion B (so I created 4 disks with the same size,
>  avaiable for the zfs)
>
> The zfs pool has no mirrors, my idea was to add the new 4 disks from
> the Clariion B to the 4 disks which are still in the pool - and later
> remove the original 4 disks.
>
> I only found in all example how to create a new pool with mirrors
> but no example how to add to a pool without mirrors a mirror disk
> for each "disk" in the pool.
>
> - is it possible to add disks to each disk in the pool (they have different
>  sizes, so I have exact add the correct disks form Clariion B to the
>  original disk from Clariion B)

from "man zpool"

   zpool attach [-f] pool device new_device

   Attaches new_device to an existing zpool device. The
existing device cannot be part of a raidz configuration. If device is
not currently  part
   of  a  mirrored  configuration, device automatically
transforms into a two-way mirror of device and new_device. If device
is part of a two-way
   mirror, attaching new_device creates a three-way mirror,
and so on. In either case, new_device begins to resilver immediately.

   -fForces use of new_device, even if its appears to be
in use. Not all devices can be overridden in this manner.

> - can I later "remove" the disks from the Clariion A, pool is intact, user
>  can work with the pool

   zpool detach pool device

   Detaches device from a mirror. The operation is refused if
there are no other valid replicas of the data.



If you're using raidz, you can't use zpool attach. Your best bet in
this case is zpool replace.

   zpool replace [-f] pool old_device [new_device]

   Replaces old_device with new_device. This is equivalent to
attaching new_device, waiting for it to resilver, and then detaching
old_device.

   The size of new_device must be greater than or equal to the
minimum size of all the devices in a mirror or raidz configuration.

   new_device  is  required  if the pool is not redundant. If
new_device is not specified, it defaults to old_device. This form of
replacement is
   useful after an existing disk has failed and has been
physically replaced. In this case, the new disk may have the same /dev
path as  the  old
   device, even though it is actually a different disk. ZFS
recognizes this.

   -fForces use of new_device, even if its appears to be
in use. Not all devices can be overridden in this manner.


-- 
Fajar
___
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss


Re: [zfs-discuss] Adding mirrors to an existing zfs-pool

2011-07-26 Thread hung-sheng tsao
Hi
It is better just ceate new ool in array 8
Then use cpio ro copy the data

On 7/26/11, Bernd W. Hennig  wrote:
> G'Day,
>
> - zfs pool with 4 disks (from Clariion A)
> - must migrate to Clariion B (so I created 4 disks with the same size,
>   avaiable for the zfs)
>
> The zfs pool has no mirrors, my idea was to add the new 4 disks from
> the Clariion B to the 4 disks which are still in the pool - and later
> remove the original 4 disks.
>
> I only found in all example how to create a new pool with mirrors
> but no example how to add to a pool without mirrors a mirror disk
> for each "disk" in the pool.
>
> - is it possible to add disks to each disk in the pool (they have different
>   sizes, so I have exact add the correct disks form Clariion B to the
>   original disk from Clariion B)
> - can I later "remove" the disks from the Clariion A, pool is intact, user
>   can work with the pool
>
>
> ??
>
> Sorry for the beginner questions
>
> Tnx for help
> --
> This message posted from opensolaris.org
> ___
> zfs-discuss mailing list
> zfs-discuss@opensolaris.org
> http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
>

-- 
Sent from my mobile device

Hung-Sheng Tsao, Ph.D. 
laot...@gmail.com
http://laotsao.wordpress.com
cell:9734950840
gvoice:8623970640
___
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss


Re: [zfs-discuss] Adding mirrors to an existing zfs-pool]

2011-07-26 Thread Cindy Swearingen


Subject: Re: [zfs-discuss] Adding mirrors to an existing zfs-pool
Date: Tue, 26 Jul 2011 08:54:38 -0600
From: Cindy Swearingen 
To: Bernd W. Hennig 
References: <342994905.11311662049567.JavaMail.Twebapp@sf-app1>

Hi Bernd,

If you are talking about attaching 4 new disks to a non redundant pool
with 4 disks, and then you want to detach the previous disks then yes,
this is possible and a good way to migrate to new disks.

The new disks must be the equivalent size or larger than the original
disks.

See the hypothetical example below.

If you mean something else, then please provide your zpool status
output.

Thanks,

Cindy


# zpool status tank
 pool: tank
 state: ONLINE
 scan: resilvered 1018K in 0h0m with 0 errors on Fri Jul 22 15:54:52 2011
config:

NAMESTATE READ WRITE CKSUM
tankONLINE   0 0 0
c4t1d0  ONLINE   0 0 0
c4t2d0  ONLINE   0 0 0
c4t3d0  ONLINE   0 0 0
c4t4d0  ONLINE   0 0 0


# zpool attach tank c4t1d0 c6t1d0
# zpool attach tank c4t2d0 c6t2d0
# zpool attach tank c4t3d0 c6t3d0
# zpool attach tank c4t4d0 c6t4d0

The above syntax will create 4 mirrored pairs of disks.

Attach each new disk, wait for it to resilver, attach the next disk,
resilver, and so on. I would scrub the pool after resilvering is
complete, and check fmdump to ensure all new devices are operational.

When all the disks are replaced and the pool is operational, detach
the original disks.

# zpool detach tank c4t1d0
# zpool detach tank c4t2d0
# zpool detach tank c4t3d0
# zpool detach tank c4t4d0


On 07/26/11 00:33, Bernd W. Hennig wrote:

G'Day,

- zfs pool with 4 disks (from Clariion A)
- must migrate to Clariion B (so I created 4 disks with the same size,
  avaiable for the zfs)

The zfs pool has no mirrors, my idea was to add the new 4 disks from
the Clariion B to the 4 disks which are still in the pool - and later
remove the original 4 disks.

I only found in all example how to create a new pool with mirrors
but no example how to add to a pool without mirrors a mirror disk
for each "disk" in the pool.

- is it possible to add disks to each disk in the pool (they have different
  sizes, so I have exact add the correct disks form Clariion B to the 
  original disk from Clariion B)

- can I later "remove" the disks from the Clariion A, pool is intact, user
  can work with the pool 



??

Sorry for the beginner questions

Tnx for help


___
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss


Re: [zfs-discuss] Adding mirrors to an existing zfs-pool

2011-07-26 Thread Andrew Gabriel

Bernd W. Hennig wrote:

G'Day,

- zfs pool with 4 disks (from Clariion A)
- must migrate to Clariion B (so I created 4 disks with the same size,
  avaiable for the zfs)

The zfs pool has no mirrors, my idea was to add the new 4 disks from
the Clariion B to the 4 disks which are still in the pool - and later
remove the original 4 disks.

I only found in all example how to create a new pool with mirrors
but no example how to add to a pool without mirrors a mirror disk
for each "disk" in the pool.

- is it possible to add disks to each disk in the pool (they have different
  sizes, so I have exact add the correct disks form Clariion B to the 
  original disk from Clariion B)

- can I later "remove" the disks from the Clariion A, pool is intact, user
  can work with the pool
  


Depends on a few things...

What OS are you running, and what release/update or build?

What's the RAID layout of your pool "zpool status"?

--
Andrew Gabriel
___
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss


[zfs-discuss] Adding mirrors to an existing zfs-pool

2011-07-26 Thread Bernd W. Hennig
G'Day,

- zfs pool with 4 disks (from Clariion A)
- must migrate to Clariion B (so I created 4 disks with the same size,
  avaiable for the zfs)

The zfs pool has no mirrors, my idea was to add the new 4 disks from
the Clariion B to the 4 disks which are still in the pool - and later
remove the original 4 disks.

I only found in all example how to create a new pool with mirrors
but no example how to add to a pool without mirrors a mirror disk
for each "disk" in the pool.

- is it possible to add disks to each disk in the pool (they have different
  sizes, so I have exact add the correct disks form Clariion B to the 
  original disk from Clariion B)
- can I later "remove" the disks from the Clariion A, pool is intact, user
  can work with the pool 


??

Sorry for the beginner questions

Tnx for help
-- 
This message posted from opensolaris.org
___
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss