From owner-freebsd-fs@FreeBSD.ORG Tue Apr 24 03:22:36 2012 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 53872106564A for ; Tue, 24 Apr 2012 03:22:36 +0000 (UTC) (envelope-from tjg@tgustafson.com) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com [209.85.217.182]) by mx1.freebsd.org (Postfix) with ESMTP id CCBDA8FC17 for ; Tue, 24 Apr 2012 03:22:35 +0000 (UTC) Received: by lbbgm6 with SMTP id gm6so194391lbb.13 for ; Mon, 23 Apr 2012 20:22:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-originating-ip:date:message-id:subject:from:to :content-type:x-gm-message-state; bh=BV8sSvlV12AHTrZZq+tTwIUeVq3A77DaelH+TsQ+dD4=; b=RGT/NAo6HvXn32U98GQ8mO8xtma9LqmJj9NanmiB0BKCTovgR/U6kmrRot6pkgvU6x uKt7tUm8p2DuGtt7K1jnKwGwij6tcxEF6D0GdNutmmssi/orPzoBi/xwKel7o+n6H9BT EWCi+/D1uJ5Ix+yTDcfpCCw2VEqArss4Y8mpcuzxRBhK73TH54wRArvIyhjKeCySD7ds v+LYZaljsOOAkEzTmLJO1GTKNFrzTsBYpSvge43Vr9K37Tl0hwITtsV+VX3g8P0JZBbH GPU34BSqCyhhvlJkGKnZhzyu2PZaIhDiDuLOMWmqYa/NfW71WFQJHecwzoJjqGDLZ3/q sujg== MIME-Version: 1.0 Received: by 10.112.23.200 with SMTP id o8mr3243449lbf.21.1335237754612; Mon, 23 Apr 2012 20:22:34 -0700 (PDT) Received: by 10.152.18.201 with HTTP; Mon, 23 Apr 2012 20:22:34 -0700 (PDT) X-Originating-IP: [50.136.209.89] Date: Mon, 23 Apr 2012 20:22:34 -0700 Message-ID: From: Tim Gustafson To: freebsd-fs@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQkMVtcAdZzHJvu5i3ir/YZASJ6P5HrQLzB/m+kADLrplt26/GG2IQpxUottfoOvrQAIp97f Subject: Increasing ZFS Disk Sizes 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: Tue, 24 Apr 2012 03:22:36 -0000 Hi, I've got a 9.0-RELEASE system that's installed using the hand mfsroot installer. My gpart tables look like this: => 34 976773101 ada0 GPT (465G) 34 128 1 freebsd-boot (64k) 162 33554432 2 freebsd-swap (16G) 33554594 943218541 3 freebsd-zfs (449G) => 34 976773101 ada1 GPT (465G) 34 128 1 freebsd-boot (64k) 162 33554432 2 freebsd-swap (16G) 33554594 943218541 3 freebsd-zfs (449G) I'd like to increase the size of the freebsd-zfs partition. I was thinking of "breaking" my mirror, like this: zpool detach tank ada0p3 and then swapping out one of the disks with a blank 2TB disk, and then running: gpart create -s gpt ada0 gpart add -b 34 -s 64k -t freebsd-boot ada0 gpart add -s 16G -t freebsd-swap -l swap0 ada0 gpart add -t freebsd-zfs -l disk0 ada0 gpart bootcode -b /mnt2/boot/pmbr -p /mnt2/boot/gptzfsboot -i 1 ada0 And then running: zpool attach tank ada0p3 Am I missing anything here, or is the this "safe" way to do this? Do I need to do anything special (other than the gpart bootcode command) to make the new disk bootable? Do I need to do anything special to set up the swap partition? Right now, I have this in my /etc/fstab: /dev/gptid/47bc37af-873b-11e1-b913-003048b98c9e none swap sw 0 0 Would it be safe to change that to: /dev/ada1p2 none swap sw 0 0 during the operation, and then back to ada0p2 when the re-silvering is complete? Of course, once I'm done with the first disk, I will repeat the procedure for the second disk. Thanks! -- Tim Gustafson tjg@tgustafson.com http://tgustafson.com/