From owner-freebsd-fs@FreeBSD.ORG Sat Feb 25 13:31:02 2012 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AED63106564A for ; Sat, 25 Feb 2012 13:31:02 +0000 (UTC) (envelope-from peter.maloney@brockmann-consult.de) Received: from mo-p05-ob6.rzone.de (mo-p05-ob6.rzone.de [IPv6:2a01:238:20a:202:53f5::1]) by mx1.freebsd.org (Postfix) with ESMTP id EB6C98FC0A for ; Sat, 25 Feb 2012 13:31:01 +0000 (UTC) X-RZG-AUTH: :LWIKdA2leu0bPbLmhzXgqn0MTG6qiKEwQRWfNxSw4HzYIwjsnvdDt2oX8drk23mufkcHTOex6w== X-RZG-CLASS-ID: mo05 Received: from [192.168.179.39] (hmbg-5f766895.pool.mediaWays.net [95.118.104.149]) by smtp.strato.de (klopstock mo30) (RZmta 27.7 DYNA|AUTH) with (DHE-RSA-AES128-SHA encrypted) ESMTPA id n00a43o1PBfvkc for ; Sat, 25 Feb 2012 14:30:56 +0100 (MET) Message-ID: <4F48E28F.9090600@brockmann-consult.de> Date: Sat, 25 Feb 2012 14:30:55 +0100 From: Peter Maloney User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 MIME-Version: 1.0 To: freebsd-fs@freebsd.org References: <3E3E4094-77E2-490B-9574-5B95ECDED447@pean.org> <4F48A402.70009@brockmann-consult.de> In-Reply-To: <4F48A402.70009@brockmann-consult.de> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Re: glabel, gpart and zfs confusion. X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Feb 2012 13:31:02 -0000 And btw. related but not an answer to your question... >From the thread you mentioned:/ />/ # zpool attach tank label/m00-d00 label/m00-d01 />/ cannot use '/dev/label/m00-d01': must be a GEOM provider or regular file />/ />/ # glabel label m00-d01 /dev/da2s3 />/ glabel: Can't store metadata on /dev/da2s3: Invalid argument. />/ />/ # sysctl kern.geom.debugflags=17 />/ kern.geom.debugflags: 0 -> 17 />/ />/ # dd if=/dev/zero of=/dev/da2s3 />/ dd: /dev/da2s3: Invalid argument / My guess is that if you exported the pool, the "Invalid argument" errors would go away. / / Am 25.02.2012 10:04, schrieb Peter Maloney: > In Solaris, I've read that the IO system is designed such that a some > commands (eg. flush of a partition) does not necessarily flush the > disk's write cache... like the command can't move up the chain. So if > you put zfs on a partition, you can get data loss (eg. transaction > rollback required and probably no corruption). > > In FreeBSD, things are different I am told, without the above > limitation. So you can happily put zfs on partitions, and the zfs code > can keep your data safe. I haven't had data loss with system panics > during sync writes with my ZIL on a partition, so I guess this must be true. > > People say that glabel is buggy/a hack. But I haven't had any problems > myself. So they suggest using gpt to label your disks. I find that > sometimes your gpt labels get eaten though, and you end up with gptid in > your zpool status output. For labels to get eaten, you need to import > the pool elsewhere with -f usually. And maybe this only applies to the > root pool in most cases (but I definitely had one other case when it > happened to a different pool). There is something you can add to > /boot/loader.conf to get rid of the gptids... but I am hesitant to use > it... because what happens when you have 2 identical labels and gptid is > gone? > > eg. > > NAME STATE READ > WRITE CKSUM > zroot DEGRADED > 0 0 0 > mirror-0 DEGRADED > 0 0 0 > gptid/bcc6c93a-f332-11e0-a5b6-0025900edbca OFFLINE > 0 0 0 > gptid/4629fb4b-f596-11e0-a5b6-0025900edbca OFFLINE > 0 0 0 > gpt/root2 ONLINE > 0 0 0 > gpt/root3 ONLINE > 0 0 0 > > And also if a whole disk goes bad, and you try to replace it with > another whole disk that is 1 byte smaller, it won't allow you to do > that. So if you use gpart and create a slightly smaller partition, you > get the advantage of being able to replace disks with smaller ones later. > > For new systems, I am using gpt labels. And if the gptid thing appears, > I just ignore it. > > > Am 25.02.2012 09:42, schrieb Peter Ankerstål: >> Hi, >> >> Now Im really confused. >> >> I want in some way label my drives so the setup is independent of physical setup. But Jason doesn't >> seem to like glabel at all. :D >> http://lists.freebsd.org/pipermail/freebsd-fs/2012-January/013574.html >> >> And then he says that you should use gpart instead >> http://lists.freebsd.org/pipermail/freebsd-fs/2012-January/013578.html >> >> But this seems to be in conflict with the common knowledge that zfs should >> be used on whole disks, not partitions! >> >> Any pointers? >> _______________________________________________ >> freebsd-fs@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-fs >> To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org" > _______________________________________________ > freebsd-fs@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-fs > To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org"