From owner-svn-doc-all@freebsd.org Sun Apr 15 14:54:27 2018 Return-Path: Delivered-To: svn-doc-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 594F3F98F7F; Sun, 15 Apr 2018 14:54:27 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EAE087EAFD; Sun, 15 Apr 2018 14:54:26 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E37E410615; Sun, 15 Apr 2018 14:54:26 +0000 (UTC) (envelope-from allanjude@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w3FEsQru027744; Sun, 15 Apr 2018 14:54:26 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w3FEsQwp027743; Sun, 15 Apr 2018 14:54:26 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201804151454.w3FEsQwp027743@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Sun, 15 Apr 2018 14:54:26 +0000 (UTC) To: doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org Subject: svn commit: r51556 - head/en_US.ISO8859-1/books/handbook/disks X-SVN-Group: doc-head X-SVN-Commit-Author: allanjude X-SVN-Commit-Paths: head/en_US.ISO8859-1/books/handbook/disks X-SVN-Commit-Revision: 51556 X-SVN-Commit-Repository: doc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-doc-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire doc trees \(except for " user" , " projects" , and " translations" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Apr 2018 14:54:27 -0000 Author: allanjude Date: Sun Apr 15 14:54:26 2018 New Revision: 51556 URL: https://svnweb.freebsd.org/changeset/doc/51556 Log: Improve the instructions for growing disks The previous instructions did not explaina all of the steps, and lacked information to explain to the user which numbers and device names they might need to change for their circumstances Reported by: Myke Geiger Reviewed by: bcr Sponsored by: ScaleEngine Inc. Differential Revision: https://reviews.freebsd.org/D14502 Modified: head/en_US.ISO8859-1/books/handbook/disks/chapter.xml Modified: head/en_US.ISO8859-1/books/handbook/disks/chapter.xml ============================================================================== --- head/en_US.ISO8859-1/books/handbook/disks/chapter.xml Sun Apr 15 14:50:27 2018 (r51555) +++ head/en_US.ISO8859-1/books/handbook/disks/chapter.xml Sun Apr 15 14:54:26 2018 (r51556) @@ -256,10 +256,18 @@ ada0 recovered Here, the last partition on the disk is the swap partition, but the second partition is the one that needs to be resized. Swap partitions only contain temporary data, so it can safely be - unmounted, deleted, and then recreated after resizing other - partitions. + unmounted, deleted, and then recreate the third partition after + resizing the second partition. - &prompt.root; swapoff /dev/ada0p3 + Disable the swap partition: + + &prompt.root; swapoff /dev/ada0p3 + + Delete the third partition, specified by the + flag, from the disk + ada0. + + &prompt.root; gpart delete -i 3 ada0 ada0p3 deleted &prompt.root; gpart show ada0 @@ -281,11 +289,14 @@ ada0p3 deleted Resize the partition, leaving room to recreate a swap - partition of the desired size. This only modifies the size of - the partition. The file system in the partition will be - expanded in a separate step. + partition of the desired size. The partition to resize is + specified with , and the new desired size + with . Optionally, alignment of the + partition is controlled with . This only + modifies the size of the partition. The file system in the + partition will be expanded in a separate step. - &prompt.root; gpart resize -i 2 -a 4k -s 47G ada0 + &prompt.root; gpart resize -i 2 -s 47G -a 4k ada0 ada0p2 resized &prompt.root; gpart show ada0 => 34 102399933 ada0 GPT (48G) @@ -293,7 +304,9 @@ ada0p2 resized 162 98566144 2 freebsd-ufs (47G) 98566306 3833661 - free - (1.8G) - Recreate the swap partition: + Recreate the swap partition and activate it. If no size + is specified with , all remaining space is + used: &prompt.root; gpart add -t freebsd-swap -a 4k ada0 ada0p3 added @@ -307,12 +320,6 @@ ada0p3 added Grow the UFS file system to use the new capacity of the resized partition: - - Growing a live UFS file system is only - possible in &os; 10.0-RELEASE and later. For earlier - versions, the file system must not be mounted. - - &prompt.root; growfs /dev/ada0p2 Device is mounted read-write; resizing will result in temporary write suspension for /. It's strongly recommended to make a backup before growing the file system. @@ -320,6 +327,12 @@ OK to grow file system on /dev/ada0p2, mounted on /, f super-block backups (for fsck -b #) at: 80781312, 82063552, 83345792, 84628032, 85910272, 87192512, 88474752, 89756992, 91039232, 92321472, 93603712, 94885952, 96168192, 97450432 + + If the file system is ZFS, the resize is + triggered by running the subcommand with + : + + &prompt.root; zpool online -e zroot /dev/ada0p2 Both the partition and the file system on it have now been resized to use the newly-available disk space.