[OpenIndiana-discuss] Replacing both disks in a mirror

Jim Klimov jimklimov at cos.ru
Wed Oct 10 08:17:27 UTC 2012


2012-10-10 10:32, DavidHalko wrote:
> I tried (unsuccessfully to use zfs send & receive between a 1.5tb zfs mirror on an ultra60 and a 2tb zfs mirror on a v240 over gigabit Ethernet. Never could get it to work. The man pages were insufficient under Solaris 10u8 for me to figure it out.

I am not sure why that is. Was that all a single 1.5Tb dataset?
Possibly, there are some problems in that release of ZFS regarding
caching and stuff, or there were intermittent networking hiccups
that might cause the stream to fail. Sorry I can't guess well ;)

> I built a 4 way mirror by adding 2 drives to a 2 way mirror, exported the set, yanked 2 drives, imported, and called it a day. Less filling, worked great!

Yes, that seems like a way. So in essence you have several disks
(groups of disks) that equally consider themselves as parts of a
mirror with other components missing (no "detach", "offline" and
other commands on your behalf)? So after import on a new machine
you just do a little cleanup so they don't expect other disks
anymore?

Just be careful not to stick them into one machine again, who
knows what ZFS might come up with when it sees two devices with
same GUIDs?..

>
>>> In terms of keeping backup in a table, sending some incremental
>>> snapshots should be safer than letting a mirror resync its
>>> possible new errors (like those Martin had) completely.
>>> With snapshots on a separate pool you can rollback easier than
>>> on an identical clone of the same corrupted pool.
>
> Is there a good reference on how to do this somewhere?
>
> Need to do it on some SPARC's... Intel boxes are scarce where I am - they don't run the software I need. :-( Sol10u8 is it, until OI-SPARC is out.

I did install zfs auto-snapshot package from OpenSolaris SXCE
releases onto Solaris 10u8, both SPARC and x86; IIRC verbatim,
and things just worked as advertised (i.e. on the author's blog
which I'm afraid is downed in Oracle's infrastructure now).
See also 
http://constantin.glez.de/blog/2010/03/opensolaris-home-server-scripting-howto-part-one-intro-and-simple-zfs-auto-snapshot-ena

The source seems to be available around here (I just installed
from SXCE media):
http://src.opensolaris.org/source/xref/jds/zfs-snapshot/

Note that this is the first implemented variant of the service
which was scripted, later remade as time-sliderd I think.
It already had the "backup-save-cmd" SMF property that can
be used to send new snapshots to remote pools.

[root at t2k1 ~]# pkginfo -l SUNWzfs-auto-snapshot
    PKGINST:  SUNWzfs-auto-snapshot
       NAME:  ZFS automatic snapshot service
   CATEGORY:  GNOME2,application,JDS4
       ARCH:  sparc
    VERSION:  0.11.3,REV=110.0.4.2009.11.23.14.58
    BASEDIR:  /
     VENDOR:  Sun Microsystems, Inc.
       DESC:  ZFS automatic snapshot service
     PSTAMP:  astro20091123065806
   INSTDATE:  May 31 2010 02:43
    HOTLINE:  Please contact your local service provider
     STATUS:  completely installed
      FILES:       15 installed pathnames
                   11 shared pathnames
                   10 directories
                    2 executables
                  105 blocks used (approx)

[root at t2k1 ~]# uname -a
SunOS t2k1 5.10 Generic_141444-09 sun4v sparc SUNW,Sun-Fire-T200

[root at t2k1 ~]# cat /etc/release
                       Solaris 10 10/09 s10s_u8wos_08a SPARC
            Copyright 2009 Sun Microsystems, Inc.  All Rights Reserved.
                         Use is subject to license terms.
                            Assembled 16 September 2009

[root at t2k1 ~]# svcprop daily | egrep '^zfs/'
zfs/avoidscrub boolean false
zfs/backup astring none
zfs/backup-lock astring unlocked
zfs/backup-save-cmd astring not\ set
zfs/fs-name astring //
zfs/interval astring days
zfs/keep astring 31
zfs/label astring daily
zfs/offset astring 0
zfs/period astring 1
zfs/snapshot-children boolean true
zfs/verbose boolean false



More information about the OpenIndiana-discuss mailing list