From owner-freebsd-fs@FreeBSD.ORG Tue Apr 24 06:12:06 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 621E6106564A for ; Tue, 24 Apr 2012 06:12:06 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from smtp.infracaninophile.co.uk (smtp6.infracaninophile.co.uk [IPv6:2001:8b0:151:1:3cd3:cd67:fafa:3d78]) by mx1.freebsd.org (Postfix) with ESMTP id 8AC138FC19 for ; Tue, 24 Apr 2012 06:12:05 +0000 (UTC) Received: from seedling.black-earth.co.uk (seedling.black-earth.co.uk [IPv6:2001:8b0:151:1:fa1e:dfff:feda:c0bb]) (authenticated bits=0) by smtp.infracaninophile.co.uk (8.14.5/8.14.5) with ESMTP id q3O6C1CE027274 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO) for ; Tue, 24 Apr 2012 07:12:01 +0100 (BST) (envelope-from m.seaman@infracaninophile.co.uk) X-DKIM: OpenDKIM Filter v2.5.2 smtp.infracaninophile.co.uk q3O6C1CE027274 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=infracaninophile.co.uk; s=201001-infracaninophile; t=1335247921; bh=kcHA5hCoh8LjBSXJWGYxFu6k6ajEhQ91j593N+BbBro=; h=Date:From:To:Subject:References:In-Reply-To:Cc:Content-Type: Message-ID:Mime-Version; b=db2g0hy5GK++MyYRMci5t/YMiwlnyv/sy5pLcDTIbBMfn/GGOHsLNl8EFcbvv0oxc 4Fk8MBpGA0FgEysPqgJN4EUAJHBjhaOkN3KCtIWjPKMLBjrmt4rFoNEV5z7PKt0gQ6 xPfgBwfvBQxcwCCepeIVA6j83NsEALygmhgxvHhg= Message-ID: <4F964429.5060607@infracaninophile.co.uk> Date: Tue, 24 Apr 2012 07:11:53 +0100 From: Matthew Seaman User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:11.0) Gecko/20120327 Thunderbird/11.0.1 MIME-Version: 1.0 To: freebsd-fs@freebsd.org References: In-Reply-To: X-Enigmail-Version: 1.4 OpenPGP: id=60AE908C Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigFB7D6FDCD767BAB0B286EDD6" X-Virus-Scanned: clamav-milter 0.97.4 at lucid-nonsense.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-2.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, DKIM_ADSP_ALL,DKIM_SIGNED,T_DKIM_INVALID autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on lucid-nonsense.infracaninophile.co.uk Subject: Re: 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 06:12:06 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigFB7D6FDCD767BAB0B286EDD6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 24/04/2012 04:22, Tim Gustafson wrote: > 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: Yes, this is a good way to do this change. The only better way would be to add the 2TB disk to the mirror first -- thus making a three way mirror, let that resilver, and then remove one of the old drives. But that requires you to have available spare disk slots. > /dev/gptid/47bc37af-873b-11e1-b913-003048b98c9e none swap sw 0 0 >=20 > Would it be safe to change that to: >=20 > /dev/ada1p2 none swap sw 0 0 >=20 > during the operation, and then back to ada0p2 when the re-silvering is = complete? What does swapinfo(8) say? If your system is swapping directly to the partitions on both those drives then you have some work to do. You can't just pull a drive with an active swap area on it -- you should use swapoff(8) to disable the swap area first. That's something that can take some time, lots of IO and is not actually guaranteed to work; in which case you may need to edit /etc/fstab and reboot to free up that swap area. One thing I'd certainly recommend your doing here is to set up a gmirror across your swap partitions. As it is, despite having your filesystems mirrored using ZFS, you are still vulnerable to system crash should one of your drives fail. To do that: Halt the system and reboot into single user mode (ie shutdown -r). You want this so that your current swap partitions are not enabled, as you'll need to modify their configuration. Add -- geom_mirror_load=3D"YES" to /boot/loader.conf One time only, run 'kldload geom_mirror' for the initial setup -- in future this will happen automatically. Create the mirrored swap by: # gmirror label -b load -F swap /dev/gpt/swap0 /dev/gpt/swap1 and then modify /etc/fstab so that the swap related line is like so: /dev/mirror/swap none swap sw 0 0 Then hit ^D to carry on booting as normal. Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate JID: matthew@infracaninophile.co.uk Kent, CT11 9PW --------------enigFB7D6FDCD767BAB0B286EDD6 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.16 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk+WRDAACgkQ8Mjk52CukIxFwgCdHn8pdPlWlvJh+zLQ6edCZWWq OY0AnRTxxzlB89rC2qYrv24HdLRuIJ+D =QjVo -----END PGP SIGNATURE----- --------------enigFB7D6FDCD767BAB0B286EDD6--