From owner-freebsd-fs@FreeBSD.ORG Fri Jan 6 09:49:59 2012 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AA8C3106566B for ; Fri, 6 Jan 2012 09:49:59 +0000 (UTC) (envelope-from kraduk@gmail.com) Received: from mail-yw0-f54.google.com (mail-yw0-f54.google.com [209.85.213.54]) by mx1.freebsd.org (Postfix) with ESMTP id 62A498FC08 for ; Fri, 6 Jan 2012 09:49:59 +0000 (UTC) Received: by yhfq46 with SMTP id q46so602107yhf.13 for ; Fri, 06 Jan 2012 01:49:58 -0800 (PST) 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=HpsLkh518aqzwT3BEDLFIRfUTAWgWMMD/boVSDgc4l8=; b=JV/6cHzEZXq5ygXSy4HdbhoAGqStyI1VwIfJyfleyKyubYmXThbte32iDK9hNS8cnX orrQAK8u/1v5cnVdKXdXeXosy/dizV5QhIzlIQUnlFo2pmJK+GzTU+a3+chGHvFvYFwm vdz56FpOe/Y4kmDz47HsWeV+i/ODOVxna/Kdk= MIME-Version: 1.0 Received: by 10.236.78.193 with SMTP id g41mr5851940yhe.25.1325843398413; Fri, 06 Jan 2012 01:49:58 -0800 (PST) Received: by 10.236.139.193 with HTTP; Fri, 6 Jan 2012 01:49:58 -0800 (PST) In-Reply-To: <4F058FA0.7070301@quip.cz> References: <4F04749E.9020301@aon.at> <20120104172351.GA42855@icarus.home.lan> <4F05586B.9060109@aon.at> <4F056EEB.3050902@gmail.com> <4F058075.1020108@aon.at> <4F058FA0.7070301@quip.cz> Date: Fri, 6 Jan 2012 09:49:58 +0000 Message-ID: From: krad To: Miroslav Lachman <000.fbsd@quip.cz> Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-fs@freebsd.org, Martin Birgmeier Subject: Re: Upgrade to 9.0: How to convert zpool from adX to adaX? 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: Fri, 06 Jan 2012 09:49:59 -0000 On 5 January 2012 11:55, Miroslav Lachman <000.fbsd@quip.cz> wrote: > Martin Birgmeier wrote: > >> On 01/05/12 10:35, Volodymyr Kostyrko wrote: >> >>> 05.01.2012 09:59, Martin Birgmeier wrote: >>> >>>> In 9.0, if I keep kern.cam.ada.legacy_aliases=1, there will be two paths >>>> to each device, one through adX, the other through adaX. Which one will >>>> zfs use, and show with 'zpool status'? >>>> >>> >>> You are partially incorrect here: >>> [torn] ~> ls -la /dev | grep ad >>> lrwxr-xr-x 1 root wheel 4 5 jan 08:22 ad6@ -> ada0 >>> lrwxr-xr-x 1 root wheel 5 5 jan 08:22 ad6a@ -> ada0a >>> lrwxr-xr-x 1 root wheel 5 5 jan 08:22 ad6b@ -> ada0b >>> lrwxr-xr-x 1 root wheel 5 5 jan 08:22 ad6d@ -> ada0d >>> lrwxr-xr-x 1 root wheel 5 5 jan 08:22 ad6e@ -> ada0e >>> lrwxr-xr-x 1 root wheel 5 5 jan 08:22 ad6f@ -> ada0f >>> lrwxr-xr-x 1 root wheel 13 5 jan 08:22 ad6f.journal@ -> ada0f.journal >>> crw-r----- 1 root operator 0, 64 5 jan 08:22 ada0 >>> crw-r----- 1 root operator 0, 66 5 jan 08:23 ada0a >>> crw-r----- 1 root operator 0, 68 5 jan 08:22 ada0b >>> crw-r----- 1 root operator 0, 70 5 jan 08:23 ada0d >>> crw-r----- 1 root operator 0, 72 5 jan 08:23 ada0e >>> crw-r----- 1 root operator 0, 74 5 jan 08:22 ada0f >>> crw-r----- 1 root operator 0, 79 5 jan 08:23 ada0f.journal >>> >>> Also, I understand that I will have to wire down the various ATA CAMs to >>>> obtain the old numbering. How can I do this? Again, which path would zfs >>>> use if I did not wire down the ATA CAMs? Will I have half of my devices >>>> go through adX and the other through adaX, or will zfs even believe that >>>> it has a multipath connectivity to each device? >>>> >>> >>> Not at all, ad6 would be a symlink to correct ada device, I haven't >>> yet changed the fstab on this machine and it reads: >>> >>> # Device Mountpoint FStype Options Dump Pass# >>> /dev/ad6b none swap sw 0 0 >>> /dev/ad6a / ufs rw 1 1 >>> /dev/ad6e /tmp ufs rw 2 2 >>> /dev/ad6f.journal /usr ufs rw,async 2 2 >>> /dev/ad6d /var ufs rw 2 2 >>> /dev/cd0 /cdrom cd9660 ro,noauto 0 0 >>> >>> Sigh... I get only half the answers, and these are not so helpful >> either. >> >> First of all, I *am* correct in saying that there are two paths to the >> same device, because the purpose of a (sym-)link precisely is to have an >> alternate path to the same object in the filesystem. So if someone tells >> me that zfs somehow (how?) excludes devices reached through symlinks, >> *that* would be an information I would find useful. >> >> Second, the whole purpose of the kern.cam.ada.legacy_aliases is to have >> backwards compatibility for fstab etc by installing symlinks in /dev. I >> know this very well but want to prepare for the day when I want to get >> rid of the necessity for this compatibility. >> >> Third, I have now asked twice how to wire the ATA CAM devices, without >> anybody even referring to that question. Well, I guess I'll have to find >> that out myself. >> >> I do appreciate all answers, even more so as I perfectly understand they >> are *free* answers, and maybe the above is even helpful to someone else >> (and does not confuse them instead), but I'd appreciate it even more if >> they were real answers. >> > > ZFS taste available devices on boot, find ondisk stored metadata and > additionally useses informations stored in /boot/zfs/zpool.cache > > "ad" to "ada" transition is not the only case where one disk device is > accessible by multiple ways. > On one of my servers with SAS drives, the ZFS partitions can be accessed > by /dev/daXsY or /dev/gpt/ or /dev/gptid/ > It works correctly without any confusions. > > If you will delete zpool.cache and then export / import pool, the member > devices will be named as "first tasted". So if you will disable symlinks to > "ad" device names, your zpool will be correctly loaded with new device > names. ZFS is smart enough to not depend on device names and order. You can > safely change order of cables / devices on controller and ZFS will start > without any problem. > So the problem with "ad" to "ada" transition on ZFS is rather cosmetic > (device names shown in zpool status output) but it will work with whatever > names. > You just need to fix UFS / fstab issues. > > Miroslav Lachman > > ______________________________**_________________ > 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 > " > and if you implement gpt or geom labeling event the ufs issues become a non event