From owner-freebsd-rc@freebsd.org  Wed Sep 23 16:06:16 2015
Return-Path: <owner-freebsd-rc@freebsd.org>
Delivered-To: freebsd-rc@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 5626AA075B4;
 Wed, 23 Sep 2015 16:06:16 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140])
 by mx1.freebsd.org (Postfix) with ESMTP id 3C8CE1B83;
 Wed, 23 Sep 2015 16:06:14 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua
 [212.40.38.100])
 by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id TAA25307;
 Wed, 23 Sep 2015 19:06:13 +0300 (EEST)
 (envelope-from avg@FreeBSD.org)
Received: from localhost ([127.0.0.1])
 by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD))
 id 1ZemYf-000BqE-17; Wed, 23 Sep 2015 19:06:13 +0300
Subject: Re: dumpdev in loader.conf vs rc.d/dumpon
To: cem@FreeBSD.org
References: <5602B922.20703@FreeBSD.org>
 <CAG6CVpVvStV1pUi8WEBS0T5PaHxFk_HxGi8ch-LXU_DiheyTGw@mail.gmail.com>
Cc: FreeBSD Current <freebsd-current@FreeBSD.org>, freebsd-rc@FreeBSD.org
From: Andriy Gapon <avg@FreeBSD.org>
Message-ID: <5602CDBC.7080906@FreeBSD.org>
Date: Wed, 23 Sep 2015 19:05:16 +0300
User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101
 Thunderbird/38.2.0
MIME-Version: 1.0
In-Reply-To: <CAG6CVpVvStV1pUi8WEBS0T5PaHxFk_HxGi8ch-LXU_DiheyTGw@mail.gmail.com>
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
X-BeenThere: freebsd-rc@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: "Discussion related to /etc/rc.d design and implementation."
 <freebsd-rc.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/freebsd-rc>,
 <mailto:freebsd-rc-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-rc/>
List-Post: <mailto:freebsd-rc@freebsd.org>
List-Help: <mailto:freebsd-rc-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/freebsd-rc>,
 <mailto:freebsd-rc-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 23 Sep 2015 16:06:16 -0000

On 23/09/2015 18:59, Conrad Meyer wrote:
> On Wed, Sep 23, 2015 at 7:37 AM, Andriy Gapon <avg@freebsd.org> wrote:
>>
>> I have recently discovered 'dumpdev' kernel environment variable that is
>> settable, for example, from loader.conf.  To me it *seems* that this variable
>> has to be set to a device name / path without the leading '/dev'.
> 
> Why?

Because that's how I read the code in sys/geom/geom_dev.c.  Especially
init_dumpdev() - I believe that devtoname() returns a device name without '/dev/'.

>> If that's so,
>> then rc.d/dumpon must prepend '/dev' when passing the value of 'dumpdev' to
>> dumpon(8).
> 
> dumpon(8) opens the configured file (accessible in the normal
> namespace, i.e. "/dev/ada0s1b") and uses a magical ioctl on the device
> to configure it as the dump device.  This is all documented in
> dumpon(8).  Additionally, dumpon.c is short and quite legible.

Indeed.

> I don't see etc/rc.d/dumpon prepending /dev to anything.

Right, that's why I posted my message (bug report).

-- 
Andriy Gapon