Hello Kory,

Tuesday, January 15, 2008, 1:46:40 PM, you wrote:

KW> What would be the commands for the three way mirror or an example
KW> of what your describing. I thought the 200gb would have to be the
KW> same size to attach to the existing mirror and you would have to
KW> attach two LUN disks vs one LUN.  Once it attaches it
KW> automatically reslivers or syncs the disk then if I wanted to I
KW> could remove the two 73 GB disks or still keep them in the pool
KW> and expand the pool later if I want?
KW>  
KW>  

No, if you are attaching another disk to mirror it doesn't have to be
the same size - it can be bigger, however you won't be able to see all
the space from the disk as long as it forms N-way mirror with smaller
devices.

And yes, if you add (attach) another disk to a mirror it will
automatically resilver, and you can keep previous two disks - you will
get 3-way mirror (you can create N-way mirror in general).
Once you happy new disk is working properly you just remove (detach)
two old disk and your pool automatically grows.

Keep in mind that the reverse is not possible (yet).
Below example showing your case.


# mkfile 512m disk1
# mkfile 512m disk2
# mkfile 1024m disk3

# zpool create test mirror /root/disk1 /root/disk2
# zpool status
  pool: test
 state: ONLINE
 scrub: none requested
config:

        NAME             STATE     READ WRITE CKSUM
        test             ONLINE       0     0     0
          mirror         ONLINE       0     0     0
            /root/disk1  ONLINE       0     0     0
            /root/disk2  ONLINE       0     0     0


# cp -rp /lib/ /test/
# zpool list
NAME                    SIZE    USED   AVAIL    CAP  HEALTH     ALTROOT
test                    504M   83.2M    421M    16%  ONLINE     -
#

# zpool attach test /root/disk2 /root/disk3

# zpool status
  pool: test
 state: ONLINE
status: One or more devices is currently being resilvered.  The pool will
        continue to function, possibly in a degraded state.
action: Wait for the resilver to complete.
 scrub: resilver in progress, 69.59% done, 0h0m to go
config:

        NAME             STATE     READ WRITE CKSUM
        test             ONLINE       0     0     0
          mirror         ONLINE       0     0     0
            /root/disk1  ONLINE       0     0     0
            /root/disk2  ONLINE       0     0     0
            /root/disk3  ONLINE       0     0     0

errors: No known data errors
#

Waiting for a re-silvering to complete.

# zpool status
  pool: test
 state: ONLINE
 scrub: resilver completed with 0 errors on Tue Jan 15 14:41:13 2008
config:

        NAME             STATE     READ WRITE CKSUM
        test             ONLINE       0     0     0
          mirror         ONLINE       0     0     0
            /root/disk1  ONLINE       0     0     0
            /root/disk2  ONLINE       0     0     0
            /root/disk3  ONLINE       0     0     0

errors: No known data errors
#
# zpool list
NAME                    SIZE    USED   AVAIL    CAP  HEALTH     ALTROOT
test                    504M   83.3M    421M    16%  ONLINE     -
#

# zpool detach test /root/disk1
# zpool detach test /root/disk2

# zpool status
  pool: test
 state: ONLINE
 scrub: resilver completed with 0 errors on Tue Jan 15 14:41:13 2008
config:

        NAME           STATE     READ WRITE CKSUM
        test           ONLINE       0     0     0
          /root/disk3  ONLINE       0     0     0

errors: No known data errors
#

# zpool list
NAME                    SIZE    USED   AVAIL    CAP  HEALTH     ALTROOT
test                   1016M   83.2M    933M     8%  ONLINE     -
#


so we've migrated data from a 2-way mirror to a just one disk, live
without unmounting file systems, etc. If your 3rd disk is already
protected if you follow above procedure you will have a protected
configuration all the time (however at the end you relay on disk3
built-in redundancy).





-- 
Best regards,
 Robert Milkowski                           mailto:[EMAIL PROTECTED]
                                       http://milek.blogspot.com

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

Reply via email to