From owner-freebsd-fs@FreeBSD.ORG Thu Jan 5 07:59:43 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 F0A331065673 for ; Thu, 5 Jan 2012 07:59:43 +0000 (UTC) (envelope-from Martin.Birgmeier@aon.at) Received: from email.aon.at (smtpout05.highway.telekom.at [195.3.96.77]) by mx1.freebsd.org (Postfix) with ESMTP id 2C0108FC18 for ; Thu, 5 Jan 2012 07:59:41 +0000 (UTC) Received: (qmail 28567 invoked from network); 5 Jan 2012 07:59:40 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on WARSBL607.highway.telekom.at X-Spam-Level: Received: from 188-23-41-23.adsl.highway.telekom.at (HELO gandalf.xyzzy) ([188.23.41.23]) (envelope-sender ) by smarthub83.res.a1.net (qmail-ldap-1.03) with AES256-SHA encrypted SMTP for ; 5 Jan 2012 07:59:39 -0000 Received: from mizar-v1.xyzzy (mizar-v1.xyzzy [192.168.1.51]) by gandalf.xyzzy (8.14.5/8.14.5) with ESMTP id q057xdMu004742 for ; Thu, 5 Jan 2012 08:59:39 +0100 (CET) (envelope-from Martin.Birgmeier@aon.at) Message-ID: <4F05586B.9060109@aon.at> Date: Thu, 05 Jan 2012 08:59:39 +0100 From: Martin Birgmeier User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:9.0) Gecko/20111222 Thunderbird/9.0 MIME-Version: 1.0 To: freebsd-fs@freebsd.org References: <4F04749E.9020301@aon.at> <20120104172351.GA42855@icarus.home.lan> In-Reply-To: <20120104172351.GA42855@icarus.home.lan> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: Thu, 05 Jan 2012 07:59:44 -0000 On 01/04/12 18:23, Jeremy Chadwick wrote: > 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. > Thank you for this explanation. I understand that many improvements to zfs have gone into the code after 8.2.0; therefore, I am very careful not doing any "exotic" things with this server, as it is a production system and I do not want to lose data. (Note: Single and double failures are supposedly covered by using raidz2, and history is preserved by using snapshots, so I have no further backups on tapes or other disks. Thus, theoretically, all backup cases except for disaster are covered, and regarding that I currently count on the probability of floods, fire, burglary, and Russian Mars probes falling on my house as being sufficiently low, whereas I am not that confident regarding software disasters.) To make it short, I do not want to experiment, but just to apply a tried and true procedure for getting my pool to operate flawlessly under 9.0. Remark: My root partition is a UFS. 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'? 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? Regards, Martin