From owner-freebsd-fs@FreeBSD.ORG Sun Oct 23 06:54:24 2011 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 326D11065670 for ; Sun, 23 Oct 2011 06:54:24 +0000 (UTC) (envelope-from haroldp@internal.org) Received: from pluto.internal.org (mail.internal.org [64.191.53.117]) by mx1.freebsd.org (Postfix) with ESMTP id E4F0D8FC0A for ; Sun, 23 Oct 2011 06:54:23 +0000 (UTC) Received: from [10.0.0.79] (99-46-24-87.lightspeed.renonv.sbcglobal.net [99.46.24.87]) by pluto.internal.org (Postfix) with ESMTPA id 99C89ECC0B for ; Sat, 22 Oct 2011 23:54:21 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1084) From: Harold Paulson In-Reply-To: <20111018005448.GA2855@icarus.home.lan> Date: Sat, 22 Oct 2011 23:54:20 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <4E2EF065-5C7D-4C5A-B1ED-89FC4BBBEEA1@internal.org> References: <4D8047A6-930E-4DE8-BA55-051890585BFE@internal.org> <20111018005448.GA2855@icarus.home.lan> To: freebsd-fs@freebsd.org X-Mailer: Apple Mail (2.1084) Subject: Re: Damaged directory on ZFS 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: Sun, 23 Oct 2011 06:54:24 -0000 Jeremy,=20 If I've taken a while to respond it was because there was a ton of great = information in your post and I've spent a lot of time testing stuff out. = =20 On Oct 17, 2011, at 5:54 PM, Jeremy Chadwick wrote: > On Mon, Oct 17, 2011 at 05:17:31PM -0700, Harold Paulson wrote: >> I've had a server that boots from ZFS panicking for a couple days. I = have worked around the problem for now, but I hope someone can give me = some insight into what's going on, and how I can solve it properly. =20 >>=20 >> The server is running 8.2-STABLE (zfs v28) with 8G of ram and 4 SATA = disks in a raid10 type arrangement: >>=20 >> # uname -a =20 >> FreeBSD jane.sierraweb.com 8.2-STABLE-201105 FreeBSD = 8.2-STABLE-201105 #0: Tue May 17 05:18:48 UTC 2011 = root@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64 >=20 > First thing to do is to consider upgrading to a newer RELENG_8 date. > There have been *many* ZFS fixes since May. I've done this, ran a scrub that completed without error, and still, = listing that directory panics the machine. =20 >> It started panicking under load a couple days ago. We replaced RAM = and motherboard, but problems persisted. I don't know if a hardware = issue originally caused the problem or what. When it panics, I get the = usual panic message, but I don't get a core file, and it never reboots = itself. =20 >>=20 >> http://pastebin.com/F1J2AjSF >=20 > ZFS developers will need to comment on the state of the backtrace. = You > may be requested to examine the core using kgdb and be given some > commands to run on it. Yeah, I made a real effort to get a core, but I just don't think it's = going to happen. It's an all-zfs system for starters. I actually = pulled a drive out of the array and reformatted it to try to get a core, = but it freezes on panic and never reboots after 15 seconds or any of = that. =20 >> While I was trying to figure out the source of the problem, I notice = stuck various stuck processes that peg a CPU and can't be killed, such = as: >>=20 >> PID JID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU = COMMAND >> 48735 0 root 1 46 0 11972K 924K CPU3 3 415:14 = 100.00% find >=20 > Had you done procstat -k -k 48735 (the "double -k" is not a typo), you > probably would have seen that the process was "stuck" in a ZFS-related > thread. These are processes which the kernel is hanging on to and = will > not let go of, so even kill -9 won't kill these. >=20 > It would have also be worthwhile to get the "process tree" of what > spawned the PID. (Solaris has ptree; I think we have something = similar > under FreeBSD but I forget what) The reason that matters is that it's > probably a periodic job that runs (there are many which use find), > traversing your ZFS filesystems, and tickling a bug/issue somewhere. > You even hint at this in your next paragraph, re: locate.updatedb. The processes are just ones that touch that poison directory (or some = file within it), "pop3d" or "find" from nightly periodic runs. pstree = is in ports and an old favorite of mine, and reports what I'd expect = from those. =20 procstat isn't any more interesting. Here was the one I managed to get: # procstat -k -k 44571 PID TID COMM TDNAME KSTACK = =20 44571 101006 find - = =20 >> I can move that directory out of the way, and carry on, but is there = anything I can do to really *repair* the problem? >=20 > I would recommend starting with "zpool scrub" on the pool which is > associated with the Maildir/ directory of the account you disable. I > will not be surprised if it comes back 100% clean. Yep, scrubs complete without error. > Given what the backtrace looks like, I would say the Maildir/ has a = ton > of files in it. Is that the case? Does "echo *" say something about > argument list too long? Nah, it's only like 12M of email (restored from a snap). Listing the = dir is an insta-panic. =20 > However, someone familiar with the ZFS internals, as I said, should > investigate the crash you're experiencing regardless. I'd still like to find a fix. I moved the dir to /var/blackhole and = excepted it from locate.updatedb and other periodic scans, so the system = isn't panicking, but it's a crummy situation. =20 - H From owner-freebsd-fs@FreeBSD.ORG Sun Oct 23 09:49:00 2011 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 5FAD0106567A for ; Sun, 23 Oct 2011 09:49:00 +0000 (UTC) (envelope-from coldwelljames11@googlemail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id E515A8FC26 for ; Sun, 23 Oct 2011 09:48:59 +0000 (UTC) Received: by bkbzu17 with SMTP id zu17so8828056bkb.13 for ; Sun, 23 Oct 2011 02:48:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=ehsQ3jjzpa9+VPzDcmI73JQlmr43k3sPDSW3+mnGrFE=; b=JyyWs3LxzLJRKF+8JEc8GUp3jfGQAViA25Ac6t/IxzIwLyyyAZ1jqQdwoARdjjoRQp j1qJge4hyDYP9hOx3/8roh1ep2WC3a0CBFwBw/LZAxTPBUUVLBZFWOiJDUjiITzD+KBx j/LvnfO7zR0iIDXZHku+A7dfnu6UfpxlnXhL8= MIME-Version: 1.0 Received: by 10.223.14.134 with SMTP id g6mr36239967faa.11.1319361989538; Sun, 23 Oct 2011 02:26:29 -0700 (PDT) Received: by 10.152.38.100 with HTTP; Sun, 23 Oct 2011 02:26:29 -0700 (PDT) Date: Sun, 23 Oct 2011 11:26:29 +0200 Message-ID: From: James Coldwell To: freebsd-fs@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Restore a ZFS mirror setup (GPT, ZFS-on-root) 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: Sun, 23 Oct 2011 09:49:00 -0000 Hello List, My Problem: My server wouldn't come back up after a reboot. It is a 8.2-RELEASE system, running a two-disk ZFS mirror setup. It is a dedicated box in a remote datacenter. I can boot up some linux-based rescue system. The way I installed FreeBSD on it was with mfsbsd, the zpool was created as such: =A0=A0=A0 set poolname=3D"z0" =A0=A0=A0 set dev1=3D"ad4" =A0=A0=A0 set dev2=3D"ad6" =A0=A0=A0 set swapsize=3D"4G" =A0=A0=A0 set zfssize=3D"300G" =A0=A0=A0 gpart delete -i 1 ${dev1} =A0=A0=A0 gpart delete -i 1 ${dev2} =A0=A0=A0 gpart destroy ${dev1} =A0=A0=A0 gpart destroy ${dev2} =A0=A0=A0 gpart create -s gpt ${dev1} =A0=A0=A0 gpart create -s gpt ${dev2} =A0=A0=A0 gpart add -b 34 -s 64k -t freebsd-boot ${dev1} =A0=A0=A0 gpart add -s ${swapsize} -t freebsd-swap -l swap0 ${dev1} =A0=A0=A0 gpart add -s ${zfssize} -t freebsd-zfs -l disk0 ${dev1} =A0=A0=A0 gpart add -b 34 -s 64k -t freebsd-boot ${dev2} =A0=A0=A0 gpart add -s ${swapsize} -t freebsd-swap -l swap1 ${dev2} =A0=A0=A0 gpart add -s ${zfssize} -t freebsd-zfs -l disk1 ${dev2} =A0=A0=A0 gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ${dev1} =A0=A0=A0 gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ${dev2} =A0=A0=A0 zpool create ${poolname} mirror /dev/gpt/disk0 /dev/gpt/disk1 That worked perfectly for half a year. Suddenly, it wouldn't come back up after a reboot. What I want to do now is mount the filesystem and check for misconfiguratio= n. So I once again booted into the linux-based rescue system, dd'd mfsbsd onto the first disk (/dev/sda), booted it up. This FreeBSD-based system is called "prealpha". That's where I am now: =A0=A0=A0 prealpha# gpart show =A0=A0=A0 =3D>=A0=A0=A0=A0=A0=A0=A0 0=A0 976773168=A0 ada0=A0 BSD=A0 (466G) =A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0=A0=A0 0=A0=A0=A0=A0=A0=A0=A0=A0 16=A0=A0=A0= =A0=A0=A0=A0 - free -=A0 (8.0K) =A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0=A0 16=A0=A0=A0=A0=A0 65520=A0=A0=A0=A0 1=A0= !0=A0 (32M) =A0=A0=A0 =A0=A0=A0=A0=A0 65536=A0 976707632=A0=A0=A0=A0=A0=A0=A0 - free -= =A0 (466G) =A0=A0=A0 =3D>=A0=A0=A0=A0=A0=A0 34=A0 976773101=A0 ada1=A0 GPT=A0 (466G) =A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0=A0 34=A0=A0=A0=A0=A0=A0=A0 128=A0=A0=A0=A0 = 1=A0 freebsd-boot=A0 (64K) =A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0 162=A0=A0=A0 8388608=A0=A0=A0=A0 2=A0 freeb= sd-swap=A0 (4.0G) =A0=A0=A0 =A0=A0=A0 8388770=A0 629145600=A0=A0=A0=A0 3=A0 freebsd-zfs=A0 (3= 00G) =A0=A0=A0 =A0 637534370=A0 339238765=A0=A0=A0=A0=A0=A0=A0 - free -=A0 (162G= ) =A0=A0=A0 prealpha# ls /dev/gpt/ =A0=A0=A0 disk1=A0=A0=A0 swap1 The devices changed name from ad4/ad6 to ada0/ada1 because mfsbsd loads the ahci module now. I want to mount the zpool from ada1, and view/edit some configuration files= . After that, I want to restore the mirror setup with ada0 and ada1 and try to boot again. How do I do that? Any help would be appreciated, I probably forgot to mention vital details, I am in a bit of a panic right now. Please tell me if you need for details. James From owner-freebsd-fs@FreeBSD.ORG Sun Oct 23 10:07:38 2011 Return-Path: Delivered-To: freebsd-fs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E6A0A1065675; Sun, 23 Oct 2011 10:07:38 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id BDA518FC08; Sun, 23 Oct 2011 10:07:38 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p9NA7cm2043299; Sun, 23 Oct 2011 10:07:38 GMT (envelope-from pjd@freefall.freebsd.org) Received: (from pjd@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p9NA7cnn043295; Sun, 23 Oct 2011 10:07:38 GMT (envelope-from pjd) Date: Sun, 23 Oct 2011 10:07:38 GMT Message-Id: <201110231007.p9NA7cnn043295@freefall.freebsd.org> To: aurelien@aurel32.net, pjd@FreeBSD.org, freebsd-fs@FreeBSD.org, pjd@FreeBSD.org From: pjd@FreeBSD.org Cc: Subject: Re: kern/150207: zpool(1): zpool import -d /dev tries to open weird devices 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: Sun, 23 Oct 2011 10:07:39 -0000 Synopsis: zpool(1): zpool import -d /dev tries to open weird devices State-Changed-From-To: open->closed State-Changed-By: pjd State-Changed-When: ndz 23 paź 2011 10:06:19 UTC State-Changed-Why: Thanks for the report. I tried to reproduce it on HEAD/9.0 and there is no such problem anymore. Responsible-Changed-From-To: freebsd-fs->pjd Responsible-Changed-By: pjd Responsible-Changed-When: ndz 23 paź 2011 10:06:19 UTC Responsible-Changed-Why: I'll take this one. http://www.freebsd.org/cgi/query-pr.cgi?pr=150207 From owner-freebsd-fs@FreeBSD.ORG Sun Oct 23 11:54:01 2011 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 53F6F106564A for ; Sun, 23 Oct 2011 11:54:01 +0000 (UTC) (envelope-from ml@my.gd) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id DE8E08FC0C for ; Sun, 23 Oct 2011 11:54:00 +0000 (UTC) Received: by wyi40 with SMTP id 40so6862369wyi.13 for ; Sun, 23 Oct 2011 04:53:59 -0700 (PDT) Received: by 10.216.9.216 with SMTP id 66mr1916992wet.7.1319370839613; Sun, 23 Oct 2011 04:53:59 -0700 (PDT) Received: from [10.101.174.142] ([92.90.16.50]) by mx.google.com with ESMTPS id e7sm32716170wbh.12.2011.10.23.04.53.57 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 23 Oct 2011 04:53:58 -0700 (PDT) References: In-Reply-To: Mime-Version: 1.0 (iPhone Mail 8J2) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Message-Id: X-Mailer: iPhone Mail (8J2) From: Damien Fleuriot Date: Sun, 23 Oct 2011 13:53:50 +0200 To: James Coldwell Cc: "freebsd-fs@freebsd.org" Subject: Re: Restore a ZFS mirror setup (GPT, ZFS-on-root) 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: Sun, 23 Oct 2011 11:54:01 -0000 On 23 Oct 2011, at 11:26, James Coldwell wr= ote: > Hello List, >=20 > My Problem: > My server wouldn't come back up after a reboot. > It is a 8.2-RELEASE system, running a two-disk ZFS mirror setup. > It is a dedicated box in a remote datacenter. > I can boot up some linux-based rescue system. >=20 > The way I installed FreeBSD on it was with mfsbsd, the zpool was > created as such: > set poolname=3D"z0" > set dev1=3D"ad4" > set dev2=3D"ad6" > set swapsize=3D"4G" > set zfssize=3D"300G" > gpart delete -i 1 ${dev1} > gpart delete -i 1 ${dev2} > gpart destroy ${dev1} > gpart destroy ${dev2} > gpart create -s gpt ${dev1} > gpart create -s gpt ${dev2} > gpart add -b 34 -s 64k -t freebsd-boot ${dev1} > gpart add -s ${swapsize} -t freebsd-swap -l swap0 ${dev1} > gpart add -s ${zfssize} -t freebsd-zfs -l disk0 ${dev1} > gpart add -b 34 -s 64k -t freebsd-boot ${dev2} > gpart add -s ${swapsize} -t freebsd-swap -l swap1 ${dev2} > gpart add -s ${zfssize} -t freebsd-zfs -l disk1 ${dev2} > gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ${dev1} > gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ${dev2} > zpool create ${poolname} mirror /dev/gpt/disk0 /dev/gpt/disk1 >=20 > That worked perfectly for half a year. > Suddenly, it wouldn't come back up after a reboot. >=20 > What I want to do now is mount the filesystem and check for misconfigurati= on. > So I once again booted into the linux-based rescue system, dd'd mfsbsd > onto the first disk (/dev/sda), booted it up. > This FreeBSD-based system is called "prealpha". > That's where I am now: > prealpha# gpart show > =3D> 0 976773168 ada0 BSD (466G) > 0 16 - free - (8.0K) > 16 65520 1 !0 (32M) > 65536 976707632 - free - (466G) >=20 > =3D> 34 976773101 ada1 GPT (466G) > 34 128 1 freebsd-boot (64K) > 162 8388608 2 freebsd-swap (4.0G) > 8388770 629145600 3 freebsd-zfs (300G) > 637534370 339238765 - free - (162G) > prealpha# ls /dev/gpt/ > disk1 swap1 > The devices changed name from ad4/ad6 to ada0/ada1 because mfsbsd > loads the ahci module now. > I want to mount the zpool from ada1, and view/edit some configuration file= s. > After that, I want to restore the mirror setup with ada0 and ada1 and > try to boot again. >=20 > How do I do that? > Any help would be appreciated, I probably forgot to mention vital > details, I am in a bit of a panic right now. > Please tell me if you need for details. >=20 Did you try zpool import ? From owner-freebsd-fs@FreeBSD.ORG Sun Oct 23 11:56:43 2011 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 774801065678 for ; Sun, 23 Oct 2011 11:56:43 +0000 (UTC) (envelope-from ml@my.gd) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 0B3D18FC08 for ; Sun, 23 Oct 2011 11:56:42 +0000 (UTC) Received: by wyi40 with SMTP id 40so6863693wyi.13 for ; Sun, 23 Oct 2011 04:56:42 -0700 (PDT) Received: by 10.227.5.213 with SMTP id 21mr7618066wbw.40.1319371002109; Sun, 23 Oct 2011 04:56:42 -0700 (PDT) Received: from [10.101.174.142] ([92.90.16.50]) by mx.google.com with ESMTPS id b5sm32746017wbh.4.2011.10.23.04.56.38 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 23 Oct 2011 04:56:41 -0700 (PDT) References: In-Reply-To: Mime-Version: 1.0 (iPhone Mail 8J2) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Message-Id: <9DC19BB5-3B98-4772-A1F6-6D5AA3390913@my.gd> X-Mailer: iPhone Mail (8J2) From: Damien Fleuriot Date: Sun, 23 Oct 2011 13:56:24 +0200 To: James Coldwell Cc: "freebsd-fs@freebsd.org" Subject: Re: Restore a ZFS mirror setup (GPT, ZFS-on-root) 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: Sun, 23 Oct 2011 11:56:43 -0000 On 23 Oct 2011, at 11:26, James Coldwell wr= ote: > Hello List, >=20 > My Problem: > My server wouldn't come back up after a reboot. > It is a 8.2-RELEASE system, running a two-disk ZFS mirror setup. > It is a dedicated box in a remote datacenter. > I can boot up some linux-based rescue system. >=20 > The way I installed FreeBSD on it was with mfsbsd, the zpool was > created as such: > set poolname=3D"z0" > set dev1=3D"ad4" > set dev2=3D"ad6" > set swapsize=3D"4G" > set zfssize=3D"300G" > gpart delete -i 1 ${dev1} > gpart delete -i 1 ${dev2} > gpart destroy ${dev1} > gpart destroy ${dev2} > gpart create -s gpt ${dev1} > gpart create -s gpt ${dev2} > gpart add -b 34 -s 64k -t freebsd-boot ${dev1} > gpart add -s ${swapsize} -t freebsd-swap -l swap0 ${dev1} > gpart add -s ${zfssize} -t freebsd-zfs -l disk0 ${dev1} > gpart add -b 34 -s 64k -t freebsd-boot ${dev2} > gpart add -s ${swapsize} -t freebsd-swap -l swap1 ${dev2} > gpart add -s ${zfssize} -t freebsd-zfs -l disk1 ${dev2} > gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ${dev1} > gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ${dev2} > zpool create ${poolname} mirror /dev/gpt/disk0 /dev/gpt/disk1 >=20 > That worked perfectly for half a year. > Suddenly, it wouldn't come back up after a reboot. >=20 > What I want to do now is mount the filesystem and check for misconfigurati= on. > So I once again booted into the linux-based rescue system, dd'd mfsbsd > onto the first disk (/dev/sda), booted it up. > This FreeBSD-based system is called "prealpha". > That's where I am now: > prealpha# gpart show > =3D> 0 976773168 ada0 BSD (466G) > 0 16 - free - (8.0K) > 16 65520 1 !0 (32M) > 65536 976707632 - free - (466G) >=20 > =3D> 34 976773101 ada1 GPT (466G) > 34 128 1 freebsd-boot (64K) > 162 8388608 2 freebsd-swap (4.0G) > 8388770 629145600 3 freebsd-zfs (300G) > 637534370 339238765 - free - (162G) > prealpha# ls /dev/gpt/ > disk1 swap1 > The devices changed name from ad4/ad6 to ada0/ada1 because mfsbsd > loads the ahci module now. > I want to mount the zpool from ada1, and view/edit some configuration file= s. > After that, I want to restore the mirror setup with ada0 and ada1 and > try to boot again. >=20 > How do I do that? > Any help would be appreciated, I probably forgot to mention vital > details, I am in a bit of a panic right now. > Please tell me if you need for details. >=20 zpool import -d /dev even= From owner-freebsd-fs@FreeBSD.ORG Sun Oct 23 14:22:06 2011 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 6206B1065675 for ; Sun, 23 Oct 2011 14:22:06 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.dawidek.net (60.wheelsystems.com [83.12.187.60]) by mx1.freebsd.org (Postfix) with ESMTP id D231A8FC15 for ; Sun, 23 Oct 2011 14:22:05 +0000 (UTC) Received: from localhost (89-73-195-149.dynamic.chello.pl [89.73.195.149]) by mail.dawidek.net (Postfix) with ESMTPSA id D9BFE575; Sun, 23 Oct 2011 16:03:08 +0200 (CEST) Date: Sun, 23 Oct 2011 16:02:22 +0200 From: Pawel Jakub Dawidek To: Harold Paulson Message-ID: <20111023140222.GG1697@garage.freebsd.pl> References: <4D8047A6-930E-4DE8-BA55-051890585BFE@internal.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="oXNgvKVxGWJ0RPMJ" Content-Disposition: inline In-Reply-To: <4D8047A6-930E-4DE8-BA55-051890585BFE@internal.org> X-OS: FreeBSD 9.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-fs@freebsd.org Subject: Re: Damaged directory on ZFS 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: Sun, 23 Oct 2011 14:22:06 -0000 --oXNgvKVxGWJ0RPMJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Oct 17, 2011 at 05:17:31PM -0700, Harold Paulson wrote: > Hello,=20 >=20 > I've had a server that boots from ZFS panicking for a couple days. I hav= e worked around the problem for now, but I hope someone can give me some in= sight into what's going on, and how I can solve it properly. =20 >=20 > The server is running 8.2-STABLE (zfs v28) with 8G of ram and 4 SATA disk= s in a raid10 type arrangement: >=20 > # uname -a =20 > FreeBSD jane.sierraweb.com 8.2-STABLE-201105 FreeBSD 8.2-STABLE-201105 #0= : Tue May 17 05:18:48 UTC 2011 root@mason.cse.buffalo.edu:/usr/obj/usr/= src/sys/GENERIC amd64 >=20 > And zpool status:=20 >=20 > NAME STATE READ WRITE CKSUM > tank ONLINE 0 0 0 > mirror ONLINE 0 0 0 > gpt/disk0 ONLINE 0 0 0 > gpt/disk1 ONLINE 0 0 0 > mirror ONLINE 0 0 0 > gpt/disk2 ONLINE 0 0 0 > gpt/disk3 ONLINE 0 0 0 >=20 > It started panicking under load a couple days ago. We replaced RAM and m= otherboard, but problems persisted. I don't know if a hardware issue origi= nally caused the problem or what. When it panics, I get the usual panic me= ssage, but I don't get a core file, and it never reboots itself. =20 >=20 > http://pastebin.com/F1J2AjSF >=20 > While I was trying to figure out the source of the problem, I notice stuc= k various stuck processes that peg a CPU and can't be killed, such as: >=20 > PID JID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU CO= MMAND > 48735 0 root 1 46 0 11972K 924K CPU3 3 415:14 100.00% f= ind >=20 > They are not marked zombie, but I can't kill them, and restarting the jai= l they are in won't even get rid of them. truss just hangs with no output = on them. On different occasions, I noticed pop3d processes for the same us= er getting stuck in this way. On a hunch I ran a "find" through the files = in the user's Maildir and got a panic. I disabled this account and now the= server is stable again. At least until locate.updatedb walks through that= directory, I suppose. Evidentially, there is some kind of hole in the fi= le system below that directory tree causing the panic. =20 >=20 > I can move that directory out of the way, and carry on, but is there anyt= hing I can do to really *repair* the problem? Could you run these commands: objdump -D /boot/kernel/zfs.ko.symbols | egrep '^[0-9a-f]{8,16} ' | awk '{printf("0x%s\n", $1)}' | xargs -J ADDR printf "%u + %= u\n" ADDR 0x111 | bc | xargs printf "0x%x\n" | xargs addr2line -e /boot/ker= nel/zfs.ko.symbols They should convert fzap_cursor_retrieve+0x111 info file:line. Send it here once you obtain it. Thanks. --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://yomoli.com --oXNgvKVxGWJ0RPMJ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAk6kHm4ACgkQForvXbEpPzR9HACfZjaw7qUv8KyZfPkEH7xVLuet I8cAnjray9S2+gUN5SFKdTD4IngISlaH =PF1p -----END PGP SIGNATURE----- --oXNgvKVxGWJ0RPMJ-- From owner-freebsd-fs@FreeBSD.ORG Sun Oct 23 16:46:21 2011 Return-Path: Delivered-To: fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0DA3C106564A for ; Sun, 23 Oct 2011 16:46:21 +0000 (UTC) (envelope-from wjw@digiware.nl) Received: from mail.digiware.nl (mail.ip6.digiware.nl [IPv6:2001:4cb8:1:106::2]) by mx1.freebsd.org (Postfix) with ESMTP id 9EDB48FC0C for ; Sun, 23 Oct 2011 16:46:20 +0000 (UTC) Received: from rack1.digiware.nl (localhost.digiware.nl [127.0.0.1]) by mail.digiware.nl (Postfix) with ESMTP id 0E963153434 for ; Sun, 23 Oct 2011 18:46:18 +0200 (CEST) X-Virus-Scanned: amavisd-new at digiware.nl Received: from mail.digiware.nl ([127.0.0.1]) by rack1.digiware.nl (rack1.digiware.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LXdUvwqhC07k for ; Sun, 23 Oct 2011 18:46:16 +0200 (CEST) Received: from [IPv6:2001:4cb8:3:1:68a7:38a1:c49f:6c6d] (unknown [IPv6:2001:4cb8:3:1:68a7:38a1:c49f:6c6d]) by mail.digiware.nl (Postfix) with ESMTP id D79BA153433 for ; Sun, 23 Oct 2011 18:46:15 +0200 (CEST) Message-ID: <4EA444D5.7030400@digiware.nl> Date: Sun, 23 Oct 2011 18:46:13 +0200 From: Willem Jan Withagen User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 MIME-Version: 1.0 To: fs@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: ZFS SSD Sample performance observation 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: Sun, 23 Oct 2011 16:46:21 -0000 Hi, I running a full ZFS server, aka the boot partition is also zfs. And I've been playing today with a SSD i just got: ad12: 57241MB at ata6-master UDMA100 SATA 3Gb/s Which supposedly can do > 500 Mb on read and write. So just for sake of it I tested compiling buildworlds (-j 64). I know it is not the best test, but it is easy to get at. And I also know that there are a lot of variable to be tweaked, which is not the purpose of the message either. /usr/src is on /zfsboot (mirror) /usr/obj is on /zfsraid (raidz2) Which are both seperate sets of disks. buildtime for buildworld 0:18:25 , no zfs cache, no zfs log. creating on the SSD: 10G cache for /zfsboot 1G log for /zfsraid 40G cache for /zfsraid and things speed up to 0:16:05. (both times on a freshly booted box) So that is almost a 0:02:20 speedup, aka 13% speedup. At the cost of about 70 euros. That is enjoyable. --WjW PS: for those interested, dmesg at: http://www.tegenbosch28.nl/data/FreeBSD/ZFS.dmesg.txt PS2: I remember that 20min was the buildKERNEL time. :) From owner-freebsd-fs@FreeBSD.ORG Sun Oct 23 19:51:21 2011 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 0E9A51065670 for ; Sun, 23 Oct 2011 19:51:21 +0000 (UTC) (envelope-from kraduk@gmail.com) Received: from mail-gx0-f182.google.com (mail-gx0-f182.google.com [209.85.161.182]) by mx1.freebsd.org (Postfix) with ESMTP id C3C3A8FC08 for ; Sun, 23 Oct 2011 19:51:20 +0000 (UTC) Received: by ggnq2 with SMTP id q2so5047654ggn.13 for ; Sun, 23 Oct 2011 12:51:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=bCV0n+RTh5niL0r60FnGtHqL25SGl9qY3m10jtEU4zY=; b=WzaxdjK1utibYSYoPY9+fQoqpJwX1QJQOYsS8murzR0u3WOyVZuGkmv1eb27iB1+Fa souGcZyOrBeDsG+hv3MJ+dZP72cutYRQvFyeN8UycEHzE5+oaCrhGPeVkWtcYivjUP3x 02KEDvT2C4Qrs1SQZwQOJJ9Y0EKFcXHnYvLXg= MIME-Version: 1.0 Received: by 10.236.181.135 with SMTP id l7mr30872822yhm.85.1319399480047; Sun, 23 Oct 2011 12:51:20 -0700 (PDT) Received: by 10.236.103.18 with HTTP; Sun, 23 Oct 2011 12:51:20 -0700 (PDT) In-Reply-To: References: Date: Sun, 23 Oct 2011 20:51:20 +0100 Message-ID: From: krad To: James Coldwell Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-fs@freebsd.org Subject: Re: Restore a ZFS mirror setup (GPT, ZFS-on-root) 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: Sun, 23 Oct 2011 19:51:21 -0000 On 23 October 2011 10:26, James Coldwell wrote: > Hello List, > > My Problem: > My server wouldn't come back up after a reboot. > It is a 8.2-RELEASE system, running a two-disk ZFS mirror setup. > It is a dedicated box in a remote datacenter. > I can boot up some linux-based rescue system. > > The way I installed FreeBSD on it was with mfsbsd, the zpool was > created as such: > set poolname="z0" > set dev1="ad4" > set dev2="ad6" > set swapsize="4G" > set zfssize="300G" > gpart delete -i 1 ${dev1} > gpart delete -i 1 ${dev2} > gpart destroy ${dev1} > gpart destroy ${dev2} > gpart create -s gpt ${dev1} > gpart create -s gpt ${dev2} > gpart add -b 34 -s 64k -t freebsd-boot ${dev1} > gpart add -s ${swapsize} -t freebsd-swap -l swap0 ${dev1} > gpart add -s ${zfssize} -t freebsd-zfs -l disk0 ${dev1} > gpart add -b 34 -s 64k -t freebsd-boot ${dev2} > gpart add -s ${swapsize} -t freebsd-swap -l swap1 ${dev2} > gpart add -s ${zfssize} -t freebsd-zfs -l disk1 ${dev2} > gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ${dev1} > gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ${dev2} > zpool create ${poolname} mirror /dev/gpt/disk0 /dev/gpt/disk1 > > That worked perfectly for half a year. > Suddenly, it wouldn't come back up after a reboot. > > What I want to do now is mount the filesystem and check for > misconfiguration. > So I once again booted into the linux-based rescue system, dd'd mfsbsd > onto the first disk (/dev/sda), booted it up. > This FreeBSD-based system is called "prealpha". > That's where I am now: > prealpha# gpart show > => 0 976773168 ada0 BSD (466G) > 0 16 - free - (8.0K) > 16 65520 1 !0 (32M) > 65536 976707632 - free - (466G) > > => 34 976773101 ada1 GPT (466G) > 34 128 1 freebsd-boot (64K) > 162 8388608 2 freebsd-swap (4.0G) > 8388770 629145600 3 freebsd-zfs (300G) > 637534370 339238765 - free - (162G) > prealpha# ls /dev/gpt/ > disk1 swap1 > The devices changed name from ad4/ad6 to ada0/ada1 because mfsbsd > loads the ahci module now. > I want to mount the zpool from ada1, and view/edit some configuration > files. > After that, I want to restore the mirror setup with ada0 and ada1 and > try to boot again. > rth > How do I do that? > Any help would be appreciated, I probably forgot to mention vital > details, I am in a bit of a panic right now. > Please tell me if you need for details. > > James > _______________________________________________ > 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" > I'm curious why did you boot into a linux livecd? Freebsd has a rescue cd, or you could use pcbsd. Opensolaris or Solars 11 cd would work as well, but linux?? 1st thing to do is calm down as you have made one mistake by destroying one disk (what if the one you chose was the good one). Boot into a live cd and DD the remaining zfs disk to a portable drive. You can then play with this image safely, and or have a backup. Can you provide any output from the boot process? Get a remote hands engineer to take a picture. We can then take it from there From owner-freebsd-fs@FreeBSD.ORG Mon Oct 24 00:52:15 2011 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 0159D1065740 for ; Mon, 24 Oct 2011 00:52:15 +0000 (UTC) (envelope-from ler@lerctr.org) Received: from thebighonker.lerctr.org (lrosenman-1-pt.tunnel.tserv8.dal1.ipv6.he.net [IPv6:2001:470:1f0e:3ad::2]) by mx1.freebsd.org (Postfix) with ESMTP id A41218FC13 for ; Mon, 24 Oct 2011 00:52:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lerctr.org; s=lerami; h=Content-Type:MIME-Version:Message-ID:Subject:To:Sender:From:Date; bh=Wf2vqLvgdNZBhJcmCeMfce9uBSKtJuLaK7+j0WU7yKM=; b=UL5VyQdByt8JyRCSqrEXptqIC1Zppl2frRbcoADX6OUPfJl0ed61bchS8ymaSO1CRqaIbV5WwpWlHwUpc729+W2tXouxplwynDIOlc56t2upzdpcqntkXuLalvTya4SCSazQmahJfGeMoPnVd/1DKlfXSMmPfhwT6U8QpfMBoIA=; Received: from cpe-72-182-3-73.austin.res.rr.com ([72.182.3.73]:35589 helo=borg) by thebighonker.lerctr.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1RI8lv-000J51-58 for freebsd-fs@freebsd.org; Sun, 23 Oct 2011 19:52:14 -0500 Date: Sun, 23 Oct 2011 19:52:08 -0500 (CDT) From: Larry Rosenman Sender: ler@borg To: freebsd-fs@freebsd.org Message-ID: User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII X-Spam-Score: -2.7 (--) X-LERCTR-Spam-Score: -2.7 (--) X-Spam-Report: SpamScore (-2.7/5.0) ALL_TRUSTED=-1, BAYES_00=-1.9, TW_GP=0.077, TW_ZF=0.077 X-LERCTR-Spam-Report: SpamScore (-2.7/5.0) ALL_TRUSTED=-1, BAYES_00=-1.9, TW_GP=0.077, TW_ZF=0.077 Subject: Anyway to change pool to use the gpt label instead of gptid? 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: Mon, 24 Oct 2011 00:52:15 -0000 Is there any way to convert this setup to use the GPT labels instead of the the GPT UUID's in zpool status/zpool iostat? $ gpart show => 34 781422701 ada0 GPT (372G) 34 2 - free - (1.0k) 36 128 1 freebsd-boot (64k) 164 8388608 2 freebsd-swap (4.0G) 8388772 773033963 3 freebsd-zfs (368G) => 34 781422701 ada1 GPT (372G) 34 2 - free - (1.0k) 36 128 1 freebsd-boot (64k) 164 8388608 2 freebsd-swap (4.0G) 8388772 773033963 3 freebsd-zfs (368G) => 34 976773101 ada2 GPT (465G) 34 2 - free - (1.0k) 36 128 1 freebsd-boot (64k) 164 8388608 2 freebsd-swap (4.0G) 8388772 968384363 3 freebsd-zfs (461G) => 34 781422701 ada3 GPT (372G) 34 2 - free - (1.0k) 36 128 1 freebsd-boot (64k) 164 8388608 2 freebsd-swap (4.0G) 8388772 773033963 3 freebsd-zfs (368G) => 34 781422701 ada4 GPT (372G) 34 2 - free - (1.0k) 36 128 1 freebsd-boot (64k) 164 8388608 2 freebsd-swap (4.0G) 8388772 773033963 3 freebsd-zfs (368G) => 34 781422701 ada5 GPT (372G) 34 2 - free - (1.0k) 36 128 1 freebsd-boot (64k) 164 8388608 2 freebsd-swap (4.0G) 8388772 773033963 3 freebsd-zfs (368G) $ gpart list Geom name: ada0 modified: false state: OK fwheads: 16 fwsectors: 63 last: 781422734 first: 34 entries: 128 scheme: GPT Providers: 1. Name: ada0p1 Mediasize: 65536 (64k) Sectorsize: 512 Stripesize: 0 Stripeoffset: 18432 Mode: r0w0e0 rawuuid: bc4c1c42-f17f-11e0-a060-0030488e9ff3 rawtype: 83bd6b9d-7f41-11dc-be0b-001560b84f0f label: (null) length: 65536 offset: 18432 type: freebsd-boot index: 1 end: 163 start: 36 2. Name: ada0p2 Mediasize: 4294967296 (4.0G) Sectorsize: 512 Stripesize: 0 Stripeoffset: 83968 Mode: r1w1e1 rawuuid: ca30afcf-f17f-11e0-a060-0030488e9ff3 rawtype: 516e7cb5-6ecf-11d6-8ff8-00022d09712b label: swap0 length: 4294967296 offset: 83968 type: freebsd-swap index: 2 end: 8388771 start: 164 3. Name: ada0p3 Mediasize: 395793389056 (368G) Sectorsize: 512 Stripesize: 0 Stripeoffset: 83968 Mode: r1w1e2 rawuuid: dab78d7a-f17f-11e0-a060-0030488e9ff3 rawtype: 516e7cba-6ecf-11d6-8ff8-00022d09712b label: disk0 length: 395793389056 offset: 4295051264 type: freebsd-zfs index: 3 end: 781422734 start: 8388772 Consumers: 1. Name: ada0 Mediasize: 400088457216 (372G) Sectorsize: 512 Mode: r2w2e5 Geom name: ada1 modified: false state: OK fwheads: 16 fwsectors: 63 last: 781422734 first: 34 entries: 128 scheme: GPT Providers: 1. Name: ada1p1 Mediasize: 65536 (64k) Sectorsize: 512 Stripesize: 0 Stripeoffset: 18432 Mode: r0w0e0 rawuuid: 54e701ff-f180-11e0-a060-0030488e9ff3 rawtype: 83bd6b9d-7f41-11dc-be0b-001560b84f0f label: (null) length: 65536 offset: 18432 type: freebsd-boot index: 1 end: 163 start: 36 2. Name: ada1p2 Mediasize: 4294967296 (4.0G) Sectorsize: 512 Stripesize: 0 Stripeoffset: 83968 Mode: r1w1e1 rawuuid: 54eebd95-f180-11e0-a060-0030488e9ff3 rawtype: 516e7cb5-6ecf-11d6-8ff8-00022d09712b label: swap1 length: 4294967296 offset: 83968 type: freebsd-swap index: 2 end: 8388771 start: 164 3. Name: ada1p3 Mediasize: 395793389056 (368G) Sectorsize: 512 Stripesize: 0 Stripeoffset: 83968 Mode: r1w1e2 rawuuid: 54f70329-f180-11e0-a060-0030488e9ff3 rawtype: 516e7cba-6ecf-11d6-8ff8-00022d09712b label: disk1 length: 395793389056 offset: 4295051264 type: freebsd-zfs index: 3 end: 781422734 start: 8388772 Consumers: 1. Name: ada1 Mediasize: 400088457216 (372G) Sectorsize: 512 Mode: r2w2e5 Geom name: ada2 modified: false state: OK fwheads: 16 fwsectors: 63 last: 976773134 first: 34 entries: 128 scheme: GPT Providers: 1. Name: ada2p1 Mediasize: 65536 (64k) Sectorsize: 512 Stripesize: 0 Stripeoffset: 18432 Mode: r0w0e0 rawuuid: 550e22c7-f180-11e0-a060-0030488e9ff3 rawtype: 83bd6b9d-7f41-11dc-be0b-001560b84f0f label: (null) length: 65536 offset: 18432 type: freebsd-boot index: 1 end: 163 start: 36 2. Name: ada2p2 Mediasize: 4294967296 (4.0G) Sectorsize: 512 Stripesize: 0 Stripeoffset: 83968 Mode: r1w1e1 rawuuid: 5515f1c4-f180-11e0-a060-0030488e9ff3 rawtype: 516e7cb5-6ecf-11d6-8ff8-00022d09712b label: swap2 length: 4294967296 offset: 83968 type: freebsd-swap index: 2 end: 8388771 start: 164 3. Name: ada2p3 Mediasize: 495812793856 (461G) Sectorsize: 512 Stripesize: 0 Stripeoffset: 83968 Mode: r1w1e2 rawuuid: 551f4215-f180-11e0-a060-0030488e9ff3 rawtype: 516e7cba-6ecf-11d6-8ff8-00022d09712b label: disk2 length: 495812793856 offset: 4295051264 type: freebsd-zfs index: 3 end: 976773134 start: 8388772 Consumers: 1. Name: ada2 Mediasize: 500107862016 (465G) Sectorsize: 512 Mode: r2w2e5 Geom name: ada3 modified: false state: OK fwheads: 16 fwsectors: 63 last: 781422734 first: 34 entries: 128 scheme: GPT Providers: 1. Name: ada3p1 Mediasize: 65536 (64k) Sectorsize: 512 Stripesize: 0 Stripeoffset: 18432 Mode: r0w0e0 rawuuid: 553d6d5f-f180-11e0-a060-0030488e9ff3 rawtype: 83bd6b9d-7f41-11dc-be0b-001560b84f0f label: (null) length: 65536 offset: 18432 type: freebsd-boot index: 1 end: 163 start: 36 2. Name: ada3p2 Mediasize: 4294967296 (4.0G) Sectorsize: 512 Stripesize: 0 Stripeoffset: 83968 Mode: r1w1e1 rawuuid: 554677f6-f180-11e0-a060-0030488e9ff3 rawtype: 516e7cb5-6ecf-11d6-8ff8-00022d09712b label: swap3 length: 4294967296 offset: 83968 type: freebsd-swap index: 2 end: 8388771 start: 164 3. Name: ada3p3 Mediasize: 395793389056 (368G) Sectorsize: 512 Stripesize: 0 Stripeoffset: 83968 Mode: r1w1e2 rawuuid: 554fbc57-f180-11e0-a060-0030488e9ff3 rawtype: 516e7cba-6ecf-11d6-8ff8-00022d09712b label: disk3 length: 395793389056 offset: 4295051264 type: freebsd-zfs index: 3 end: 781422734 start: 8388772 Consumers: 1. Name: ada3 Mediasize: 400088457216 (372G) Sectorsize: 512 Mode: r2w2e5 Geom name: ada4 modified: false state: OK fwheads: 16 fwsectors: 63 last: 781422734 first: 34 entries: 128 scheme: GPT Providers: 1. Name: ada4p1 Mediasize: 65536 (64k) Sectorsize: 512 Stripesize: 0 Stripeoffset: 18432 Mode: r0w0e0 rawuuid: 556c3554-f180-11e0-a060-0030488e9ff3 rawtype: 83bd6b9d-7f41-11dc-be0b-001560b84f0f label: (null) length: 65536 offset: 18432 type: freebsd-boot index: 1 end: 163 start: 36 2. Name: ada4p2 Mediasize: 4294967296 (4.0G) Sectorsize: 512 Stripesize: 0 Stripeoffset: 83968 Mode: r1w1e1 rawuuid: 55754618-f180-11e0-a060-0030488e9ff3 rawtype: 516e7cb5-6ecf-11d6-8ff8-00022d09712b label: swap4 length: 4294967296 offset: 83968 type: freebsd-swap index: 2 end: 8388771 start: 164 3. Name: ada4p3 Mediasize: 395793389056 (368G) Sectorsize: 512 Stripesize: 0 Stripeoffset: 83968 Mode: r1w1e2 rawuuid: 557e84df-f180-11e0-a060-0030488e9ff3 rawtype: 516e7cba-6ecf-11d6-8ff8-00022d09712b label: disk4 length: 395793389056 offset: 4295051264 type: freebsd-zfs index: 3 end: 781422734 start: 8388772 Consumers: 1. Name: ada4 Mediasize: 400088457216 (372G) Sectorsize: 512 Mode: r2w2e5 Geom name: ada5 modified: false state: OK fwheads: 16 fwsectors: 63 last: 781422734 first: 34 entries: 128 scheme: GPT Providers: 1. Name: ada5p1 Mediasize: 65536 (64k) Sectorsize: 512 Stripesize: 0 Stripeoffset: 18432 Mode: r0w0e0 rawuuid: 5598ebf4-f180-11e0-a060-0030488e9ff3 rawtype: 83bd6b9d-7f41-11dc-be0b-001560b84f0f label: (null) length: 65536 offset: 18432 type: freebsd-boot index: 1 end: 163 start: 36 2. Name: ada5p2 Mediasize: 4294967296 (4.0G) Sectorsize: 512 Stripesize: 0 Stripeoffset: 83968 Mode: r1w1e1 rawuuid: 55a1f6a0-f180-11e0-a060-0030488e9ff3 rawtype: 516e7cb5-6ecf-11d6-8ff8-00022d09712b label: swap5 length: 4294967296 offset: 83968 type: freebsd-swap index: 2 end: 8388771 start: 164 3. Name: ada5p3 Mediasize: 395793389056 (368G) Sectorsize: 512 Stripesize: 0 Stripeoffset: 83968 Mode: r1w1e2 rawuuid: 55ab4aad-f180-11e0-a060-0030488e9ff3 rawtype: 516e7cba-6ecf-11d6-8ff8-00022d09712b label: disk5 length: 395793389056 offset: 4295051264 type: freebsd-zfs index: 3 end: 781422734 start: 8388772 Consumers: 1. Name: ada5 Mediasize: 400088457216 (372G) Sectorsize: 512 Mode: r2w2e5 $ zpool status pool: zroot state: ONLINE scan: scrub repaired 0 in 0h16m with 0 errors on Thu Oct 13 22:55:43 2011 config: NAME STATE READ WRITE CKSUM zroot ONLINE 0 0 0 raidz1-0 ONLINE 0 0 0 gptid/dab78d7a-f17f-11e0-a060-0030488e9ff3 ONLINE 0 0 0 gptid/54f70329-f180-11e0-a060-0030488e9ff3 ONLINE 0 0 0 gptid/551f4215-f180-11e0-a060-0030488e9ff3 ONLINE 0 0 0 gptid/554fbc57-f180-11e0-a060-0030488e9ff3 ONLINE 0 0 0 gptid/557e84df-f180-11e0-a060-0030488e9ff3 ONLINE 0 0 0 gptid/55ab4aad-f180-11e0-a060-0030488e9ff3 ONLINE 0 0 0 errors: No known data errors $ Thanks for any help! -- Larry Rosenman http://www.lerctr.org/~ler Phone: +1 512-248-2683 E-Mail: ler@lerctr.org US Mail: 430 Valona Loop, Round Rock, TX 78681-3893 From owner-freebsd-fs@FreeBSD.ORG Mon Oct 24 01:07:49 2011 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 749931065674 for ; Mon, 24 Oct 2011 01:07:49 +0000 (UTC) (envelope-from ler@lerctr.org) Received: from thebighonker.lerctr.org (lrosenman-1-pt.tunnel.tserv8.dal1.ipv6.he.net [IPv6:2001:470:1f0e:3ad::2]) by mx1.freebsd.org (Postfix) with ESMTP id 39CBB8FC08 for ; Mon, 24 Oct 2011 01:07:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lerctr.org; s=lerami; h=Content-Type:MIME-Version:References:Message-ID:In-Reply-To:Subject:cc:To:Sender:From:Date; bh=JkLQwZ6vN4M2X+IZsz09yrYP6ntWKyw7ge+CcguwesI=; b=DzUgOyFiFVWMCm+otYEM+tLXLjxXtCBgH1UefD813yTR0AL3DnITwx6b8p47MwRZOHppFSAuktxfVA174ZWgVsAvMpAo+LomZ8AG3cZgWzLWm5zypsdvjKONMh0pmLb0xG7r4HjcR+4nzUwZZJX5/zerxR5/RLjaqAe1GuvlavY=; Received: from cpe-72-182-3-73.austin.res.rr.com ([72.182.3.73]:62951 helo=borg) by thebighonker.lerctr.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1RI910-000JGs-Rh; Sun, 23 Oct 2011 20:07:48 -0500 Date: Sun, 23 Oct 2011 20:07:44 -0500 (CDT) From: Larry Rosenman Sender: ler@borg To: Edho Arief In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Spam-Score: -2.8 (--) X-LERCTR-Spam-Score: -2.8 (--) X-Spam-Report: SpamScore (-2.8/5.0) ALL_TRUSTED=-1,BAYES_00=-1.9,TW_GP=0.077 X-LERCTR-Spam-Report: SpamScore (-2.8/5.0) ALL_TRUSTED=-1, BAYES_00=-1.9, TW_GP=0.077 Cc: freebsd-fs@freebsd.org Subject: Re: Anyway to change pool to use the gpt label instead of gptid? 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: Mon, 24 Oct 2011 01:07:49 -0000 On Mon, 24 Oct 2011, Edho Arief wrote: > On Mon, Oct 24, 2011 at 12:52 AM, Larry Rosenman wrote: >> Is there any way to convert this setup to use the GPT labels instead of the >> the GPT UUID's in zpool status/zpool iostat? >> > > try: > > kern.geom.label.gptid.enable="0" > > in /boot/loader.conf > > That's closer, but uses the adaxpy, not the GPT Label. $ zpool status pool: zroot state: ONLINE scan: scrub repaired 0 in 0h16m with 0 errors on Thu Oct 13 22:55:43 2011 config: NAME STATE READ WRITE CKSUM zroot ONLINE 0 0 0 raidz1-0 ONLINE 0 0 0 ada0p3 ONLINE 0 0 0 ada1p3 ONLINE 0 0 0 ada2p3 ONLINE 0 0 0 ada3p3 ONLINE 0 0 0 ada4p3 ONLINE 0 0 0 ada5p3 ONLINE 0 0 0 errors: No known data errors $ Ideas? -- Larry Rosenman http://www.lerctr.org/~ler Phone: +1 512-248-2683 E-Mail: ler@lerctr.org US Mail: 430 Valona Loop, Round Rock, TX 78681-3893 From owner-freebsd-fs@FreeBSD.ORG Mon Oct 24 01:14:29 2011 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 0FB2E106566B for ; Mon, 24 Oct 2011 01:14:29 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from qmta08.westchester.pa.mail.comcast.net (qmta08.westchester.pa.mail.comcast.net [76.96.62.80]) by mx1.freebsd.org (Postfix) with ESMTP id B21A08FC0A for ; Mon, 24 Oct 2011 01:14:28 +0000 (UTC) Received: from omta17.westchester.pa.mail.comcast.net ([76.96.62.89]) by qmta08.westchester.pa.mail.comcast.net with comcast id oMt21h0021vXlb858REU1Z; Mon, 24 Oct 2011 01:14:28 +0000 Received: from koitsu.dyndns.org ([67.180.84.87]) by omta17.westchester.pa.mail.comcast.net with comcast id oRET1h0101t3BNj3dREU22; Mon, 24 Oct 2011 01:14:28 +0000 Received: by icarus.home.lan (Postfix, from userid 1000) id 6EFAB102C1C; Sun, 23 Oct 2011 18:14:26 -0700 (PDT) Date: Sun, 23 Oct 2011 18:14:26 -0700 From: Jeremy Chadwick To: Larry Rosenman Message-ID: <20111024011426.GA57172@icarus.home.lan> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-fs@freebsd.org Subject: Re: Anyway to change pool to use the gpt label instead of gptid? 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: Mon, 24 Oct 2011 01:14:29 -0000 On Sun, Oct 23, 2011 at 07:52:08PM -0500, Larry Rosenman wrote: > Is there any way to convert this setup to use the GPT labels instead > of the the GPT UUID's in zpool status/zpool iostat? > > $ gpart show > > => 34 781422701 ada0 GPT (372G) > 34 2 - free - (1.0k) > 36 128 1 freebsd-boot (64k) > 164 8388608 2 freebsd-swap (4.0G) > 8388772 773033963 3 freebsd-zfs (368G) > > => 34 781422701 ada1 GPT (372G) > 34 2 - free - (1.0k) > 36 128 1 freebsd-boot (64k) > 164 8388608 2 freebsd-swap (4.0G) > 8388772 773033963 3 freebsd-zfs (368G) > > => 34 976773101 ada2 GPT (465G) > 34 2 - free - (1.0k) > 36 128 1 freebsd-boot (64k) > 164 8388608 2 freebsd-swap (4.0G) > 8388772 968384363 3 freebsd-zfs (461G) > > => 34 781422701 ada3 GPT (372G) > 34 2 - free - (1.0k) > 36 128 1 freebsd-boot (64k) > 164 8388608 2 freebsd-swap (4.0G) > 8388772 773033963 3 freebsd-zfs (368G) > > => 34 781422701 ada4 GPT (372G) > 34 2 - free - (1.0k) > 36 128 1 freebsd-boot (64k) > 164 8388608 2 freebsd-swap (4.0G) > 8388772 773033963 3 freebsd-zfs (368G) > > => 34 781422701 ada5 GPT (372G) > 34 2 - free - (1.0k) > 36 128 1 freebsd-boot (64k) > 164 8388608 2 freebsd-swap (4.0G) > 8388772 773033963 3 freebsd-zfs (368G) > $ gpart list > > Geom name: ada0 > modified: false > state: OK > fwheads: 16 > fwsectors: 63 > last: 781422734 > first: 34 > entries: 128 > scheme: GPT > Providers: > 1. Name: ada0p1 > Mediasize: 65536 (64k) > Sectorsize: 512 > Stripesize: 0 > Stripeoffset: 18432 > Mode: r0w0e0 > rawuuid: bc4c1c42-f17f-11e0-a060-0030488e9ff3 > rawtype: 83bd6b9d-7f41-11dc-be0b-001560b84f0f > label: (null) > length: 65536 > offset: 18432 > type: freebsd-boot > index: 1 > end: 163 > start: 36 > 2. Name: ada0p2 > Mediasize: 4294967296 (4.0G) > Sectorsize: 512 > Stripesize: 0 > Stripeoffset: 83968 > Mode: r1w1e1 > rawuuid: ca30afcf-f17f-11e0-a060-0030488e9ff3 > rawtype: 516e7cb5-6ecf-11d6-8ff8-00022d09712b > label: swap0 > length: 4294967296 > offset: 83968 > type: freebsd-swap > index: 2 > end: 8388771 > start: 164 > 3. Name: ada0p3 > Mediasize: 395793389056 (368G) > Sectorsize: 512 > Stripesize: 0 > Stripeoffset: 83968 > Mode: r1w1e2 > rawuuid: dab78d7a-f17f-11e0-a060-0030488e9ff3 > rawtype: 516e7cba-6ecf-11d6-8ff8-00022d09712b > label: disk0 > length: 395793389056 > offset: 4295051264 > type: freebsd-zfs > index: 3 > end: 781422734 > start: 8388772 > Consumers: > 1. Name: ada0 > Mediasize: 400088457216 (372G) > Sectorsize: 512 > Mode: r2w2e5 > > Geom name: ada1 > modified: false > state: OK > fwheads: 16 > fwsectors: 63 > last: 781422734 > first: 34 > entries: 128 > scheme: GPT > Providers: > 1. Name: ada1p1 > Mediasize: 65536 (64k) > Sectorsize: 512 > Stripesize: 0 > Stripeoffset: 18432 > Mode: r0w0e0 > rawuuid: 54e701ff-f180-11e0-a060-0030488e9ff3 > rawtype: 83bd6b9d-7f41-11dc-be0b-001560b84f0f > label: (null) > length: 65536 > offset: 18432 > type: freebsd-boot > index: 1 > end: 163 > start: 36 > 2. Name: ada1p2 > Mediasize: 4294967296 (4.0G) > Sectorsize: 512 > Stripesize: 0 > Stripeoffset: 83968 > Mode: r1w1e1 > rawuuid: 54eebd95-f180-11e0-a060-0030488e9ff3 > rawtype: 516e7cb5-6ecf-11d6-8ff8-00022d09712b > label: swap1 > length: 4294967296 > offset: 83968 > type: freebsd-swap > index: 2 > end: 8388771 > start: 164 > 3. Name: ada1p3 > Mediasize: 395793389056 (368G) > Sectorsize: 512 > Stripesize: 0 > Stripeoffset: 83968 > Mode: r1w1e2 > rawuuid: 54f70329-f180-11e0-a060-0030488e9ff3 > rawtype: 516e7cba-6ecf-11d6-8ff8-00022d09712b > label: disk1 > length: 395793389056 > offset: 4295051264 > type: freebsd-zfs > index: 3 > end: 781422734 > start: 8388772 > Consumers: > 1. Name: ada1 > Mediasize: 400088457216 (372G) > Sectorsize: 512 > Mode: r2w2e5 > > Geom name: ada2 > modified: false > state: OK > fwheads: 16 > fwsectors: 63 > last: 976773134 > first: 34 > entries: 128 > scheme: GPT > Providers: > 1. Name: ada2p1 > Mediasize: 65536 (64k) > Sectorsize: 512 > Stripesize: 0 > Stripeoffset: 18432 > Mode: r0w0e0 > rawuuid: 550e22c7-f180-11e0-a060-0030488e9ff3 > rawtype: 83bd6b9d-7f41-11dc-be0b-001560b84f0f > label: (null) > length: 65536 > offset: 18432 > type: freebsd-boot > index: 1 > end: 163 > start: 36 > 2. Name: ada2p2 > Mediasize: 4294967296 (4.0G) > Sectorsize: 512 > Stripesize: 0 > Stripeoffset: 83968 > Mode: r1w1e1 > rawuuid: 5515f1c4-f180-11e0-a060-0030488e9ff3 > rawtype: 516e7cb5-6ecf-11d6-8ff8-00022d09712b > label: swap2 > length: 4294967296 > offset: 83968 > type: freebsd-swap > index: 2 > end: 8388771 > start: 164 > 3. Name: ada2p3 > Mediasize: 495812793856 (461G) > Sectorsize: 512 > Stripesize: 0 > Stripeoffset: 83968 > Mode: r1w1e2 > rawuuid: 551f4215-f180-11e0-a060-0030488e9ff3 > rawtype: 516e7cba-6ecf-11d6-8ff8-00022d09712b > label: disk2 > length: 495812793856 > offset: 4295051264 > type: freebsd-zfs > index: 3 > end: 976773134 > start: 8388772 > Consumers: > 1. Name: ada2 > Mediasize: 500107862016 (465G) > Sectorsize: 512 > Mode: r2w2e5 > > Geom name: ada3 > modified: false > state: OK > fwheads: 16 > fwsectors: 63 > last: 781422734 > first: 34 > entries: 128 > scheme: GPT > Providers: > 1. Name: ada3p1 > Mediasize: 65536 (64k) > Sectorsize: 512 > Stripesize: 0 > Stripeoffset: 18432 > Mode: r0w0e0 > rawuuid: 553d6d5f-f180-11e0-a060-0030488e9ff3 > rawtype: 83bd6b9d-7f41-11dc-be0b-001560b84f0f > label: (null) > length: 65536 > offset: 18432 > type: freebsd-boot > index: 1 > end: 163 > start: 36 > 2. Name: ada3p2 > Mediasize: 4294967296 (4.0G) > Sectorsize: 512 > Stripesize: 0 > Stripeoffset: 83968 > Mode: r1w1e1 > rawuuid: 554677f6-f180-11e0-a060-0030488e9ff3 > rawtype: 516e7cb5-6ecf-11d6-8ff8-00022d09712b > label: swap3 > length: 4294967296 > offset: 83968 > type: freebsd-swap > index: 2 > end: 8388771 > start: 164 > 3. Name: ada3p3 > Mediasize: 395793389056 (368G) > Sectorsize: 512 > Stripesize: 0 > Stripeoffset: 83968 > Mode: r1w1e2 > rawuuid: 554fbc57-f180-11e0-a060-0030488e9ff3 > rawtype: 516e7cba-6ecf-11d6-8ff8-00022d09712b > label: disk3 > length: 395793389056 > offset: 4295051264 > type: freebsd-zfs > index: 3 > end: 781422734 > start: 8388772 > Consumers: > 1. Name: ada3 > Mediasize: 400088457216 (372G) > Sectorsize: 512 > Mode: r2w2e5 > > Geom name: ada4 > modified: false > state: OK > fwheads: 16 > fwsectors: 63 > last: 781422734 > first: 34 > entries: 128 > scheme: GPT > Providers: > 1. Name: ada4p1 > Mediasize: 65536 (64k) > Sectorsize: 512 > Stripesize: 0 > Stripeoffset: 18432 > Mode: r0w0e0 > rawuuid: 556c3554-f180-11e0-a060-0030488e9ff3 > rawtype: 83bd6b9d-7f41-11dc-be0b-001560b84f0f > label: (null) > length: 65536 > offset: 18432 > type: freebsd-boot > index: 1 > end: 163 > start: 36 > 2. Name: ada4p2 > Mediasize: 4294967296 (4.0G) > Sectorsize: 512 > Stripesize: 0 > Stripeoffset: 83968 > Mode: r1w1e1 > rawuuid: 55754618-f180-11e0-a060-0030488e9ff3 > rawtype: 516e7cb5-6ecf-11d6-8ff8-00022d09712b > label: swap4 > length: 4294967296 > offset: 83968 > type: freebsd-swap > index: 2 > end: 8388771 > start: 164 > 3. Name: ada4p3 > Mediasize: 395793389056 (368G) > Sectorsize: 512 > Stripesize: 0 > Stripeoffset: 83968 > Mode: r1w1e2 > rawuuid: 557e84df-f180-11e0-a060-0030488e9ff3 > rawtype: 516e7cba-6ecf-11d6-8ff8-00022d09712b > label: disk4 > length: 395793389056 > offset: 4295051264 > type: freebsd-zfs > index: 3 > end: 781422734 > start: 8388772 > Consumers: > 1. Name: ada4 > Mediasize: 400088457216 (372G) > Sectorsize: 512 > Mode: r2w2e5 > > Geom name: ada5 > modified: false > state: OK > fwheads: 16 > fwsectors: 63 > last: 781422734 > first: 34 > entries: 128 > scheme: GPT > Providers: > 1. Name: ada5p1 > Mediasize: 65536 (64k) > Sectorsize: 512 > Stripesize: 0 > Stripeoffset: 18432 > Mode: r0w0e0 > rawuuid: 5598ebf4-f180-11e0-a060-0030488e9ff3 > rawtype: 83bd6b9d-7f41-11dc-be0b-001560b84f0f > label: (null) > length: 65536 > offset: 18432 > type: freebsd-boot > index: 1 > end: 163 > start: 36 > 2. Name: ada5p2 > Mediasize: 4294967296 (4.0G) > Sectorsize: 512 > Stripesize: 0 > Stripeoffset: 83968 > Mode: r1w1e1 > rawuuid: 55a1f6a0-f180-11e0-a060-0030488e9ff3 > rawtype: 516e7cb5-6ecf-11d6-8ff8-00022d09712b > label: swap5 > length: 4294967296 > offset: 83968 > type: freebsd-swap > index: 2 > end: 8388771 > start: 164 > 3. Name: ada5p3 > Mediasize: 395793389056 (368G) > Sectorsize: 512 > Stripesize: 0 > Stripeoffset: 83968 > Mode: r1w1e2 > rawuuid: 55ab4aad-f180-11e0-a060-0030488e9ff3 > rawtype: 516e7cba-6ecf-11d6-8ff8-00022d09712b > label: disk5 > length: 395793389056 > offset: 4295051264 > type: freebsd-zfs > index: 3 > end: 781422734 > start: 8388772 > Consumers: > 1. Name: ada5 > Mediasize: 400088457216 (372G) > Sectorsize: 512 > Mode: r2w2e5 > $ zpool status > > pool: zroot > state: ONLINE > scan: scrub repaired 0 in 0h16m with 0 errors on Thu Oct 13 22:55:43 2011 > config: > > NAME STATE READ WRITE CKSUM > zroot ONLINE 0 0 0 > raidz1-0 ONLINE 0 0 0 > gptid/dab78d7a-f17f-11e0-a060-0030488e9ff3 ONLINE 0 0 0 > gptid/54f70329-f180-11e0-a060-0030488e9ff3 ONLINE 0 0 0 > gptid/551f4215-f180-11e0-a060-0030488e9ff3 ONLINE 0 0 0 > gptid/554fbc57-f180-11e0-a060-0030488e9ff3 ONLINE 0 0 0 > gptid/557e84df-f180-11e0-a060-0030488e9ff3 ONLINE 0 0 0 > gptid/55ab4aad-f180-11e0-a060-0030488e9ff3 ONLINE 0 0 0 > > errors: No known data errors > > $ > > Thanks for any help! Aren't GPT labels stored in the /dev/gpt directory structure? If so, try maybe one of these two: zpool replace zroot gptid/55ab4aad-f180-11e0-a060-0030488e9ff3 /dev/gpt/disk5 zpool replace -f zroot gptid/55ab4aad-f180-11e0-a060-0030488e9ff3 /dev/gpt/disk5 You might also try offlining the "gptid/XXX" entry first, then try a normal replace. After doing this (on each and every device -- your pool will need to resilver too, every time), I imagine you will need to disable GPT IDs entirely using a loader.conf variable (see this thread, read the full thing): http://lists.freebsd.org/pipermail/freebsd-stable/2011-June/062999.html -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, US | | Making life hard for others since 1977. PGP 4BD6C0CB | From owner-freebsd-fs@FreeBSD.ORG Mon Oct 24 01:24:59 2011 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 B00C4106566B for ; Mon, 24 Oct 2011 01:24:59 +0000 (UTC) (envelope-from ler@lerctr.org) Received: from thebighonker.lerctr.org (lrosenman-1-pt.tunnel.tserv8.dal1.ipv6.he.net [IPv6:2001:470:1f0e:3ad::2]) by mx1.freebsd.org (Postfix) with ESMTP id 766F28FC13 for ; Mon, 24 Oct 2011 01:24:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lerctr.org; s=lerami; h=Content-Type:MIME-Version:References:Message-ID:In-Reply-To:Subject:cc:To:Sender:From:Date; bh=qECxuAiQCBiBcW/neWm0pWHXzZTYpHas8leZDD76uFU=; b=tNhr0IxdKWrO2jwiWFwvjQOcvqor9oKfyENoP7mNqJ5qJEvYS50b92DTDT6Qq0MVafqEhTxgAK1g4TV0FOxoaMvZhQBsl7ClCoOqZfVlG3khtidYglzD06N0AyBVLS/j2hVTVo8f/4v2/fbmaUzStKJwE4wdl3EZQfSNVExjBfQ=; Received: from cpe-72-182-3-73.austin.res.rr.com ([72.182.3.73]:15961 helo=borg) by thebighonker.lerctr.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1RI9Hd-000JSj-Hb; Sun, 23 Oct 2011 20:24:58 -0500 Date: Sun, 23 Oct 2011 20:24:54 -0500 (CDT) From: Larry Rosenman Sender: ler@borg To: Jeremy Chadwick In-Reply-To: <20111024011426.GA57172@icarus.home.lan> Message-ID: References: <20111024011426.GA57172@icarus.home.lan> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Spam-Score: -2.8 (--) X-LERCTR-Spam-Score: -2.8 (--) X-Spam-Report: SpamScore (-2.8/5.0) ALL_TRUSTED=-1,BAYES_00=-1.9,TW_GP=0.077 X-LERCTR-Spam-Report: SpamScore (-2.8/5.0) ALL_TRUSTED=-1, BAYES_00=-1.9, TW_GP=0.077 Cc: freebsd-fs@freebsd.org Subject: Re: Anyway to change pool to use the gpt label instead of gptid? 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: Mon, 24 Oct 2011 01:24:59 -0000 On Sun, 23 Oct 2011, Jeremy Chadwick wrote: > > > Aren't GPT labels stored in the /dev/gpt directory structure? Nope, they're eaten: $ ls /dev/gpt swap0 swap1 swap2 swap3 swap4 swap5 $ > http://lists.freebsd.org/pipermail/freebsd-stable/2011-June/062999.html Yep, changed it to the adaxpy form. > > -- Larry Rosenman http://www.lerctr.org/~ler Phone: +1 512-248-2683 E-Mail: ler@lerctr.org US Mail: 430 Valona Loop, Round Rock, TX 78681-3893 From owner-freebsd-fs@FreeBSD.ORG Mon Oct 24 01:25:43 2011 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 B034E1065674 for ; Mon, 24 Oct 2011 01:25:43 +0000 (UTC) (envelope-from edhoprima@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 430B18FC0C for ; Mon, 24 Oct 2011 01:25:42 +0000 (UTC) Received: by bkbzu17 with SMTP id zu17so9757832bkb.13 for ; Sun, 23 Oct 2011 18:25:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=fr70AnOhzsu0HWh1/ZFLzP6P4cpeyi3N+vo19rEE6zk=; b=kaDkKFlvqghlmUlXwot+6mpUYNRkXRszN9WOmyAHLqbp0y4eSQhhex1C09jdI7hXSo 5rzLKKJnqIxRC3m5c1ifkJljGIsJOeW5xjI/Axc3QgkVhUvFYAoF+2SPfv3+m4/xX0Hf 54I5DxH2DLDQIiL76xV88pEWaFkk7RnLTuJBE= Received: by 10.204.15.211 with SMTP id l19mr7989513bka.75.1319417859120; Sun, 23 Oct 2011 17:57:39 -0700 (PDT) MIME-Version: 1.0 Sender: edhoprima@gmail.com Received: by 10.204.53.195 with HTTP; Sun, 23 Oct 2011 17:57:19 -0700 (PDT) In-Reply-To: References: From: Edho Arief Date: Mon, 24 Oct 2011 00:57:19 +0000 X-Google-Sender-Auth: vcT3vJwSfpURazDffiSvtWI8IAE Message-ID: To: Larry Rosenman Content-Type: text/plain; charset=UTF-8 Cc: freebsd-fs@freebsd.org Subject: Re: Anyway to change pool to use the gpt label instead of gptid? 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: Mon, 24 Oct 2011 01:25:43 -0000 On Mon, Oct 24, 2011 at 12:52 AM, Larry Rosenman wrote: > Is there any way to convert this setup to use the GPT labels instead of the > the GPT UUID's in zpool status/zpool iostat? > try: kern.geom.label.gptid.enable="0" in /boot/loader.conf -- O< ascii ribbon campaign - stop html mail - www.asciiribbon.org From owner-freebsd-fs@FreeBSD.ORG Mon Oct 24 01:33:47 2011 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 34AA8106566C for ; Mon, 24 Oct 2011 01:33:47 +0000 (UTC) (envelope-from edhoprima@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id B87248FC13 for ; Mon, 24 Oct 2011 01:33:46 +0000 (UTC) Received: by bkbzu17 with SMTP id zu17so9765076bkb.13 for ; Sun, 23 Oct 2011 18:33:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=S29qrp0sR04nzrNuM/mh6gWTMNyxKtEJQtjDw8EH4eU=; b=QqfM4+BKHmePcHg9RzgzxamhTPRIx7g7DxZ48gFeTKh2FPqpHGXh3TuL3+oVFXhZoE 0p0t7ObAkDURUQlqmvf8ICCdUuoVylrenCwrlZJ1m0XTRh5EjUfWqI5pnjxlNlWSp97+ fbtvRhHfmd70FXPUL73pcAtq8a5lZpH7HqGu0= Received: by 10.204.13.131 with SMTP id c3mr15396641bka.10.1319420024130; Sun, 23 Oct 2011 18:33:44 -0700 (PDT) MIME-Version: 1.0 Sender: edhoprima@gmail.com Received: by 10.204.53.195 with HTTP; Sun, 23 Oct 2011 18:33:24 -0700 (PDT) In-Reply-To: References: From: Edho Arief Date: Mon, 24 Oct 2011 01:33:24 +0000 X-Google-Sender-Auth: eo06PkPTjanr9z2Jf3O5VMbAy7g Message-ID: To: Larry Rosenman Content-Type: text/plain; charset=UTF-8 Cc: freebsd-fs@freebsd.org Subject: Re: Anyway to change pool to use the gpt label instead of gptid? 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: Mon, 24 Oct 2011 01:33:47 -0000 On Mon, Oct 24, 2011 at 1:07 AM, Larry Rosenman wrote: > > Ideas? > actually I've given up trying to make gpt label work with zfs and just be happy with adaXpY. -- O< ascii ribbon campaign - stop html mail - www.asciiribbon.org From owner-freebsd-fs@FreeBSD.ORG Mon Oct 24 01:37:02 2011 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 C3F4F1065673; Mon, 24 Oct 2011 01:37:02 +0000 (UTC) (envelope-from ler@lerctr.org) Received: from thebighonker.lerctr.org (lrosenman-1-pt.tunnel.tserv8.dal1.ipv6.he.net [IPv6:2001:470:1f0e:3ad::2]) by mx1.freebsd.org (Postfix) with ESMTP id 871C78FC16; Mon, 24 Oct 2011 01:37:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lerctr.org; s=lerami; h=Content-Type:MIME-Version:References:Message-ID:In-Reply-To:Subject:cc:To:Sender:From:Date; bh=Z6rXBhiJLMVHzHX+B7eSJhbPGjb0A7r+ugpDfujOB3w=; b=iftBAX1tVb5kRjLZ1hfHK/hM/RhOVtlfd+HIidTgDlGlANqfRc5nG17Pc1pIS9FTae74eT2/Fc37qfkyRUuX2anjjkamOGNc9SncYuIOwyKHugymtYqIAD9d4oE9X8hZn18jihVmIrr7kH6c4rFH549pxkA0gA/LftvVd7QpZCA=; Received: from cpe-72-182-3-73.austin.res.rr.com ([72.182.3.73]:26242 helo=borg) by thebighonker.lerctr.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1RI9TI-000Jaf-GF; Sun, 23 Oct 2011 20:37:02 -0500 Date: Sun, 23 Oct 2011 20:36:53 -0500 (CDT) From: Larry Rosenman Sender: ler@borg To: Edho Arief In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Spam-Score: -2.7 (--) X-LERCTR-Spam-Score: -2.7 (--) X-Spam-Report: SpamScore (-2.7/5.0) ALL_TRUSTED=-1, BAYES_00=-1.9, TW_GP=0.077, TW_ZF=0.077 X-LERCTR-Spam-Report: SpamScore (-2.7/5.0) ALL_TRUSTED=-1, BAYES_00=-1.9, TW_GP=0.077, TW_ZF=0.077 Cc: freebsd-fs@freebsd.org, pjd@freebsd.org Subject: Re: Anyway to change pool to use the gpt label instead of gptid? 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: Mon, 24 Oct 2011 01:37:02 -0000 On Mon, 24 Oct 2011, Edho Arief wrote: > On Mon, Oct 24, 2011 at 1:07 AM, Larry Rosenman wrote: >> >> Ideas? >> > > actually I've given up trying to make gpt label work with zfs and just > be happy with adaXpY. > hehe. Yeah, unless you get lucky(tm), and it's not on a recreate, it DOES work, but doesn't stick. pjd: Ideas on making it prefer label over gptid or adaxpy? > -- Larry Rosenman http://www.lerctr.org/~ler Phone: +1 512-248-2683 E-Mail: ler@lerctr.org US Mail: 430 Valona Loop, Round Rock, TX 78681-3893 From owner-freebsd-fs@FreeBSD.ORG Mon Oct 24 01:46:20 2011 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 E681A1065675 for ; Mon, 24 Oct 2011 01:46:19 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from qmta10.westchester.pa.mail.comcast.net (qmta10.westchester.pa.mail.comcast.net [76.96.62.17]) by mx1.freebsd.org (Postfix) with ESMTP id 5D78F8FC15 for ; Mon, 24 Oct 2011 01:46:18 +0000 (UTC) Received: from omta15.westchester.pa.mail.comcast.net ([76.96.62.87]) by qmta10.westchester.pa.mail.comcast.net with comcast id oQpX1h0031swQuc5ARmKNP; Mon, 24 Oct 2011 01:46:19 +0000 Received: from koitsu.dyndns.org ([67.180.84.87]) by omta15.westchester.pa.mail.comcast.net with comcast id oRmJ1h00t1t3BNj3bRmJVP; Mon, 24 Oct 2011 01:46:19 +0000 Received: by icarus.home.lan (Postfix, from userid 1000) id C9D45102C1C; Sun, 23 Oct 2011 18:46:16 -0700 (PDT) Date: Sun, 23 Oct 2011 18:46:16 -0700 From: Jeremy Chadwick To: Larry Rosenman Message-ID: <20111024014616.GA57735@icarus.home.lan> References: <20111024011426.GA57172@icarus.home.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-fs@freebsd.org Subject: Re: Anyway to change pool to use the gpt label instead of gptid? 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: Mon, 24 Oct 2011 01:46:20 -0000 On Sun, Oct 23, 2011 at 08:24:54PM -0500, Larry Rosenman wrote: > On Sun, 23 Oct 2011, Jeremy Chadwick wrote: > > > > > > >Aren't GPT labels stored in the /dev/gpt directory structure? > Nope, they're eaten: > > $ ls /dev/gpt > swap0 > swap1 > swap2 > swap3 > swap4 > swap5 > $ This looks like a bug or design oddity in GEOM. Based on your setup you should have swap[0-5] and disk[0-5] in /dev/gpt, not just swap[0-5]. > >http://lists.freebsd.org/pipermail/freebsd-stable/2011-June/062999.html > Yep, changed it to the adaxpy form. You're misunderstanding. I'll try to explain it verbosely: kern.geom.label.gptid.enable="0" should, given the variable's description, disable creation of /dev/gptid/XXX entries (GPT IDs). So you set this variable, reboot the system, and guess what ZFS and GEOM does? It tastes the disks, finds the ZFS metadata, and associates each device via the adaXpX naming convention. This is normal. kern.geom.label.gpt.enable="0" (note the difference) should disable creation of /dev/gpt/XXX entries (GPT labels). I assume this variable is set to "1" on your system (the default value), which is why I say I cannot explain why /dev/gpt/disk[0-5] are missing. Use sysctl -d on both of these variables to see their descriptions. I got to thinking about your setup, and I need to ask you: what exactly are you accomplishing by wanting to use GPT labels for ZFS vdev member names? I cease to see what this gains. Here's why I say that. Let's pretend the quirk/problem/bug/whatever above isn't happening and you have lots of entries referencing /dev/gpt/disk[0-5] in your pool. Now one of these things happens: 1. Physical disk ada3 craps out. You replace the disk with a brand new one. You can tell ZFS about ada3p3. Happy days. 2. Physical disk ada3 craps out. You replace the disk and, for whatever reason, the device name changes. Because it's a new/fresh disk with no data on it, even "zpool import" isn't going to see any ZFS metadata on it. Let's say the new device is called "ada9" -- you're going to have to partition this thing anyway manually with gpart to set up your freebsd-boot, freebsd-swap, and freebsd-zfs partitions, right? Which means you already have to know in advance of those commands the disk is called "ada9". So you do your partitioning and you issue "zpool replace zroot ada3p3 ada9p3". Done. 3. Physical disk ada3 craps out. You replace the disk and, for whatever reason, insert what you thought was a new disk but was actually a previously-used disk which already has your above partitioning scheme on it. ZFS isn't going to magically start using the ZFS bits in ada3p3; you have to manually issue the command "zpool replace zroot ada3p3" and it will resilver/overwrite the "old" stuff that was there. I can continue to list off some more "sub-examples" of #3, but the fact of the matter is, ZFS on FreeBSD defaults to having pools with the "autoreplace" property disabled, so automatic resilver/rebuild won't happen on insertion. In fact, I'm under the impression "autoreplace" doesn't work on FreeBSD (how would CAM/GEOM/etc. "inform" ZFS?) So these are the only 3 scenarios I can think of. Am I missing one that somehow justifies the use of GPT labels named "diskX" when you already have things effectively called that (adaXpX)? I don't see the positives. Let me know, I'm quite curious. -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, US | | Making life hard for others since 1977. PGP 4BD6C0CB | From owner-freebsd-fs@FreeBSD.ORG Mon Oct 24 01:48:03 2011 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 923F01065674 for ; Mon, 24 Oct 2011 01:48:03 +0000 (UTC) (envelope-from artemb@gmail.com) Received: from mail-yx0-f182.google.com (mail-yx0-f182.google.com [209.85.213.182]) by mx1.freebsd.org (Postfix) with ESMTP id 546F38FC13 for ; Mon, 24 Oct 2011 01:48:03 +0000 (UTC) Received: by yxt33 with SMTP id 33so1918470yxt.13 for ; Sun, 23 Oct 2011 18:48:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=Z7TMR71EUVbgpCfCFoUyYwvN7h6WIN5nSMoT1aldc5Q=; b=ZOII+cVjCT1fFFKS1T+ReYaQfrbx6L4NpeOHY2zBdmyscN99U0a5cxr2bi0Y43/wTM G2pc34R3KCe05Yx9/PMIwoR3OSLXRz1NXFCbR7PsCibay9pqfOtf4DIru2ty5/x5XPgP LlyuGg9dKkKh3lgnDybG4N9R3H99DDg2i/82w= MIME-Version: 1.0 Received: by 10.236.72.132 with SMTP id t4mr1373222yhd.58.1319420882627; Sun, 23 Oct 2011 18:48:02 -0700 (PDT) Sender: artemb@gmail.com Received: by 10.236.103.175 with HTTP; Sun, 23 Oct 2011 18:48:02 -0700 (PDT) In-Reply-To: References: Date: Sun, 23 Oct 2011 18:48:02 -0700 X-Google-Sender-Auth: atQQBg2SRNFrbMqBgi2kSMAsG80 Message-ID: From: Artem Belevich To: Larry Rosenman Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-fs@freebsd.org Subject: Re: Anyway to change pool to use the gpt label instead of gptid? 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: Mon, 24 Oct 2011 01:48:03 -0000 On Sun, Oct 23, 2011 at 5:52 PM, Larry Rosenman wrote: > Is there any way to convert this setup to use the GPT labels instead of the > the GPT UUID's in zpool status/zpool iostat? You can try exporting the pool and then importing it back with "zfs import -d /dev/gpt" --Artem From owner-freebsd-fs@FreeBSD.ORG Mon Oct 24 01:49:42 2011 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 05474106564A; Mon, 24 Oct 2011 01:49:42 +0000 (UTC) (envelope-from ler@lerctr.org) Received: from thebighonker.lerctr.org (lrosenman-1-pt.tunnel.tserv8.dal1.ipv6.he.net [IPv6:2001:470:1f0e:3ad::2]) by mx1.freebsd.org (Postfix) with ESMTP id 8D2EC8FC13; Mon, 24 Oct 2011 01:49:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lerctr.org; s=lerami; h=Content-Type:MIME-Version:References:Message-ID:In-Reply-To:Subject:cc:To:Sender:From:Date; bh=UUQndP47eroaUMpHSP0NdsQObgJAnFIDZ6Sy0SnI17g=; b=tksqUEYaHvqwEv57EIZsI5k9NMaHLrPsXcQj5Xq0t/LHKG6V9NWq6CP3s8OKGr8IZ0+H7Jw5843lrrO3IOE2DdF5Zw2ImB/9mQtmeihoEzAGeVK63C/BTRfHPknYZwUudi9M43eCQblNOvZAZyAjdTzjb8VYEJzsRR91aiPjvVE=; Received: from cpe-72-182-3-73.austin.res.rr.com ([72.182.3.73]:50016 helo=borg) by thebighonker.lerctr.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1RI9fX-000Jji-Pk; Sun, 23 Oct 2011 20:49:41 -0500 Date: Sun, 23 Oct 2011 20:49:37 -0500 (CDT) From: Larry Rosenman Sender: ler@borg To: Artem Belevich In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Spam-Score: -2.8 (--) X-LERCTR-Spam-Score: -2.8 (--) X-Spam-Report: SpamScore (-2.8/5.0) ALL_TRUSTED=-1,BAYES_00=-1.9,TW_GP=0.077 X-LERCTR-Spam-Report: SpamScore (-2.8/5.0) ALL_TRUSTED=-1, BAYES_00=-1.9, TW_GP=0.077 Cc: freebsd-fs@freebsd.org Subject: Re: Anyway to change pool to use the gpt label instead of gptid? 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: Mon, 24 Oct 2011 01:49:42 -0000 On Sun, 23 Oct 2011, Artem Belevich wrote: > On Sun, Oct 23, 2011 at 5:52 PM, Larry Rosenman wrote: >> Is there any way to convert this setup to use the GPT labels instead of the >> the GPT UUID's in zpool status/zpool iostat? > > You can try exporting the pool and then importing it back with "zfs > import -d /dev/gpt" Really hard to do with root on this pool :) > > --Artem > -- Larry Rosenman http://www.lerctr.org/~ler Phone: +1 512-248-2683 E-Mail: ler@lerctr.org US Mail: 430 Valona Loop, Round Rock, TX 78681-3893 From owner-freebsd-fs@FreeBSD.ORG Mon Oct 24 01:53:26 2011 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 01F6C106566C for ; Mon, 24 Oct 2011 01:53:26 +0000 (UTC) (envelope-from ler@lerctr.org) Received: from thebighonker.lerctr.org (lrosenman-1-pt.tunnel.tserv8.dal1.ipv6.he.net [IPv6:2001:470:1f0e:3ad::2]) by mx1.freebsd.org (Postfix) with ESMTP id 9F1908FC0C for ; Mon, 24 Oct 2011 01:53:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lerctr.org; s=lerami; h=Content-Type:MIME-Version:References:Message-ID:In-Reply-To:Subject:cc:To:Sender:From:Date; bh=jJuHnIp3eHQ1iLgOcqSSKyIU7dYDEEqdNq1JOMk97v0=; b=miTfYIe/wXoNRex+0Q4NJy6HXSKFlNY4vJROwxGbwIxlkAYrpM+cI9JELPvnP1ShthgWhFYZnYgVjXUEYHg1cHRy6WnYWzcnMgrcv1Sivfz/hevUDEVrUtdv4n/o/FK36lUgsUSteR+M9X2c4sYzOB6cJnzdL/vVF5p4ENTF+mE=; Received: from cpe-72-182-3-73.austin.res.rr.com ([72.182.3.73]:46628 helo=borg) by thebighonker.lerctr.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1RI9j9-000Jnk-Ec; Sun, 23 Oct 2011 20:53:25 -0500 Date: Sun, 23 Oct 2011 20:53:22 -0500 (CDT) From: Larry Rosenman Sender: ler@borg To: Jeremy Chadwick In-Reply-To: <20111024014616.GA57735@icarus.home.lan> Message-ID: References: <20111024011426.GA57172@icarus.home.lan> <20111024014616.GA57735@icarus.home.lan> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Spam-Score: -1.6 (-) X-LERCTR-Spam-Score: -1.6 (-) X-Spam-Report: SpamScore (-1.6/5.0) ALL_TRUSTED=-1, BAYES_00=-1.9, FM_MULTI_ODD2=1.1, TW_GP=0.077, TW_PT=0.077, TW_ZF=0.077 X-LERCTR-Spam-Report: SpamScore (-1.6/5.0) ALL_TRUSTED=-1, BAYES_00=-1.9, FM_MULTI_ODD2=1.1, TW_GP=0.077, TW_PT=0.077, TW_ZF=0.077 Cc: freebsd-fs@freebsd.org Subject: Re: Anyway to change pool to use the gpt label instead of gptid? 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: Mon, 24 Oct 2011 01:53:26 -0000 On Sun, 23 Oct 2011, Jeremy Chadwick wrote: > On Sun, Oct 23, 2011 at 08:24:54PM -0500, Larry Rosenman wrote: >> On Sun, 23 Oct 2011, Jeremy Chadwick wrote: >> >>> >>> >>> Aren't GPT labels stored in the /dev/gpt directory structure? >> Nope, they're eaten: >> >> $ ls /dev/gpt >> swap0 >> swap1 >> swap2 >> swap3 >> swap4 >> swap5 >> $ > > This looks like a bug or design oddity in GEOM. Based on your setup you > should have swap[0-5] and disk[0-5] in /dev/gpt, not just swap[0-5]. > >>> http://lists.freebsd.org/pipermail/freebsd-stable/2011-June/062999.html >> Yep, changed it to the adaxpy form. > > You're misunderstanding. I'll try to explain it verbosely: > > kern.geom.label.gptid.enable="0" should, given the variable's > description, disable creation of /dev/gptid/XXX entries (GPT IDs). So > you set this variable, reboot the system, and guess what ZFS and GEOM > does? It tastes the disks, finds the ZFS metadata, and associates each > device via the adaXpX naming convention. This is normal. kern.geom.label.debug: 0 kern.geom.label.ext2fs.enable: 1 kern.geom.label.iso9660.enable: 1 kern.geom.label.msdosfs.enable: 1 kern.geom.label.ntfs.enable: 1 kern.geom.label.reiserfs.enable: 1 kern.geom.label.ufs.enable: 1 kern.geom.label.ufsid.enable: 1 kern.geom.label.gptid.enable: 0 kern.geom.label.gpt.enable: 1 > > kern.geom.label.gpt.enable="0" (note the difference) should disable > creation of /dev/gpt/XXX entries (GPT labels). I assume this variable > is set to "1" on your system (the default value), which is why I say > I cannot explain why /dev/gpt/disk[0-5] are missing. I believe there is code that I've seen in the gptzfsloader or gptzfsboot code that REMOVES the labels of devices that it finds on the pool. I can't remember exactly where, but I've seen it somewhere. > > Use sysctl -d on both of these variables to see their descriptions. > > I got to thinking about your setup, and I need to ask you: what exactly > are you accomplishing by wanting to use GPT labels for ZFS vdev member > names? I cease to see what this gains. Here's why I say that. Let's > pretend the quirk/problem/bug/whatever above isn't happening and you > have lots of entries referencing /dev/gpt/disk[0-5] in your pool. Now > one of these things happens: > > 1. Physical disk ada3 craps out. You replace the disk with a brand new > one. You can tell ZFS about ada3p3. Happy days. > > 2. Physical disk ada3 craps out. You replace the disk and, for whatever > reason, the device name changes. Because it's a new/fresh disk with no > data on it, even "zpool import" isn't going to see any ZFS metadata on > it. > > Let's say the new device is called "ada9" -- you're going to have to > partition this thing anyway manually with gpart to set up your > freebsd-boot, freebsd-swap, and freebsd-zfs partitions, right? Which > means you already have to know in advance of those commands the disk is > called "ada9". > > So you do your partitioning and you issue "zpool replace zroot ada3p3 > ada9p3". Done. > > 3. Physical disk ada3 craps out. You replace the disk and, for whatever > reason, insert what you thought was a new disk but was actually a > previously-used disk which already has your above partitioning scheme on > it. ZFS isn't going to magically start using the ZFS bits in ada3p3; > you have to manually issue the command "zpool replace zroot ada3p3" and > it will resilver/overwrite the "old" stuff that was there. > > I can continue to list off some more "sub-examples" of #3, but the fact > of the matter is, ZFS on FreeBSD defaults to having pools with the > "autoreplace" property disabled, so automatic resilver/rebuild won't > happen on insertion. In fact, I'm under the impression "autoreplace" > doesn't work on FreeBSD (how would CAM/GEOM/etc. "inform" ZFS?) > > So these are the only 3 scenarios I can think of. Am I missing one that > somehow justifies the use of GPT labels named "diskX" when you already > have things effectively called that (adaXpX)? I don't see the > positives. Let me know, I'm quite curious. It's a "cleanliness" thing. I do see your points. The gptid/* names make zpool status not fit in a default 80x25 screen, but the adaxpy names are ok. It's just annoying, that's all. Thanks for the comments. > > -- Larry Rosenman http://www.lerctr.org/~ler Phone: +1 512-248-2683 E-Mail: ler@lerctr.org US Mail: 430 Valona Loop, Round Rock, TX 78681-3893 From owner-freebsd-fs@FreeBSD.ORG Mon Oct 24 01:58:56 2011 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 2ED7C106566B; Mon, 24 Oct 2011 01:58:56 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from mail.allbsd.org (gatekeeper-int.allbsd.org [IPv6:2001:2f0:104:e002::2]) by mx1.freebsd.org (Postfix) with ESMTP id 87D4A8FC13; Mon, 24 Oct 2011 01:58:55 +0000 (UTC) Received: from alph.allbsd.org ([IPv6:2001:2f0:104:e010:862b:2bff:febc:8956]) (authenticated bits=128) by mail.allbsd.org (8.14.4/8.14.4) with ESMTP id p9O1weLW018207; Mon, 24 Oct 2011 10:58:50 +0900 (JST) (envelope-from hrs@FreeBSD.org) Received: from localhost (localhost [IPv6:::1]) (authenticated bits=0) by alph.allbsd.org (8.14.4/8.14.4) with ESMTP id p9O1wc1s040754; Mon, 24 Oct 2011 10:58:39 +0900 (JST) (envelope-from hrs@FreeBSD.org) Date: Mon, 24 Oct 2011 10:57:47 +0900 (JST) Message-Id: <20111024.105747.1668149913902320230.hrs@allbsd.org> To: ler@lerctr.org From: Hiroki Sato In-Reply-To: References: X-PGPkey-fingerprint: BDB3 443F A5DD B3D0 A530 FFD7 4F2C D3D8 2793 CF2D X-Mailer: Mew version 6.3.51 on Emacs 23.3 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Multipart/Signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="--Security_Multipart(Mon_Oct_24_10_57_47_2011_462)--" Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.97 at gatekeeper.allbsd.org X-Virus-Status: Clean X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.3 (mail.allbsd.org [IPv6:2001:2f0:104:e001::32]); Mon, 24 Oct 2011 10:58:50 +0900 (JST) X-Spam-Status: No, score=-104.6 required=13.0 tests=BAYES_00, CONTENT_TYPE_PRESENT, RDNS_NONE, SPF_SOFTFAIL, USER_IN_WHITELIST autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on gatekeeper.allbsd.org Cc: freebsd-fs@FreeBSD.org, pjd@FreeBSD.org Subject: Re: Anyway to change pool to use the gpt label instead of gptid? 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: Mon, 24 Oct 2011 01:58:56 -0000 ----Security_Multipart(Mon_Oct_24_10_57_47_2011_462)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Larry Rosenman wrote in : le> On Mon, 24 Oct 2011, Edho Arief wrote: le> le> > On Mon, Oct 24, 2011 at 1:07 AM, Larry Rosenman le> > wrote: le> >> le> >> Ideas? le> >> le> > le> > actually I've given up trying to make gpt label work with zfs and just le> > be happy with adaXpY. le> > le> hehe. Yeah, unless you get lucky(tm), and it's not on a recreate, it le> DOES le> work, but doesn't stick. Does the following work for you? # zpool export zroot # zpool import -d /dev/gpt zroot -- Hiroki ----Security_Multipart(Mon_Oct_24_10_57_47_2011_462)-- Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEABECAAYFAk6kxhsACgkQTyzT2CeTzy31XACgqzgTdGUFyK3Kx3vNm4u3/+sC xQ4AmwTcLIaA6ZgGvZSyey09WejKUzOO =8QtD -----END PGP SIGNATURE----- ----Security_Multipart(Mon_Oct_24_10_57_47_2011_462)---- From owner-freebsd-fs@FreeBSD.ORG Mon Oct 24 02:00:47 2011 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 574561065674; Mon, 24 Oct 2011 02:00:47 +0000 (UTC) (envelope-from ler@lerctr.org) Received: from thebighonker.lerctr.org (lrosenman-1-pt.tunnel.tserv8.dal1.ipv6.he.net [IPv6:2001:470:1f0e:3ad::2]) by mx1.freebsd.org (Postfix) with ESMTP id 184E08FC0C; Mon, 24 Oct 2011 02:00:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lerctr.org; s=lerami; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:To:From:Subject:Date:References:In-Reply-To:Message-ID; bh=I0mQXA96sNLPlnLmlJwY9eZNbMAfur+GaODjJ2bxZ14=; b=HIxiTeBsQxPuxMn1VBAWJjb3er6Uz0kSV6Kf6JGEfxGNN7b605KwOBVZn8dVYUFr0DhnSDGNtjGjiVX2n7HsNTmfWIHj/9Ilpqq4iivGdZ/ncQF6zjgdPb5srqexoVFn4cu5DKEr6goaT+b0zwUCIeq5TQZqBSbIGBhIT6SoX0E=; Received: from localhost.lerctr.org ([127.0.0.1]:10767 helo=webmail.lerctr.org) by thebighonker.lerctr.org with esmtp (Exim 4.77 (FreeBSD)) (envelope-from ) id 1RI9qH-000Jtt-2N; Sun, 23 Oct 2011 21:00:46 -0500 Received: from 72.182.3.73 (SquirrelMail authenticated user ler) by webmail.lerctr.org with HTTP; Sun, 23 Oct 2011 21:00:45 -0500 Message-ID: <232c55006eccb4a7a0e4bd1524da0192.squirrel@webmail.lerctr.org> In-Reply-To: <20111024.105747.1668149913902320230.hrs@allbsd.org> References: <20111024.105747.1668149913902320230.hrs@allbsd.org> Date: Sun, 23 Oct 2011 21:00:45 -0500 From: "Larry Rosenman" To: "Hiroki Sato" User-Agent: SquirrelMail/1.4.21 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-Spam-Score: -3.2 (---) X-LERCTR-Spam-Score: -3.2 (---) X-Spam-Report: SpamScore (-3.2/5.0) ALL_TRUSTED=-1, BAYES_00=-1.9, RP_MATCHES_RCVD=-0.504, TW_GP=0.077, TW_ZF=0.077 X-LERCTR-Spam-Report: SpamScore (-3.2/5.0) ALL_TRUSTED=-1, BAYES_00=-1.9, RP_MATCHES_RCVD=-0.504, TW_GP=0.077, TW_ZF=0.077 Cc: freebsd-fs@freebsd.org, pjd@freebsd.org Subject: Re: Anyway to change pool to use the gpt label instead of gptid? 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: Mon, 24 Oct 2011 02:00:47 -0000 On Sun, October 23, 2011 8:57 pm, Hiroki Sato wrote: > Larry Rosenman wrote > in : > > le> On Mon, 24 Oct 2011, Edho Arief wrote: > le> > le> > On Mon, Oct 24, 2011 at 1:07 AM, Larry Rosenman > le> > wrote: > le> >> > le> >> Ideas? > le> >> > le> > > le> > actually I've given up trying to make gpt label work with zfs and > just > le> > be happy with adaXpY. > le> > > le> hehe. Yeah, unless you get lucky(tm), and it's not on a recreate, it > le> DOES > le> work, but doesn't stick. > > Does the following work for you? > > # zpool export zroot > # zpool import -d /dev/gpt zroot > > -- Hiroki > Can't do that, as root is on this zfs pool. # zpool export zroot cannot unmount '/var/run': Device busy # zpool import -d /dev/gpt zroot cannot import 'zroot': a pool with that name is already created/imported, and no additional pools with that name were found # -- Larry Rosenman http://www.lerctr.org/~ler Phone: +1 512-248-2683 E-Mail: ler@lerctr.org US Mail: 430 Valona Loop, Round Rock, TX 78681-3893 From owner-freebsd-fs@FreeBSD.ORG Mon Oct 24 02:01:32 2011 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 4F95F1065673 for ; Mon, 24 Oct 2011 02:01:32 +0000 (UTC) (envelope-from artemb@gmail.com) Received: from mail-gy0-f182.google.com (mail-gy0-f182.google.com [209.85.160.182]) by mx1.freebsd.org (Postfix) with ESMTP id 0F8E08FC1F for ; Mon, 24 Oct 2011 02:01:31 +0000 (UTC) Received: by gyd8 with SMTP id 8so6866077gyd.13 for ; Sun, 23 Oct 2011 19:01:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=I3q9Ko0Hxh5pL6x9boS2gbV3KV2uUS9g8Eg5L8HbFeY=; b=GKB9hQkMi6T1oT7/rrlZyTYB04aGVFwykiqCt4KLMz1N9EyhIJEcaZBvyGIlm7mhkr gmoAtLZT3hRJwPIpUT5mA33QAQS4E9exScLRUgLS9MWq+i1+PuXgVX2m144nhsaVnOyM octDZJHls/0lQZNpqxWZ6s96pKpwMAgFbEjNE= MIME-Version: 1.0 Received: by 10.236.191.71 with SMTP id f47mr3032851yhn.7.1319421691212; Sun, 23 Oct 2011 19:01:31 -0700 (PDT) Sender: artemb@gmail.com Received: by 10.236.103.175 with HTTP; Sun, 23 Oct 2011 19:01:31 -0700 (PDT) In-Reply-To: References: Date: Sun, 23 Oct 2011 19:01:31 -0700 X-Google-Sender-Auth: VCcjK6XWDhKVTsyX8ukQ62S5axE Message-ID: From: Artem Belevich To: Larry Rosenman Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-fs@freebsd.org Subject: Re: Anyway to change pool to use the gpt label instead of gptid? 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: Mon, 24 Oct 2011 02:01:32 -0000 On Sun, Oct 23, 2011 at 6:49 PM, Larry Rosenman wrote: > On Sun, 23 Oct 2011, Artem Belevich wrote: > >> On Sun, Oct 23, 2011 at 5:52 PM, Larry Rosenman wrote: >>> >>> Is there any way to convert this setup to use the GPT labels instead of >>> the >>> the GPT UUID's in zpool status/zpool iostat? >> >> You can try exporting the pool and then importing it back with "zfs >> import -d /dev/gpt" > > Really hard to do with root on this pool :) You may be able to solve that part with LiveCD. I'm still not quite sure where device info is kept -- in the pool or in /boot/zfs/zpool.cache. You may need to copy zpool.cache to its real place in your pool once you import the pool while running LiveCD. --Artem From owner-freebsd-fs@FreeBSD.ORG Mon Oct 24 02:16:05 2011 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 426171065676 for ; Mon, 24 Oct 2011 02:16:05 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from qmta14.emeryville.ca.mail.comcast.net (qmta14.emeryville.ca.mail.comcast.net [76.96.27.212]) by mx1.freebsd.org (Postfix) with ESMTP id 2740D8FC15 for ; Mon, 24 Oct 2011 02:16:04 +0000 (UTC) Received: from omta24.emeryville.ca.mail.comcast.net ([76.96.30.92]) by qmta14.emeryville.ca.mail.comcast.net with comcast id oRY01h0031zF43QAESFxm6; Mon, 24 Oct 2011 02:15:57 +0000 Received: from koitsu.dyndns.org ([67.180.84.87]) by omta24.emeryville.ca.mail.comcast.net with comcast id oSH31h00R1t3BNj8kSH37a; Mon, 24 Oct 2011 02:17:04 +0000 Received: by icarus.home.lan (Postfix, from userid 1000) id F1FA7102C1C; Sun, 23 Oct 2011 19:16:03 -0700 (PDT) Date: Sun, 23 Oct 2011 19:16:03 -0700 From: Jeremy Chadwick To: Artem Belevich Message-ID: <20111024021603.GA58557@icarus.home.lan> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-fs@freebsd.org Subject: Re: Anyway to change pool to use the gpt label instead of gptid? 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: Mon, 24 Oct 2011 02:16:05 -0000 On Sun, Oct 23, 2011 at 07:01:31PM -0700, Artem Belevich wrote: > On Sun, Oct 23, 2011 at 6:49 PM, Larry Rosenman wrote: > > On Sun, 23 Oct 2011, Artem Belevich wrote: > > > >> On Sun, Oct 23, 2011 at 5:52 PM, Larry Rosenman wrote: > >>> > >>> Is there any way to convert this setup to use the GPT labels instead of > >>> the > >>> the GPT UUID's in zpool status/zpool iostat? > >> > >> You can try exporting the pool and then importing it back with "zfs > >> import -d /dev/gpt" > > > > Really hard to do with root on this pool :) > > You may be able to solve that part with LiveCD. I'm still not quite > sure where device info is kept -- in the pool or in > /boot/zfs/zpool.cache. ... Both. icarus# zpool status data pool: data state: ONLINE scan: resilvered 279G in 1h0m with 0 errors on Thu Aug 11 22:43:38 2011 config: NAME STATE READ WRITE CKSUM data ONLINE 0 0 0 mirror-0 ONLINE 0 0 0 ada1 ONLINE 0 0 0 ada3 ONLINE 0 0 0 errors: No known data errors icarus# strings /boot/zfs/zpool.cache | egrep 'ada[13]' /dev/ada1 /dev/ada1 /dev/ada3 /dev/ada3 icarus# dd if=/dev/ada1 of=/dev/stdout count=128 | strings | grep 'ada1' 128+0 records in 128+0 records out 65536 bytes transferred in 0.013422 secs (4882725 bytes/sec) /dev/ada1 /dev/ada1 icarus# dd if=/dev/ada3 of=/dev/stdout count=128 | strings | grep 'ada3' 128+0 records in 128+0 records out 65536 bytes transferred in 0.023449 secs (2794838 bytes/sec) /dev/ada3 /dev/ada3 Larry, have you considered avoiding ZFS on root and instead just using gmirror on your OS partition (not the entire disk, and not the swap partition)? I've read that gmirror "just works" and is reliable, including booting from it, and supports hot spares. Thought I remember there being some caveat to swap being stored under gmirror -- the man page mentions caveats that relate to getting kernel panics/dumps -- so that may be a problem. Using multiple partitions and mirroring only the UFS/UFS2 partition sounds like a better choice. I know it would be ideal to have it all controlled with ZFS, I understand/hear you (especially since I just got done harping on added complexity, re: GPT labels vs. device names), but welcome to the mess. -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, US | | Making life hard for others since 1977. PGP 4BD6C0CB | From owner-freebsd-fs@FreeBSD.ORG Mon Oct 24 02:25:13 2011 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 422EF106564A; Mon, 24 Oct 2011 02:25:13 +0000 (UTC) (envelope-from ler@lerctr.org) Received: from thebighonker.lerctr.org (lrosenman-1-pt.tunnel.tserv8.dal1.ipv6.he.net [IPv6:2001:470:1f0e:3ad::2]) by mx1.freebsd.org (Postfix) with ESMTP id DE8158FC13; Mon, 24 Oct 2011 02:25:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lerctr.org; s=lerami; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:References:Subject:CC:To:MIME-Version:From:Date:Message-ID; bh=dqh1xyQgryaPeP0qLbFXVB5hfW27yyarjcNSYKj+McM=; b=u5CEn+C/ne4RhgcXMtVEYXOA5c6KWBXZ9kfJIrtgeLHjbOkDC9OKPSVFsYMdK498MlEaRCelbaCy8Tq0qTDAtNuDgxauCAtkPyfJ2fVVikDTcNFf+rXzXPDKLCDq8MVE8pKkpRIAR8P/LXY+mRtAsT3DcteJa1SO9r1p4fAuCPA=; Received: from cpe-72-182-3-73.austin.res.rr.com ([72.182.3.73]:50306 helo=[192.168.200.103]) by thebighonker.lerctr.org with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1RIADu-000KBF-Og; Sun, 23 Oct 2011 21:25:12 -0500 Message-ID: <4EA4CC87.7010603@lerctr.org> Date: Sun, 23 Oct 2011 21:25:11 -0500 From: Larry Rosenman User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 MIME-Version: 1.0 To: Jeremy Chadwick References: <20111024021603.GA58557@icarus.home.lan> In-Reply-To: <20111024021603.GA58557@icarus.home.lan> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -2.8 (--) X-LERCTR-Spam-Score: -2.8 (--) X-Spam-Report: SpamScore (-2.8/5.0) ALL_TRUSTED=-1,BAYES_00=-1.9,TW_GP=0.077 X-LERCTR-Spam-Report: SpamScore (-2.8/5.0) ALL_TRUSTED=-1, BAYES_00=-1.9, TW_GP=0.077 Cc: freebsd-fs@freebsd.org Subject: Re: Anyway to change pool to use the gpt label instead of gptid? 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: Mon, 24 Oct 2011 02:25:13 -0000 On 10/23/2011 9:16 PM, Jeremy Chadwick wrote: > On Sun, Oct 23, 2011 at 07:01:31PM -0700, Artem Belevich wrote: >> On Sun, Oct 23, 2011 at 6:49 PM, Larry Rosenman wrote: >>> On Sun, 23 Oct 2011, Artem Belevich wrote: >>> >>>> On Sun, Oct 23, 2011 at 5:52 PM, Larry Rosenman wrote: >>>>> Is there any way to convert this setup to use the GPT labels instead of >>>>> the >>>>> the GPT UUID's in zpool status/zpool iostat? >>>> You can try exporting the pool and then importing it back with "zfs >>>> import -d /dev/gpt" >>> Really hard to do with root on this pool :) >> You may be able to solve that part with LiveCD. I'm still not quite >> sure where device info is kept -- in the pool or in >> /boot/zfs/zpool.cache. ... > Both. > > icarus# zpool status data > pool: data > state: ONLINE > scan: resilvered 279G in 1h0m with 0 errors on Thu Aug 11 22:43:38 2011 > config: > > NAME STATE READ WRITE CKSUM > data ONLINE 0 0 0 > mirror-0 ONLINE 0 0 0 > ada1 ONLINE 0 0 0 > ada3 ONLINE 0 0 0 > > errors: No known data errors > > icarus# strings /boot/zfs/zpool.cache | egrep 'ada[13]' > /dev/ada1 > /dev/ada1 > /dev/ada3 > /dev/ada3 > > icarus# dd if=/dev/ada1 of=/dev/stdout count=128 | strings | grep 'ada1' > 128+0 records in > 128+0 records out > 65536 bytes transferred in 0.013422 secs (4882725 bytes/sec) > /dev/ada1 > /dev/ada1 > > icarus# dd if=/dev/ada3 of=/dev/stdout count=128 | strings | grep 'ada3' > 128+0 records in > 128+0 records out > 65536 bytes transferred in 0.023449 secs (2794838 bytes/sec) > /dev/ada3 > /dev/ada3 > > Larry, have you considered avoiding ZFS on root and instead just using > gmirror on your OS partition (not the entire disk, and not the swap > partition)? I've read that gmirror "just works" and is reliable, > including booting from it, and supports hot spares. > > Thought I remember there being some caveat to swap being stored under > gmirror -- the man page mentions caveats that relate to getting kernel > panics/dumps -- so that may be a problem. Using multiple partitions and > mirroring only the UFS/UFS2 partition sounds like a better choice. > > I know it would be ideal to have it all controlled with ZFS, I > understand/hear you (especially since I just got done harping on added > complexity, re: GPT labels vs. device names), but welcome to the mess. I just got out of a ufs+zfs setup. And I like the idea of being able to use all of the disk space as ZFS, and replacing ANY drive that dies and not losing data (yes, I know, raidz1 only handles one failure at a time, but that's fine). (current is 5x400g, 1x500g disk). I intend at some point of replacing them all with 2T or 3T disks, and then leave it alone for a while. I think I'll just deal with the adaxpy names (via kern.geom.label.gptid.enable="0" in /boot/loader.conf), and just deal with it. I think it would be nice to have the zfs/gpt/loader/boot have a knob to prefer the label vs the physical device name. It is VERY unlikely that the physical name will change ON THIS SERVER, since it only has 6 SATA ports on it (supermicro 7045B-TR+ system http://www.supermicro.com/products/system/4U/7045/SYS-7045B-TR_.cfm). Appreciate everyone's comments. I didn't know about the tunable, which helps somewhat. From owner-freebsd-fs@FreeBSD.ORG Mon Oct 24 02:41:32 2011 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 EEA74106568A for ; Mon, 24 Oct 2011 02:41:32 +0000 (UTC) (envelope-from edhoprima@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 74B9C8FC12 for ; Mon, 24 Oct 2011 02:41:32 +0000 (UTC) Received: by bkbzu17 with SMTP id zu17so9831288bkb.13 for ; Sun, 23 Oct 2011 19:41:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=Nf3Q/DY4GJ0vXsbhj2D/KHujkWTfC/35HuWB9T8J7XI=; b=jIZWZ2bYUcXhfNeWQa9Aw1L3NTZ8s3C5p9m2tmdO2U2D4Ex0V/Vu+WPONlYVu5q1Fd Bs4GH191kTFS1Kw7LidsYbKg7cNOYBbZgaSKvwmOZK1wXC58GLKgq0amJZS8CaLieuVf 7hORs5UScY8MrYMLAQcCMb70XvX30GTzQJeNc= Received: by 10.204.8.71 with SMTP id g7mr15554847bkg.101.1319424091164; Sun, 23 Oct 2011 19:41:31 -0700 (PDT) MIME-Version: 1.0 Sender: edhoprima@gmail.com Received: by 10.204.53.195 with HTTP; Sun, 23 Oct 2011 19:41:11 -0700 (PDT) In-Reply-To: <20111024014616.GA57735@icarus.home.lan> References: <20111024011426.GA57172@icarus.home.lan> <20111024014616.GA57735@icarus.home.lan> From: Edho Arief Date: Mon, 24 Oct 2011 09:41:11 +0700 X-Google-Sender-Auth: pR8n8XswPHKOx0wm85vk91pjHjA Message-ID: To: Jeremy Chadwick Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-fs@freebsd.org Subject: Re: Anyway to change pool to use the gpt label instead of gptid? 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: Mon, 24 Oct 2011 02:41:33 -0000 On Mon, Oct 24, 2011 at 8:46 AM, Jeremy Chadwick wrote: > kern.geom.label.gpt.enable=3D"0" (note the difference) should disable > creation of /dev/gpt/XXX entries (GPT labels). =C2=A0I assume this variab= le > is set to "1" on your system (the default value), which is why I say > I cannot explain why /dev/gpt/disk[0-5] are missing. > >From what I can tell, accessing /dev/adaXpY removes entry in /dev/gpt/itslabel and zfs searches disks first in /dev/gptid and then /dev/ and then probably finally /dev/(label|gpt)/. --=20 O< ascii ribbon campaign - stop html mail - www.asciiribbon.org From owner-freebsd-fs@FreeBSD.ORG Mon Oct 24 05:34:56 2011 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 EB350106566B for ; Mon, 24 Oct 2011 05:34:56 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.dawidek.net (60.wheelsystems.com [83.12.187.60]) by mx1.freebsd.org (Postfix) with ESMTP id 83A058FC0A for ; Mon, 24 Oct 2011 05:34:56 +0000 (UTC) Received: from localhost (89-73-195-149.dynamic.chello.pl [89.73.195.149]) by mail.dawidek.net (Postfix) with ESMTPSA id F1B087C8; Mon, 24 Oct 2011 07:34:53 +0200 (CEST) Date: Mon, 24 Oct 2011 07:34:06 +0200 From: Pawel Jakub Dawidek To: Larry Rosenman Message-ID: <20111024053405.GJ1697@garage.freebsd.pl> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="PEkEgRdBLZYkpbX2" Content-Disposition: inline In-Reply-To: X-OS: FreeBSD 9.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-fs@freebsd.org Subject: Re: Anyway to change pool to use the gpt label instead of gptid? 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: Mon, 24 Oct 2011 05:34:57 -0000 --PEkEgRdBLZYkpbX2 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Oct 23, 2011 at 07:52:08PM -0500, Larry Rosenman wrote: > Is there any way to convert this setup to use the GPT labels instead of t= he the=20 > GPT UUID's in zpool status/zpool iostat? When you create your pool using GPT labels, it will prefer them over anything else on import. If it cannot find labels, it will switch to something else that looks like your VDEVs. If you want to switch to GPT labels when your pool already exist and you cannot export it (it holds root file system), you can create GPT labels with gpart(8), disable GPTIDs by adding the following line to /boot/loader.conf: kern.geom.label.gptid.enable=3D0 Then you reboot and hope for the best. It will either pick GPT labels or adap. --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://yomoli.com --PEkEgRdBLZYkpbX2 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAk6k+M0ACgkQForvXbEpPzRr2ACg60hp1u/HcqUAtyvXmG33nETp /zYAoOaCgC+wsFcoQgYSI9gdDLouhnRr =2boc -----END PGP SIGNATURE----- --PEkEgRdBLZYkpbX2-- From owner-freebsd-fs@FreeBSD.ORG Mon Oct 24 05:39:59 2011 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 B9E87106566C for ; Mon, 24 Oct 2011 05:39:59 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.dawidek.net (60.wheelsystems.com [83.12.187.60]) by mx1.freebsd.org (Postfix) with ESMTP id 6CA5A8FC17 for ; Mon, 24 Oct 2011 05:39:59 +0000 (UTC) Received: from localhost (89-73-195-149.dynamic.chello.pl [89.73.195.149]) by mail.dawidek.net (Postfix) with ESMTPSA id 982F17CD; Mon, 24 Oct 2011 07:39:57 +0200 (CEST) Date: Mon, 24 Oct 2011 07:39:10 +0200 From: Pawel Jakub Dawidek To: Jeremy Chadwick Message-ID: <20111024053909.GK1697@garage.freebsd.pl> References: <20111024011426.GA57172@icarus.home.lan> <20111024014616.GA57735@icarus.home.lan> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ee6FjwWxuMujAVRe" Content-Disposition: inline In-Reply-To: <20111024014616.GA57735@icarus.home.lan> X-OS: FreeBSD 9.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-fs@freebsd.org Subject: Re: Anyway to change pool to use the gpt label instead of gptid? 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: Mon, 24 Oct 2011 05:39:59 -0000 --ee6FjwWxuMujAVRe Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Oct 23, 2011 at 06:46:16PM -0700, Jeremy Chadwick wrote: > On Sun, Oct 23, 2011 at 08:24:54PM -0500, Larry Rosenman wrote: > > On Sun, 23 Oct 2011, Jeremy Chadwick wrote: > >=20 > > > > > > > > >Aren't GPT labels stored in the /dev/gpt directory structure? > > Nope, they're eaten: > >=20 > > $ ls /dev/gpt > > swap0 > > swap1 > > swap2 > > swap3 > > swap4 > > swap5 > > $ >=20 > This looks like a bug or design oddity in GEOM. Based on your setup you > should have swap[0-5] and disk[0-5] in /dev/gpt, not just swap[0-5]. Not in GEOM, but in GPT labels implementation. It should be part of PART class, not LABEL class. Because of this, when one opens corresponding adap for writing, both gpt/