Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Apr 2017 17:04:41 +0200 (CEST)
From:      =?ISO-8859-1?Q?Trond_Endrest=F8l?= <Trond.Endrestol@fagskolen.gjovik.no>
To:        Paul Macdonald <paul@ifdnrg.com>
Cc:        FreeBSD Mailing List <freebsd-questions@freebsd.org>
Subject:   Re: A seperate ZFS question
Message-ID:  <alpine.BSF.2.20.1704281654200.10691@mail.fig.ol.no>
In-Reply-To: <CANJ8om5Y6Q9hFVny12TyjJvMJ6La%2BNekEfKvH%2Bj4Za5Z8nhdiw@mail.gmail.com>
References:  <adb1b78d-2e03-d561-dac2-7c5da9a53a1c@ifdnrg.com> <alpine.BSF.2.20.1704281532300.10691@mail.fig.ol.no> <CANJ8om5Y6Q9hFVny12TyjJvMJ6La%2BNekEfKvH%2Bj4Za5Z8nhdiw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 28 Apr 2017 10:28-0400, Ultima wrote:

> -n is your friend. Never used zpool add without it to verify changes are as
> you intend. Not using it first is similar to jumping off a plane without
> verifying your parachute is on properly.

Not to mention using -v.

Also, the OP can use:

   zfs snap -r zrootnew@transfer

   zfs send -RLev zrootnew@transfer | {ssh,nc,something-something}
or
   zfs send -RLev zrootnew@transfer > /some/file/somewhere

for creating a replicated stream preserving both data and metadata.

Use these commands for restoring the missing data:

   {ssh,nc,something-something} | zfs recv -Fduv newpool
or
   zfs recv -Fduv newpool < /some/file/somewhere

If all drives are connected to the same system, the replication can be 
simplified to:

zfs send -RLev zrootnew@transfer | zfs recv -Fduv newpool

Remember to remove the recursive @transfer snapshot afterwards.

To preview what will happen:

zfs destroy -nRv newpool@transfer

To go ahead and make the plunge:

zfs destroy -Rv newpool@transfer


Why are we top posting all of a sudden?

> On Fri, Apr 28, 2017 at 9:52 AM, Trond Endrestøl <
> Trond.Endrestol@fagskolen.gjovik.no> wrote:
> 
> > On Fri, 28 Apr 2017 14:14+0100, Paul Macdonald wrote:
> >
> > >
> > > I fat fingered adding a cache drive and was unable to remove the SSD
> > cache
> > > drive (ada2)
> > >
> > > I added a 2nd SSD (ada3) for safety as i didn;t want to risk the pool at
> > all
> > > and exporting wasn;t feasible in timescale.
> > >
> > > Can someone explain :
> > >
> > >             what i've actually managed to set up here (!),
> > >
> > >             the ramifications of forceably offlining/removing ada2
> > >
> > >             and if i should worry when ada2 gets full?
> > >
> > >                  capacity     operations    bandwidth
> > > pool          alloc   free   read  write   read  write
> > > ------------  -----  -----  -----  -----  -----  -----
> > > zrootnew       692G   460G     15    174   351K  2.40M
> > >   mirror       683G   237G     14    138   328K  1.43M
> > >     gpt/zfs0      -      -      6     50   155K  1.44M
> > >     ada1p3        -      -      7     50   176K  1.44M
> > >   ada2        9.17G   223G      0     36  22.9K   989K
> > > cache             -      -      -      -      -      -
> > >   ada3        39.0G   194G     23      5   168K   264K
> >
> > First, you have gpt/zfs0 and ada1p3 in a mirrored configuration. Next,
> > you have ada2 striped (RAID 0) to the first pair of mirrors. This is a
> > very weird "RAID 1 + 0" combo. Guess what will happen when you lose
> > ada2!
> >
> > Maybe you should describe what you wanted to happen in the first
> > place.
> >
> > If you really wanted a three-way mirror, you have just learned the
> > hard way about the difference between zpool add and zpool attach.
> >
> > The latter is for adding additional members to existing mirrors, while
> > the former is for adding raidz{1,2,3} groups to a pool, and the add
> > command got you into this mess.
> >
> > "zpool attach zrootnew ada1p3 ada2" is the right command if you wanted
> > to create a three-way mirror in the first place.
> >
> > I suggest you make good backups of this pool, destroy it, recreate it
> > properly, and restore the missing data.

