>>>>> "t" == Tim  <t...@tcsac.net> writes:

     t> couldn't you simply do a detach before removing the disk, and
     t> do a re-attach everytime you wanted to re-mirror?

no, for two reasons.  First, when you detach a disk, ZFS writes
something to the disk that makes it unrecoverable.  The simple-UI
wallpaper blocks your access to the detached disk, so you have no
redundancy while detached.  In this thread is a workaround to disable
the checks (AIUI they're explaining a more fundamental problem with a
multi-vdev pool because you can't detach one-mirror-half of each vdev
at exactly the same instant, but multi-vdev is not part of Niall's
case):

 http://opensolaris.org/jive/thread.jspa?threadID=58780

second, when you attach rather than online/clear/notice-its-back, ZFS
will treat the newly-attached disk as empty and will resilver
everything, not just your changes.  It's the difference between taking
5 minutes and taking all night.  and you don't have redundancy until
the resilver finishes.

Another interesting question is:

  (1) unplug the home USB disk

  (2) write to the internal laptop disk

  (3) retach the USB disk and start resilvering (the quick-resilver,
      not the newly-attached resilver)

      (a) laptop disk goes bad.  maybe a bunch of UNC's are uncovered
          during the resliver.  This is pretty plausible.

          Plausible how?  maybe you've been running without making
          backup for weeks, and then your machine started acting goofy
          so you said ``shit!  i haven't backed up!  i better do it
          now if I still can.''  you just plugged in because the
          laptop disk was _starting_ to go bad, and then it did.

      (b) system freezes and has to be hard-reset during the resilver

      (c) maybe after reboot you try again.  eventually you give up on
          the laptop disk and decide to lose your last month of
          changes.  you just want your data back as of the last
          backup, and a working machine.

  (4) what's the status of the home USB disk after these
      partial-resilvers?  `no valid replicas', or it works?  My
      impression is, at least sometimes or even usually, it will work.
      Is it guaranteed to always work, though?

Ordinary manual backups DO tolerate this scenario: if your machine
breaks while writing this week's incremental, you can still restore by
reading last week's incremental.

I remember AVS/ii had a brittle but planned scheme for this scenario,
too:

 * First, there is always a resilver source and target---for better or
   worse, it's not an ambiguous merging operation like ZFS.  

 * Second, before starting the resilver, you take an ii (device-level
   snapshot) of the resilver target.  The resilver is done UNsafely,
   but if it stops mid-way, you can roll back to the pre-resilver
   snapshot and get back the working home/target disk you had in (1).

SVM and Linux-LVM2 and most RAID-like mirrors do NOT handle this
scenario gracefully.

Attachment: pgp8aF1fodWqv.pgp
Description: PGP signature

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

Reply via email to