From owner-freebsd-fs@FreeBSD.ORG Wed Jan 4 17:23:53 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 6FD551065670 for ; Wed, 4 Jan 2012 17:23:53 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from qmta10.emeryville.ca.mail.comcast.net (qmta10.emeryville.ca.mail.comcast.net [76.96.30.17]) by mx1.freebsd.org (Postfix) with ESMTP id 57EB78FC17 for ; Wed, 4 Jan 2012 17:23:53 +0000 (UTC) Received: from omta18.emeryville.ca.mail.comcast.net ([76.96.30.74]) by qmta10.emeryville.ca.mail.comcast.net with comcast id HUqD1i0031bwxycAAVPmlu; Wed, 04 Jan 2012 17:23:46 +0000 Received: from koitsu.dyndns.org ([67.180.84.87]) by omta18.emeryville.ca.mail.comcast.net with comcast id HW611i00o1t3BNj8eW61rD; Wed, 04 Jan 2012 18:06:02 +0000 Received: by icarus.home.lan (Postfix, from userid 1000) id DB918102C19; Wed, 4 Jan 2012 09:23:51 -0800 (PST) Date: Wed, 4 Jan 2012 09:23:51 -0800 From: Jeremy Chadwick To: Martin Birgmeier Message-ID: <20120104172351.GA42855@icarus.home.lan> References: <4F04749E.9020301@aon.at> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4F04749E.9020301@aon.at> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-fs@freebsd.org 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: Wed, 04 Jan 2012 17:23:53 -0000 On Wed, Jan 04, 2012 at 04:47:42PM +0100, Martin Birgmeier wrote: > I'll be upgrading a server from 8.2 to 9.0 soon. On it, I currently > have the following zpool: > > ---------- > [0]# zpool status > pool: hal.1 > state: ONLINE > status: The pool is formatted using an older on-disk format. The pool can > still be used, but some features are unavailable. > action: Upgrade the pool using 'zpool upgrade'. Once this is done, the > pool will no longer be accessible on older software versions. > scrub: none requested > config: > > NAME STATE READ WRITE CKSUM > hal.1 ONLINE 0 0 0 > raidz2 ONLINE 0 0 0 > ad10p3 ONLINE 0 0 0 > ad12p3 ONLINE 0 0 0 > ad14p3 ONLINE 0 0 0 > ad16p3 ONLINE 0 0 0 > ad18p3 ONLINE 0 0 0 > ad20p3 ONLINE 0 0 0 > > errors: No known data errors > [0]# > ---------- > > I would like to do two things: > > 1) Wire the ATA CAM disks such that ad10 -> ada0, ad12 -> ada1, etc. > > 2) Change the zpool to use the then newly available ada0p3, ada1p3, > ..., ada5p3 gparts. > > Ultimately, I want to set sysctl kern.cam.ada.legacy_aliases=0. > > Please advise on how best to achieve this. > > Regards, > > Martin > > p.s. The following information relates to the current ata attachments: > > ---------- > [0]# egrep 'ad[0-9]|ata[0-9]|atapci[0-9]' /var/run/dmesg.boot > atapci0: port > 0xcc00-0xcc07,0xc880-0xc883,0xc800-0xc807,0xc480-0xc483,0xc400-0xc40f > mem 0xfe8fe000-0xfe8fffff irq 18 at device 0.0 on pci3 > atapci0: [ITHREAD] > atapci1: on atapci0 > atapci1: [ITHREAD] > atapci1: AHCI v1.00 controller with 2 3Gbps ports, PM supported > ata2: on atapci1 > ata2: [ITHREAD] > ata3: on atapci1 > ata3: [ITHREAD] > ata4: on atapci0 > ata4: [ITHREAD] > atapci2: port > 0xa000-0xa007,0x9000-0x9003,0x8000-0x8007,0x7000-0x7003,0x6000-0x600f > mem 0xfe4ffc00-0xfe4fffff irq 19 at device 17.0 on pci0 > atapci2: [ITHREAD] > atapci2: AHCI v1.20 controller with 6 3Gbps ports, PM supported > ata5: on atapci2 > ata5: [ITHREAD] > ata6: on atapci2 > ata6: [ITHREAD] > ata7: on atapci2 > ata7: [ITHREAD] > ata8: on atapci2 > ata8: [ITHREAD] > ata9: on atapci2 > ata9: [ITHREAD] > ata10: on atapci2 > ata10: [ITHREAD] > ad10: 1907729MB at ata5-master > UDMA100 SATA 3Gb/s > ad12: 1907729MB at ata6-master > UDMA100 SATA 3Gb/s > ad14: 1907729MB at ata7-master > UDMA100 SATA 3Gb/s > ad16: 1907729MB at ata8-master > UDMA100 SATA 3Gb/s > ad18: 1907729MB at ata9-master > UDMA100 SATA 3Gb/s > ad20: 1907729MB at ata10-master > UDMA100 SATA 3Gb/s > [0]# You can try doing this on 8.2 already, and always revert if need be. All you need to do is add ahci_load="yes" to /boot/loader.conf and see how things behave after that. This will make use of the AHCI-to-CAM translation layer (which is now default in 9.0). There isn't much you need to do with ZFS either: it should "taste" the disks and find them on boot. If it doesn't, try "zpool import", then when it shows the pool, do "zpool import {poolid}". It should automatically refer to everything as adaX going forward. No need to bother with kern.cam.ada.legacy_aliases. -- | 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 |