From owner-freebsd-current@FreeBSD.ORG Tue Oct 25 14:35:12 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D0FA9106564A for ; Tue, 25 Oct 2011 14:35:12 +0000 (UTC) (envelope-from ndenev@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 598C28FC08 for ; Tue, 25 Oct 2011 14:35:12 +0000 (UTC) Received: by faar19 with SMTP id r19so828690faa.13 for ; Tue, 25 Oct 2011 07:35:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; bh=G6XkcWY1d0isj/zxBewIjqSnZJF6jSud2x9f/79w/2M=; b=jnFIhWW6TXqWUMZkYoEzb7SKtyIVcxoVx2SliFLYpNDT//O1gZvjppcunakfjcQ2G6 ElbUtvAB2tZmeF740muEqZCKHtGgTeuo2IbzmVtGrHUjYFSD2XJPUpieoKUppJwnhXB1 Eyt+IqAUxwJoC0dG5wgLeyJAYcUB8V9rEfZQQ= Received: by 10.223.15.13 with SMTP id i13mr15168895faa.36.1319553311340; Tue, 25 Oct 2011 07:35:11 -0700 (PDT) Received: from ndenevsa.sf.moneybookers.net (g1.moneybookers.com. [217.18.249.148]) by mx.google.com with ESMTPS id t19sm2261120fac.0.2011.10.25.07.35.08 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 25 Oct 2011 07:35:09 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v1251.1) Content-Type: text/plain; charset=iso-8859-1 From: Nikolay Denev In-Reply-To: Date: Tue, 25 Oct 2011 17:35:08 +0300 Content-Transfer-Encoding: quoted-printable Message-Id: <7FE0AE74-7C29-4DD0-8EBA-F2BB70F3CB97@gmail.com> References: To: Jason Edwards X-Mailer: Apple Mail (2.1251.1) Cc: freebsd-current@freebsd.org Subject: Re: Problems with "ada0: Previously was known as ad6" functionality X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Oct 2011 14:35:13 -0000 On Oct 25, 2011, at 4:38 PM, Jason Edwards wrote: > Hello list, >=20 > I'm working on ZFSguru, a FreeNAS-like distribution based on FreeBSD > that focuses on NAS or Network Attached Storage functionality, > sporting a web-interface et al. >=20 > I've been building FreeBSD 9.0-RC1, and put together a LiveCD using my > own scripts. It works, and boots fine in Virtualbox just like the > other LiveCDs. Though I discovered a problem. >=20 > It appears that some new functionality was put in 9.x to 'symlink' the > new 'ada' devices using AHCI driver to the old-fashioned 'ad' (ATA) > device names, probably to make migration of ATA to AHCI driver more > convenient for users still using hardcoded devices in /etc/fstab > (shame on you!). However, I suspect this is causing a nasty > side-effect, because after having created a GPT partition with a ZFS > pool on it, I cannot import it once I reboot fresh from the LiveCD, > with 'zpool import' showing a corrupt pool. I've seen this before and > generally it means that ZFS cannot read data or that GEOM does funny > things. In this case, it could be that ad6 and ada0 both contain the > same metadata, which somehow causes ZFS to go beserk. >=20 > I would like to debug this issue, but for that I need to disable the > 'ada0 to ad6' symlinking functionality. I've searched for a sysctl > variable which can disable this behavior, but have not found it. > Anyone can enlighten me how I can disable this behavior, so that I > only get /dev/ada0 and no ad6? If the zpool import works again after > that change, this would confirm my suspicions that this behavior is > causing the zpool import command to fail. >=20 > I'm using FreeBSD 9.0-RC1 fetched this morning as RELENG_9, uname: > # uname -a > FreeBSD zfsguru.bsd 9.0-RC1 FreeBSD 9.0-RC1 #0: Tue Oct 25 07:13:52 > UTC 2011 ssh@zfsguru:/usr/obj/usr/src/sys/GENERIC amd64 >=20 >=20 > Relevant command output: >=20 > # dmesg | grep ad > (..) > ada0: Previously was known as ad6 >=20 > # ls -l /dev/ad* > lrwxr-xr-x 1 root wheel 4 Oct 25 13:21 /dev/ad6 -> ada0 > lrwxr-xr-x 1 root wheel 6 Oct 25 13:21 /dev/ad6p1 -> = ada0p1 > crw-r----- 1 root operator 0, 73 Oct 25 13:20 /dev/ada0 > crw-r----- 1 root operator 0, 75 Oct 25 13:20 /dev/ada0p1 >=20 > # glabel status > Name Status Components > (..) > gpt/testdisk N/A ada0p1 >=20 > # zpool import > pool: tank > id: 17935188179790554412 > state: FAULTED > status: One or more devices contains corrupted data. > action: The pool cannot be imported due to damaged devices or data. > The pool may be active on another system, but can be imported = using > the '-f' flag. > see: http://www.sun.com/msg/ZFS-8000-5E > config: >=20 > tank FAULTED corrupted data > 15830803292687600194 UNAVAIL corrupted data >=20 >=20 > Regards, > Jason / sub.mesa Hello Jason, I was struck with this problem too yesterday. I was able to import the pool by specifying the directory where zpool = should look for devices. Like : zpool import -d /dev/gptid Alternatively you can try putting kern.cam.ada.legacy_aliases=3D0 in = your /boot/loader.conf Regards, Nikolay