svn commit: r51556 - head/en_US.ISO8859-1/books/handbook/disks

Allan Jude allanjude at
Sun Apr 15 14:54:27 UTC 2018

Author: allanjude
Date: Sun Apr 15 14:54:26 2018
New Revision: 51556

  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:


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</screen>
       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.</para>
+      unmounted, deleted, and then recreate the third partition after
+      resizing the second partition.</para>
-    <screen>&prompt.root; <userinput>swapoff <replaceable>/dev/ada0p3</replaceable></userinput>
+    <para>Disable the swap partition:</para>
+    <screen>&prompt.root; <userinput>swapoff <replaceable>/dev/ada0p3</replaceable></userinput></screen>
+    <para>Delete the third partition, specified by the
+      <option>-i</option> flag, from the disk
+      <replaceable>ada0</replaceable>.</para>
+    <screen>
 &prompt.root; <userinput>gpart delete -i <replaceable>3</replaceable> <replaceable>ada0</replaceable></userinput>
 ada0p3 deleted
 &prompt.root; <userinput>gpart show <replaceable>ada0</replaceable></userinput>
@@ -281,11 +289,14 @@ ada0p3 deleted
     <para>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.</para>
+      partition of the desired size.  The partition to resize is
+      specified with <option>-i</option>, and the new desired size
+      with <option>-s</option>.  Optionally, alignment of the
+      partition is controlled with <option>-a</option>.  This only
+      modifies the size of the partition.  The file system in the
+      partition will be expanded in a separate step.</para>
-    <screen>&prompt.root; <userinput>gpart resize -i <replaceable>2</replaceable> -a 4k -s <replaceable>47G</replaceable> <replaceable>ada0</replaceable></userinput>
+    <screen>&prompt.root; <userinput>gpart resize -i <replaceable>2</replaceable> -s <replaceable>47G</replaceable> -a 4k <replaceable>ada0</replaceable></userinput>
 ada0p2 resized
 &prompt.root; <userinput>gpart show <replaceable>ada0</replaceable></userinput>
 =>       34  102399933  ada0  GPT  (48G)
@@ -293,7 +304,9 @@ ada0p2 resized
         162   98566144     2  freebsd-ufs  (47G)
    98566306    3833661        - free -  (1.8G)</screen>
-    <para>Recreate the swap partition:</para>
+    <para>Recreate the swap partition and activate it.  If no size
+      is specified with <option>-s</option>, all remaining space is
+      used:</para>
     <screen>&prompt.root; <userinput>gpart add -t freebsd-swap -a 4k <replaceable>ada0</replaceable></userinput>
 ada0p3 added
@@ -307,12 +320,6 @@ ada0p3 added
     <para>Grow the <acronym>UFS</acronym> file system to use the new
       capacity of the resized partition:</para>
-    <note>
-      <para>Growing a live <acronym>UFS</acronym> file system is only
-	possible in &os; 10.0-RELEASE and later.  For earlier
-	versions, the file system must not be mounted.</para>
-    </note>
     <screen>&prompt.root; <userinput>growfs <replaceable>/dev/ada0p2</replaceable></userinput>
 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</screen>
+    <para>If the file system is <acronym>ZFS</acronym>, the resize is
+      triggered by running the <option>online</option> subcommand with
+      <option>-e</option>:</para>
+    <screen>&prompt.root; <userinput>zpool online -e <replaceable>zroot</replaceable> <replaceable>/dev/ada0p2</replaceable></userinput></screen>
     <para>Both the partition and the file system on it have now been
       resized to use the newly-available disk space.</para>

More information about the svn-doc-all mailing list