From owner-freebsd-questions@FreeBSD.ORG  Tue Mar  4 08:58:31 2014
Return-Path: <owner-freebsd-questions@FreeBSD.ORG>
Delivered-To: freebsd-questions@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
 (No client certificate requested)
 by hub.freebsd.org (Postfix) with ESMTPS id A6624AC5
 for <freebsd-questions@freebsd.org>; Tue,  4 Mar 2014 08:58:31 +0000 (UTC)
Received: from blue.qeng-ho.org (blue.qeng-ho.org [217.155.128.241])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by mx1.freebsd.org (Postfix) with ESMTPS id 24B625F8
 for <freebsd-questions@freebsd.org>; Tue,  4 Mar 2014 08:58:30 +0000 (UTC)
Received: from fileserver.home.qeng-ho.org (localhost [127.0.0.1])
 by fileserver.home.qeng-ho.org (8.14.7/8.14.5) with ESMTP id s248wMbV097765;
 Tue, 4 Mar 2014 08:58:22 GMT (envelope-from freebsd@qeng-ho.org)
Message-ID: <531595AE.9060402@qeng-ho.org>
Date: Tue, 04 Mar 2014 08:58:22 +0000
From: Arthur Chance <freebsd@qeng-ho.org>
User-Agent: Mozilla/5.0 (X11; FreeBSD amd64;
 rv:24.0) Gecko/20100101 Thunderbird/24.3.0
MIME-Version: 1.0
To: Chris Stankevitz <chrisstankevitz@gmail.com>,
 freebsd-questions <freebsd-questions@freebsd.org>
Subject: Re: ZFS, GPTIDs, and using the whole disk
References: <CAPi0psuD5zDBuBZmE3tBKDeFdMcpvBn3pU4waDu6FU8SaTs0-Q@mail.gmail.com>
In-Reply-To: <CAPi0psuD5zDBuBZmE3tBKDeFdMcpvBn3pU4waDu6FU8SaTs0-Q@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-BeenThere: freebsd-questions@freebsd.org
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: User questions <freebsd-questions.freebsd.org>
List-Unsubscribe: <http://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: <http://lists.freebsd.org/mailman/listinfo/freebsd-questions>, 
 <mailto:freebsd-questions-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 04 Mar 2014 08:58:31 -0000

On 03/03/2014 23:47, Chris Stankevitz wrote:
> Please identify any false statements:
>
> 1. ZFS prefers to use the entire disk.
>
> 2. The only way to refer to an entire disk is by the device name e.g. /dev/da4
>
> 3. Device names like /dev/da4 are not persistently connected to actual
> SATA ports on your motherboard/expander.  For example, if you start
> hot swapping disks, even if you put them back in the same slot, their
> device names might change.  Even if you don't hot swap, the device
> name for a particular disk might change for other reasons (e.g. if you
> have a USB drive plugged in during boot).

It's possible to permanently fix drive number assignments to particular 
physical interfaces via /boot/device.hints - see the man page for 
details. For instance, because of the motherboard I use the default 
naming of my disks would have the system disk on ada3 and my not usually 
occupied eSATA devices would be ada[01], and I prefer my system disk to 
be disk 0 so my device.hints contains

# bring sense to the disks now we're on ahci.
# We also renumber the SCSI buses so the ICH9 controller
# handles scbus0-5 and the JMicron controller handles
# scbus[67].
#
hint.scbus.0.at="ahcich2"
hint.scbus.1.at="ahcich3"
hint.scbus.2.at="ahcich4"
hint.scbus.3.at="ahcich5"
hint.scbus.4.at="ahcich6"
hint.scbus.5.at="ahcich7"
hint.scbus.6.at="ahcich0"
hint.scbus.7.at="ahcich1"
#
# This makes the system disk ada0, the ZFS raidz
# ada[123], the 2 eSATA ports ada[56]
#
hint.ada.0.at="scbus0"
hint.ada.1.at="scbus1"
hint.ada.2.at="scbus2"
hint.ada.3.at="scbus3"
hint.ada.4.at="scbus4"
# The cd is on the last ICH9 port
hint.cd.0.at="scbus5"
# eSata devices
hint.ada.5.at="scbus6"
hint.ada.6.at="scbus7"


> 4. Because of (3) it is dangerous to use device names when building a zpool
>
> 5. GPTIDs are persistently attached to physical drives.
>
> 5a. This is because the GPTID is written on the disk when you create the GPTID.
>
> 6. A GPTID does not refer to an entire disk.
>
> 6a. A GPTID refers to a partition
>
> 7. You can create a zpool of GPTIDs
>
> 8. A zpool created from GPTIDs will not be using the entire disk.
>
> 9. You cannot simultaneously allow ZFS access to the entire disk while
> keeping persistent names/labels.
>
> Thank you,