Sophie

Sophie

distrib > Mandriva > 2008.1 > x86_64 > media > main-release > by-pkgid > 275bc5f884d593fea8c87799d871d7f1 > files > 37

mandriva-doc-Mastering-Manual-en-2008.1-0.4mdv2008.1.noarch.rpm

<html>
   <head>
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
   
      <title>1.&nbsp;Managing your Hard Drive Partitions with DiskDrake</title>
      <link rel="stylesheet" href="images/mdk-doc.css" type="text/css">
      <meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
      <link rel="start" href="index.html" title="Mastering Mandriva Linux">
      <link rel="up" href="mcc-localdisks.html" title="Chapter&nbsp;13.&nbsp;Local Disks">
      <link rel="prev" href="mcc-localdisks.html" title="Chapter&nbsp;13.&nbsp;Local Disks">
      <link rel="next" href="diskdrake-removable.html" title="2.&nbsp;Managing Removable Devices">
   </head>
   <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
      <div class="navheader">
         <table width="100%" summary="Navigation header">
            <tr>
               <th colspan="3" align="center">1.&nbsp;Managing your Hard Drive
                      Partitions with DiskDrake
               </th>
            </tr>
            <tr>
               <td width="20%" align="left"><a accesskey="p" href="mcc-localdisks.html">Prev</a>&nbsp;
               </td>
               <th width="60%" align="center">Chapter&nbsp;13.&nbsp;Local Disks</th>
               <td width="20%" align="right">&nbsp;<a accesskey="n" href="diskdrake-removable.html">Next</a></td>
            </tr>
         </table>
         <hr>
      </div>
      <div class="section" lang="en">
         <div class="titlepage">
            <div>
               <div>
                  <h2 class="title" style="clear: both"><a name="diskdrake"></a>1.&nbsp;Managing your Hard Drive
                         Partitions with DiskDrake
                  </h2>
               </div>
            </div>
         </div>
           
         
           
         
           
         
           
         
           
         
           
         <p><a name="BId-diskdrake-pa1"></a><span class="inlinemediaobject"><img src="images/diskdrake-icon.png"></span> <a class="indexterm" name="BIdNEW-diskdrake-it5"></a> <a class="indexterm" name="BId-diskdrake-it1"></a> Partitions are initially set up during the installation
              process. <span class="application">DiskDrake</span> allows you, to some extent, to
              resize your partitions, move them, etc. <span class="application">DiskDrake</span>
              can also deal with <acronym class="acronym">RAID</acronym> devices and supports
              <acronym class="acronym">LVM</acronym> but we will not discuss these advanced uses
              here.
         </p>
         
           
         <div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
            <table border="0" summary="Warning">
               <tr>
                  <td rowspan="2" align="center" valign="top" width="25"><img alt="[Warning]" src="images/warning.png"></td>
                  <th align="left">Warning</th>
               </tr>
               <tr>
                  <td align="left" valign="top">
                         
                     <p><a name="BId-diskdrake-pa2"></a><span class="application">DiskDrake</span> is very
                            powerful and can therefore be a dangerous tool. Misuse could very easily
                            lead to data loss on your hard drive. Because of this potential loss of
                            data, you are strongly advised to take some protective measures before
                            using <span class="application">DiskDrake</span>:
                     </p>
                     
                         
                     <div class="orderedlist">
                        <ol type="1">
                           <li>
                                      
                              <p><a name="BId-diskdrake-pa3"></a>Back up your data.
                                         Transfer it to another computer,
                                         <acronym class="acronym">DVD</acronym>/<acronym class="acronym">CD</acronym>, etc.
                              </p>
                                    
                           </li>
                           <li>
                                      
                              <p><a name="BId-diskdrake-pa4"></a><a class="indexterm" name="BId-diskdrake-it2"></a> Save your current partition table (the table describing
                                         how your disks are organized) to a floppy disk (see <a class="xref" href="diskdrake.html#diskdrake-actions" title="1.2.&nbsp;DiskDrake's action buttons">Section&nbsp;1.2, &#8220;DiskDrake's action buttons&#8221;</a>).
                              </p>
                                    
                           </li>
                        </ol>
                     </div>
                       
                  </td>
               </tr>
            </table>
         </div>
         
           
         <div class="section" lang="en">
            <div class="titlepage">
               <div>
                  <div>
                     <h3 class="title"><a name="d5e8406"></a>1.1.&nbsp;The Interface
                     </h3>
                  </div>
               </div>
            </div>
                
            
                
            <div class="figure"><a name="diskdrake-main"></a><p class="title"><b>Figure&nbsp;13.1.&nbsp;DiskDrake's Main Window</b></p>
               <div class="figure-contents">
                        
                  
                        
                  <div class="mediaobject" align="center"><img src="images/diskdrake-main.png" align="middle" alt="DiskDrake's Main Window"></div>
                      
               </div>
            </div><br class="figure-break">
            
                
            
                
            
                
            <p><a name="BId-diskdrake-pa5"></a><a class="indexterm" name="BId-diskdrake-it3"></a> <span class="application">DiskDrake</span> enables you to manage
                   partitions on each physical hard drive on your machine, and also on
                   removable drives: <acronym class="acronym">USB</acronym> hard disks, keys, memory cards,
                   etc. Below the file-system types you see as many tabs as hard drives your
                   system has. Each tab is named after the <span class="application">Linux</span>
                   name for that drive (for example: <span class="guilabel">sda</span> for a
                   <acronym class="acronym">SCSI</acronym> or a <acronym class="acronym">SATA</acronym> hard disk).
            </p>
            
                
            <p><a name="BId-diskdrake-pa6"></a>The window (see <a class="xref" href="diskdrake.html#diskdrake-main" title="Figure&nbsp;13.1.&nbsp;DiskDrake's Main Window">Figure&nbsp;13.1, &#8220;DiskDrake's Main Window&#8221;</a>) is divided into four zones:
            </p>
            
                
            <div class="itemizedlist">
               <ul type="disc">
                  <li>
                             
                     <p><a name="BId-diskdrake-pa7"></a>Top. The structure of
                                your hard drive. When you launch <span class="application">DiskDrake</span>
                                it will display the current structure of the drive. The display is
                                updated as you make changes.
                     </p>
                           
                  </li>
                  <li>
                             
                     <p><a name="BId-diskdrake-pa8"></a>Left. A menu relevant to the
                                partition currently selected in the above diagram.
                     </p>
                           
                  </li>
                  <li>
                             
                     <p><a name="BId-diskdrake-pa9"></a>Right. A description of the selected
                                partition.
                     </p>
                           
                  </li>
                  <li>
                             
                     <p><a name="BId-diskdrake-pa10"></a>Bottom. Buttons for
                                executing general actions. See <a class="xref" href="diskdrake.html#diskdrake-actions" title="1.2.&nbsp;DiskDrake's action buttons">Section&nbsp;1.2, &#8220;DiskDrake's action buttons&#8221;</a>.
                     </p>
                           
                  </li>
               </ul>
            </div>
            
                
            <p><a name="BId-diskdrake-pa19"></a>We will now review the actions available
                   through the buttons at the bottom of the window<span><a name="BIdNEW-diskdrake-ph1"></a>, and then describe a practical use
                      case</span>.
            </p>
              
         </div>
         
           
         <div class="section" lang="en">
            <div class="titlepage">
               <div>
                  <div>
                     <h3 class="title"><a name="diskdrake-actions"></a>1.2.&nbsp;DiskDrake's action buttons
                     </h3>
                  </div>
               </div>
            </div>
                
            
                
            <div class="variablelist">
               <dl>
                  <dt><span class="term"><a name="BId-diskdrake-te1"></a><span class="guibutton">Clear
                                   all</span></span></dt>
                  <dd>
                               
                     <p><a name="BId-diskdrake-pa20"></a>Clicking on this button will clear
                                  all partitions on the current hard drive.
                     </p>
                             
                  </dd>
                  <dt><span class="term"><a name="BId-diskdrake-te6"></a><span class="guibutton">Help</span></span></dt>
                  <dd>
                               
                     <p><a name="BId-diskdrake-pa25"></a>Display this documentation in a
                                  browser window.
                     </p>
                             
                  </dd>
                  <dt><span class="term"><a name="BId-diskdrake-te8"></a><span class="guibutton">Toggle to expert
                                   mode</span></span></dt>
                  <dd>
                               
                     <p><a name="BId-diskdrake-pa27"></a>This button allows you to access
                                  the expert mode functions (which are even <span class="emphasis"><em>more</em></span>
                                  dangerous if you are not sure what you are doing). Reserved for
                                  experts.
                     </p>
                             
                  </dd>
                  <dt><span class="term"><a name="BId-diskdrake-te9"></a><span class="guibutton">Done</span></span></dt>
                  <dd>
                               
                     <p><a name="BId-diskdrake-pa28"></a>Saves your changes and exits
                                  <span class="application">DiskDrake</span>.
                     </p>
                             
                  </dd>
               </dl>
            </div>
              
         </div>
         
           
         <div class="section" lang="en">
            <div class="titlepage">
               <div>
                  <div>
                     <h3 class="title"><a name="diskdrake-example"></a>1.3.&nbsp;Resizing an Old Partition
                              and Creating a New One
                     </h3>
                  </div>
               </div>
            </div>
                
            
                
            <p><a name="BId-diskdrake-pa11"></a>We are now going to do a
                   little exercise to demonstrate one of the more useful features of
                   <span class="application">DiskDrake</span>. Let us imagine that you decide to
                   use your machine as an <acronym class="acronym">FTP</acronym> server and you want to
                   create a separate <code class="filename"><a name="diskdrake-var-ftp1"></a>/var/ftp</code> partition in order to host
                   the <acronym class="acronym">FTP</acronym> files. <span class="emphasis"><em>Note that doing this
                         step-by-step tutorial will actually modify the structure of your hard
                         drive.</em></span></p>
            
                
            <div class="procedure">
               <ol type="1">
                  <li>
                             
                     <p><a name="BId-diskdrake-pa13"></a>Reboot the machine and
                                choose <span class="guimenu">Menu</span> &#8594; <span class="guimenuitem">Console Login</span> (or press the <span class="keycap"><strong>Ctrl</strong></span>+<span class="keycap"><strong>N</strong></span> keys) at the login screen.
                     </p>
                           
                  </li>
                  <li>
                             
                     <p><a name="BIdNEW-diskdrake-pa30"></a>Login as
                                <code class="literal">root</code> and run the command: <strong class="userinput"><code>xinit -e
                                      diskdrake</code></strong></p>
                           
                  </li>
                  <li>
                             
                     <p><a name="BId-diskdrake-pa12"></a>This is what the current
                                <code class="filename">/home</code> partition looks like before modification.
                                We are going to shrink this partition in order to create free space
                                for the new file system.
                     </p>
                     
                             
                     <div class="mediaobject" align="center"><img src="images/diskdrake-main.png" align="middle"></div>
                     
                             
                     <p><a name="BId-diskdrake-pa14"></a>First of all, you need to unmount
                                the <code class="filename">/home</code> partition by clicking on it and then
                                pressing the <span class="guibutton">Unmount</span> button.
                     </p>
                           
                  </li>
                  <li>
                             
                     <p><a name="BId-diskdrake-pa15"></a>The next step, as you may have
                                guessed, is to click on the <span class="guibutton">Resize</span> button. A
                                dialog appears which allows you to choose the new size for the
                                <code class="filename">/home</code> partition. Move the slider to reflect the
                                new size, then click on <span class="guibutton">OK</span>.
                     </p>
                     
                     
                     
                             
                     <div class="mediaobject" align="center"><img src="images/diskdrake-use2.png" align="middle"></div>
                           
                  </li>
                  <li>
                             
                     <p><a name="BId-diskdrake-pa16"></a>When this is done, you
                                will notice that the graphic representation of your hard drive has
                                changed. The <code class="filename">/home</code> partition is smaller, and an
                                empty space appears on the right. Click on the empty space and then on
                                the <span class="guibutton">Create</span> button which appears. A dialog will
                                let you choose the parameters for the new partition. Set the size,
                                choose the file system you want to use (usually <code class="literal">Journalized
                                   FS: ext3</code>) and then enter the mount point for the partition,
                                which in our example will be <code class="filename"><a name="diskdrake-var-ftp3"></a>/var/ftp</code>.
                     </p>
                     
                             
                     <div class="mediaobject" align="center"><img src="images/diskdrake-use3.png" align="middle"></div>
                     
                             
                     <p><a name="BId-diskdrake-pa17"></a>This is how our
                                projected partition table now looks like.
                     </p>
                     
                             
                     <div class="mediaobject" align="center"><img src="images/diskdrake-use4.png" align="middle"></div>
                           
                  </li>
                  <li>
                             
                     <p><a name="BId-diskdrake-pa18"></a><a class="indexterm" name="BId-diskdrake-it4"></a> The last step is to format (prepare to host files) the
                                newly created partition. To format the partition, click on its
                                representation in the partitions picture, then on the
                                <span class="guibutton">Format</span> button. Confirm the writing of the
                                partition table to disk, the formatting of the partition and the
                                update to the <code class="filename">/etc/fstab</code> file. You may be asked
                                to reboot the computer to make changes effective.
                     </p>
                           
                  </li>
               </ol>
            </div>
              
         </div>
         
      </div>
      <div class="navfooter">
         <hr>
         <table width="100%" summary="Navigation footer">
            <tr>
               <td width="40%" align="left"><a accesskey="p" href="mcc-localdisks.html">Prev</a>&nbsp;
               </td>
               <td width="20%" align="center"><a accesskey="u" href="mcc-localdisks.html">Up</a></td>
               <td width="40%" align="right">&nbsp;<a accesskey="n" href="diskdrake-removable.html">Next</a></td>
            </tr>
            <tr>
               <td width="40%" align="left" valign="top">Chapter&nbsp;13.&nbsp;Local Disks&nbsp;</td>
               <td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td>
               <td width="40%" align="right" valign="top">&nbsp;2.&nbsp;Managing Removable
                      Devices
               </td>
            </tr>
         </table>
      </div>
   </body>
</html>