From owner-freebsd-geom@FreeBSD.ORG Tue Nov 11 13:24:50 2008 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 00C28106568E for ; Tue, 11 Nov 2008 13:24:50 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 1FFEE8FC0C for ; Tue, 11 Nov 2008 13:24:48 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id PAA28569 for ; Tue, 11 Nov 2008 15:24:47 +0200 (EET) (envelope-from avg@icyb.net.ua) Message-ID: <4919879E.5080900@icyb.net.ua> Date: Tue, 11 Nov 2008 15:24:46 +0200 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.17 (X11/20081106) MIME-Version: 1.0 To: freebsd-geom@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: "unused" partition: disklabel vs. gpart X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Nov 2008 13:24:50 -0000 It seems that there is a difference in how disklabel-based code and part code handle partitions with type "unused". As I understand disklabel sees a difference between partitions that do not exist (i.e. lines are not there in disklabel output) and partitions marked unused. geom_bsd code doesn't create devices for the former and does create for the latter. On the other hand geom_part_bsd code seems to treat "unused" as non-existent and doesn't create device for them and doesn't display them in gpart show output. E.g. I had a label with a single partition 'd' with type unused. I actually put ZFS pool into this partition, but marked it 'unused', so that some smart scripts on certain live cds do not try to mount or swappon the partitions. This worked OK with geom_bsd, but geom_part_bsd considered the slice entirely empty, it didn't find the 'd' partition in it. -- Andriy Gapon