-- 
+-------------------------------+------------------------------------+
| Vennlig hilsen,               | Best regards,                      |
| Trond Endrestøl,              | Trond Endrestøl,                   |
| IT-ansvarlig,                 | System administrator,              |
| Fagskolen Innlandet,          | Gjøvik Technical College, Norway,  |
| tlf. mob.   952 62 567,       | Cellular...: +47 952 62 567,       |
| sentralbord 61 14 54 00.      | Switchboard: +47 61 14 54 00.      |
+-------------------------------+------------------------------------+
From owner-freebsd-questions@freebsd.org  Fri Apr 28 15:08:46 2017
Return-Path: <owner-freebsd-questions@freebsd.org>
Delivered-To: freebsd-questions@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id A36CAD54450
 for <freebsd-questions@mailman.ysv.freebsd.org>;
 Fri, 28 Apr 2017 15:08:46 +0000 (UTC)
 (envelope-from steve@sohara.org)
Received: from smtp3.irishbroadband.ie (smtp4.irishbroadband.ie [62.231.32.6])
 (using TLSv1 with cipher AES256-SHA (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 6FB331EAC
 for <freebsd-questions@freebsd.org>; Fri, 28 Apr 2017 15:08:45 +0000 (UTC)
 (envelope-from steve@sohara.org)
Received: from [89.127.62.20] (helo=smtp.lan.sohara.org)
 by smtp3.irishbroadband.ie with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
 (Exim 4.76) (envelope-from <steve@sohara.org>) id 1d47Ej-0001yC-W5
 for freebsd-questions@freebsd.org; Fri, 28 Apr 2017 15:51:10 +0100
Received: from [192.168.63.1] (helo=steve.lan.sohara.org)
 by smtp.lan.sohara.org with smtp (Exim 4.89 (FreeBSD))
 (envelope-from <steve@sohara.org>) id 1d47Fj-000KEj-60
 for freebsd-questions@freebsd.org; Fri, 28 Apr 2017 14:52:11 +0000
Date: Fri, 28 Apr 2017 15:51:05 +0100
From: Steve O'Hara-Smith <steve@sohara.org>
To: freebsd-questions@freebsd.org
Subject: Re: A seperate ZFS question
Message-Id: <20170428155105.563a2ee5192bb8a08f76ca9d@sohara.org>
In-Reply-To: <alpine.BSF.2.20.1704281532300.10691@mail.fig.ol.no>
References: <adb1b78d-2e03-d561-dac2-7c5da9a53a1c@ifdnrg.com>
 <alpine.BSF.2.20.1704281532300.10691@mail.fig.ol.no>
X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.29; amd64-portbld-freebsd10.3)
X-Clacks-Overhead: "GNU Terry Pratchett"
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: freebsd-questions@freebsd.org
X-Mailman-Version: 2.1.23
Precedence: list
List-Id: User questions <freebsd-questions.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/freebsd-questions>, 
 <mailto:freebsd-questions-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-questions/>;
List-Post: <mailto:freebsd-questions@freebsd.org>
List-Help: <mailto:freebsd-questions-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/freebsd-questions>, 
 <mailto:freebsd-questions-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Fri, 28 Apr 2017 15:08:46 -0000

On Fri, 28 Apr 2017 15:52:59 +0200 (CEST)
Trond Endrestøl <Trond.Endrestol@fagskolen.gjovik.no> wrote:

> On Fri, 28 Apr 2017 14:14+0100, Paul Macdonald wrote:
> 
> > 
> > I fat fingered adding a cache drive and was unable to remove the SSD
> > cache drive (ada2)
> First, you have gpt/zfs0 and ada1p3 in a mirrored configuration. Next, 
> you have ada2 striped (RAID 0) to the first pair of mirrors. This is a 
> very weird "RAID 1 + 0" combo. Guess what will happen when you lose 
> ada2!
> 
> Maybe you should describe what you wanted to happen in the first 
> place.

	He did, ada2 is supposed to be a cache drive, now it's a stripe.

> I suggest you make good backups of this pool, destroy it, recreate it 
> properly, and restore the missing data.

	Agreed, you can't undo adding a stripe.

-- 
Steve O'Hara-Smith <steve@sohara.org>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.20.1704281654200.10691>