Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F136651971
D14502.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
4 KB
Referenced Files
None
Subscribers
None
D14502.diff
View Options
Index: head/en_US.ISO8859-1/books/handbook/disks/chapter.xml
===================================================================
--- head/en_US.ISO8859-1/books/handbook/disks/chapter.xml
+++ head/en_US.ISO8859-1/books/handbook/disks/chapter.xml
@@ -256,10 +256,18 @@
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 @@
</warning>
<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 @@
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 @@
<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 @@
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>
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Nov 19, 6:20 PM (12 h, 48 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
25662161
Default Alt Text
D14502.diff (4 KB)
Attached To
Mode
D14502: Improve the disk growing instructions
Attached
Detach File
Event Timeline
Log In to Comment