From owner-freebsd-fs@FreeBSD.ORG Tue Apr 24 13:53:41 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 EEE10106566B for ; Tue, 24 Apr 2012 13:53:41 +0000 (UTC) (envelope-from freebsd-fs@m.gmane.org) Received: from plane.gmane.org (plane.gmane.org [80.91.229.3]) by mx1.freebsd.org (Postfix) with ESMTP id A7E2D8FC17 for ; Tue, 24 Apr 2012 13:53:41 +0000 (UTC) Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1SMgBV-0002b9-O5 for freebsd-fs@freebsd.org; Tue, 24 Apr 2012 15:53:37 +0200 Received: from dyn1214-105.wlan.ic.ac.uk ([129.31.214.105]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 24 Apr 2012 15:53:37 +0200 Received: from johannes by dyn1214-105.wlan.ic.ac.uk with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 24 Apr 2012 15:53:37 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-fs@freebsd.org From: Johannes Totz Date: Tue, 24 Apr 2012 14:53:26 +0100 Lines: 63 Message-ID: References: <4F964429.5060607@infracaninophile.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: dyn1214-105.wlan.ic.ac.uk User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko/20120327 Thunderbird/11.0.1 In-Reply-To: <4F964429.5060607@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 13:53:42 -0000 On 24/04/2012 07:11, Matthew Seaman wrote: > 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. Don't forget to scrub first. Also might want to consider a zpool split, instead of detach. So that you have two disks with usable data in case the to-be-resilvered-from disk dies unexpectedly. > >> /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? > > 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="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 >