I am sponsoring the following fast-track for Mark Musante.  It
introduces a new zpool sub-command enabling splitting a mirrored zpool
into separate pools.  The case requests micro/patch binding. Timeout
is 10/31/2009.

Template Version: @(#)sac_nextcase 1.68 02/23/09 SMI
This information is Copyright 2009 Sun Microsystems
1. Introduction
    1.1. Project/Component Working Name:
         zpool split
    1.2. Name of Document Author/Supplier:
         Author:  Mark Musante
    1.3  Date of This Document:
        24 September, 2009
4. Technical Description

OVERVIEW:

Some practices in data centers are built around the use of a volume 
manager's ability to clone data.  An administrator will attach a set of 
disks to mirror an existing configuration, wait for the resilver to 
complete, and then physically detach and remove those disks to a new
location.

Currently in zfs, the only way to achieve this is by using zpool offline 
to disable a set of disks, zpool detach to permanently remove them after 
they've been offlined, move the disks over to a new host, zpool 
force-import of the moved disks, and then zpool detach the disks that were 
left behind.

This is cumbersome and prone to error, and even then the new pool
cannot be imported on the same host as the original.

PROPOSED SOLUTION:

Introduce a "zpool split" command.  This will allow an administrator to 
extract one disk from each mirrored top-level vdev and use them to create
a new pool with an exact copy of the data.  The new pool can then be
imported on any machine that supports that pool's version.

PROPOSED CHANGES TO zpool(1M) MANPAGE:

--- zpool.orig  Tue Sep  8 12:34:40 2009
+++ zpool.update        Thu Sep 10 19:14:18 2009
@@ -89,6 +89,9 @@
      zpool set property=value pool
 
 
+     zpool split [-R altroot] [-n] [-o mntopts] [-o property=value] pool
+          newpool [device ...]
+
      zpool status [-xv]        [pool] ...
 
 
@@ -1347,6 +1350,41 @@
         "Properties"  section  for more information on what pro-
         perties can be set and acceptable values.
 
+ 
+     zpool split [-R altroot] [-n] [-o mntopts] [-o property=value] pool
+          newpool [device ...]
+ 
+        Splits off one disk from each mirrored top-level vdev in
+        a pool and creates a new pool from the split-off disks.
+        The original pool must be made up of one or more mirrors
+        and must not be in the process of resilvering.  The split
+        command will choose the last device in each mirror vdev unless
+        overridden by a device specification on the command line.
+ 
+        -R altroot   Automatically import the newly created pool after
+                     splitting, using the specified altroot parameter
+                     for the new pool's alternate root.  See the altroot
+                     description in the Properties section of this
+                     manpage.
+ 
+        -n    Displays the  configuration that would be created
+              without actually splitting the pool.  The actual
+              pool split could still fail due to insufficient
+              privileges or device status.
+ 
+        -o mntopts           Comma-separated list of mount
+                             options to use when mounting
+                             datasets within the pool.   See
+                             zfs(1M) for a description of
+                             dataset properties and mount
+                             options.  Only valid in conjunction
+                             with the -R option.
+ 
+        -o property=value    Sets the specified property on the
+                             new pool. See the "Properties"
+                             section for more information on the
+                             available pool properties.
+ 
 
      zpool status [-xv]        [pool] ...
 

6. Resources and Schedule
    6.4. Steering Committee requested information
        6.4.1. Consolidation C-team Name:
                ON
    6.5. ARC review type: FastTrack
    6.6. ARC Exposure: open

Reply via email to