Warning, /system/partitionmanager/doc/resizehowto.docbook is written in an unsupported language. File is not indexed.

0001 <sect1 id="howto-resizepartition">
0002         <title>How-To: Resizing a Partition</title>
0003 
0004         <para>
0005                 This how-to explains the resizing of a <glossterm linkend="glossary-partition">partition</glossterm> that is becoming too full. See the following screenshot for the initial situation before resizing:
0006         </para>
0007 
0008         <para>
0009                 <screenshot>
0010                         <mediaobject>
0011                                 <imageobject><imagedata fileref="resize_howto_1.png" format="PNG"/></imageobject>
0012                                 <textobject><phrase>Main window before resizing partitions</phrase></textobject>
0013                         </mediaobject>
0014                 </screenshot>
0015         </para>
0016 
0017         <para>
0018                 On <glossterm linkend="glossary-device">device</glossterm> <quote>/dev/sdb</quote>, partition <quote>sdb2</quote> has only little free space left while the other partition, <quote>sdb1</quote>, is far from being full. For that reason it seems advisable to make the first partition a little smaller and grow <quote>sdb2</quote> so it has more free space available.
0019         </para>
0020 
0021         <note>
0022                 <title>Note: You cannot modify mounted partitions.</title>
0023                 <para>In the screenshot above both partitions are not currently mounted. If one or both of them were mounted you would have to unmount them first using <xref linkend="menu-partition-mount"/>.</para>
0024         </note>
0025 
0026         <para>
0027                 The first step is to make more room for the partition to grow, so start by shrinking <quote>sdb1</quote>. Click on the partition and choose <xref linkend="menu-partition-resize"/>. The following dialog comes up:
0028         </para>
0029 
0030         <para>
0031                 <screenshot>
0032                         <mediaobject>
0033                                 <imageobject><imagedata fileref="resize_howto_2.png" format="PNG"/></imageobject>
0034                                 <textobject><phrase>Resize dialog before resizing /dev/sdb1</phrase></textobject>
0035                         </mediaobject>
0036                 </screenshot>
0037         </para>
0038 
0039         <para>
0040                 The dialog allows you to resize the partition in multiple ways. You can either drag the right handle to the left until the partition has the desired size or simply enter the size in the <guilabel>Size</guilabel> text field. Another possibility would be to adjust the size by clicking on the little arrows next to the text field, but that is a little tedious for larger changes.
0041         </para>
0042 
0043         <para>
0044                 Whichever way you prefer for setting the new size, the dialog should now look like this:
0045         </para>
0046 
0047         <para>
0048                 <screenshot>
0049                         <mediaobject>
0050                                 <imageobject><imagedata fileref="resize_howto_3.png" format="PNG"/></imageobject>
0051                                 <textobject><phrase>Resize dialog after resizing /dev/sdb1</phrase></textobject>
0052                         </mediaobject>
0053                 </screenshot>
0054         </para>
0055 
0056         <para>
0057                 After you click on <guibutton>OK</guibutton>, a new operation is added to the pending operations list and the graphical view and tree view of the device are updated to reflect the new situation:
0058         </para>
0059 
0060         <para>
0061                 <screenshot>
0062                         <mediaobject>
0063                                 <imageobject><imagedata fileref="resize_howto_4.png" format="PNG"/></imageobject>
0064                                 <textobject><phrase>Main window after resizing /dev/sdb1</phrase></textobject>
0065                         </mediaobject>
0066                 </screenshot>
0067         </para>
0068 
0069         <note>
0070                 <title>Note: Operations are previewed first before applying them.</title>
0071                 <para>Although the main window reflects the device's state how it will be after applying the new operation, the operation has in fact not been applied yet: While operations are pending you can still undo them (one by one using <xref linkend="menu-edit-undo"/> or <xref linkend="menu-edit-clear"/> to undo all of them) or quit &partman;, and nothing will have been modified at all.</para>
0072         </note>
0073         
0074         <para>
0075                 Now that there is some free space between the two partitions you can move and grow partition <quote>sdb2</quote>. First, click on <quote>sdb2</quote> and choose <xref linkend="menu-partition-resize"/> again. The resize dialog comes up once more, this time for the second partition. Drag its left handle to the leftmost end so that the dialog looks like this:
0076         </para>
0077 
0078         <para>
0079                 <screenshot>
0080                         <mediaobject>
0081                                 <imageobject><imagedata fileref="resize_howto_5.png" format="PNG"/></imageobject>
0082                                 <textobject><phrase>Resize dialog after resizing /dev/sdb2</phrase></textobject>
0083                         </mediaobject>
0084                 </screenshot>
0085         </para>
0086 
0087         <para>
0088                 Be careful to make sure that the <guilabel>Free space before</guilabel> text field really does show <quote>0 MiB</quote> because otherwise there will be a little free space left between the partitions that will then be wasted.
0089         </para>
0090 
0091         <para>
0092                 Now click <guibutton>OK</guibutton> again. In the main window things now look like this:
0093         </para>
0094 
0095         <para>
0096                 <screenshot>
0097                         <mediaobject>
0098                                 <imageobject><imagedata fileref="resize_howto_6.png" format="PNG"/></imageobject>
0099                                 <textobject><phrase>Main window after resizing /dev/sdb2</phrase></textobject>
0100                         </mediaobject>
0101                 </screenshot>
0102         </para>
0103 
0104         <para>
0105                 This already looks like what you wanted, so choose <xref linkend="menu-edit-apply"/>. A dialog box will come up and ask you if you are sure to apply the pending operations. Confirm this dialog box and &partman; will begin executing operations:
0106         </para>
0107 
0108         <para>
0109                 <screenshot>
0110                         <mediaobject>
0111                                 <imageobject><imagedata fileref="resize_howto_7.png" format="PNG"/></imageobject>
0112                                 <textobject><phrase>&partman; is applying operations</phrase></textobject>
0113                         </mediaobject>
0114                 </screenshot>
0115         </para>
0116 
0117         <para>
0118                 While operations are being executed you can click on the plus-sign next to each operation in the list to find out the jobs it is made up of and see which job is currently being run.
0119         </para>
0120 
0121         <para>
0122                 Resizing a partition in the way you resized <quote>/dev/sdb2</quote> above always means it has to be moved to the left first before it can be grown because partitions can never be grown to the left directly. Unfortunately, moving such a large partition will take quite some time. It is not unusual for an operation like this to take several minutes or even more.
0123         </para>
0124 
0125         <para>
0126                 Finally, all operations will have been successfully completed:
0127         </para>
0128 
0129         <para>
0130                 <screenshot>
0131                         <mediaobject>
0132                                 <imageobject><imagedata fileref="resize_howto_8.png" format="PNG"/></imageobject>
0133                                 <textobject><phrase>Progress dialog after successfully applying operations</phrase></textobject>
0134                         </mediaobject>
0135                 </screenshot>
0136         </para>
0137 
0138         <para>
0139                 By clicking on <guibutton>OK</guibutton> you can now close the progress dialog and return to the main window. &partman; will rescan your devices at this point so that might take a few seconds.
0140         </para>
0141 
0142         <para>
0143                 If you are interested in some more details about the operations that were just run click on <guibutton>Details</guibutton>. You will see the detailed report that is always generated (and updated on the fly) while &partman; executes operations:
0144         </para>
0145 
0146         <para>
0147                 <screenshot>
0148                         <mediaobject>
0149                                 <imageobject><imagedata fileref="resize_howto_9.png" format="PNG"/></imageobject>
0150                                 <textobject><phrase>Progress dialog details</phrase></textobject>
0151                         </mediaobject>
0152                 </screenshot>
0153         </para>
0154 
0155         <para>
0156                 This report is particularly of interest if an error occurs while executing operations. A report shows each operation, each job and each external command that is being run and is thus very helpful when trying to track down problems.
0157         </para>
0158 
0159         <para>
0160                 You can save the report as <acronym>HTML</acronym> or view it in an external web browser.
0161         </para>
0162 
0163         <tip>
0164                 <para>
0165                         Always save the detailed report as <acronym>HTML</acronym> when executing the operations fails with errors or warnings for later reference. You might also want to include it in a bug report you submit to the &kde; bug tracking system at <ulink url="https://bugs.kde.org">bugs.kde.org</ulink>.
0166                 </para>
0167         </tip>
0168         
0169         <para>
0170                 To hide the details again click on <guibutton>Details</guibutton> and to finally close the progress dialog click on <guibutton>OK</guibutton>.
0171         </para>
0172 </sect1>