14.9. Managing your partitions

We already learned from "Structure of a hard disk" what partitions are used for; and you initially set up your partitions during the install process. DiskDrake allows you, to some extent, to resize your partitions, move them, etc.

Warning

DiskDrake is a very powerful, and therefore dangerous tool. Misuse of it can very easily lead to loss of data in your hard drive. Consequently, you are advised to take some protective measures before using it:

  1. Backup your data: transferring them on another computer,ZIP disks, etc.

  2. Save your current partition table (the table describing the partitions hold on your hard drive(s)) on a floppy disk (see A note about the expert mode: save the partition table).

14.9.1. The interface

Figure 14-21. The DiskDrake main window

DiskDrake enables you to configure four types of disks on your machine, each one accessible through a different tab:

The hard disks partitioning tab (figure 14-21) is divided in four zones:

14.9.2. In practice: resize an old partition and create a new one

In this section, we are going to do a little exercise that will use the more useful features of the tool. Let's imagine that we suddenly decide to use our machine as an FTP server. We then choose to create a separate /home/ftp partition in order to host the FTP files.

So this is what the current /home partition looks like (figure 14-22), before any modification. We choose to shrink this partition in order to create the new one on the freed space.

Figure 14-22. The /home partition before resizing

As you may have guessed, just click on the Resize button. A dialog will appear (figure 14-23), in which you choose a new size for that /home partition.

Figure 14-23. Choosing a new size

When this is done, you will notice that the graphic representation of your hard-drive has changed, the /home partition became smaller, and an empty space appeared on the right. Click on that empty space and then on the button Create that just just appeared. A dialog (figure 14-24) where you can choose the parameters for the new partition pops up. Change the start sector if you want to leave a new free space between the two /home and /home/ftp partitions. Define the needed size, choose the file system you want (generally Linux native) and then enter the mount point of that partition, in our case /home/ftp.

Figure 14-24. Defining the new partition

This is what our projected partition table looks like now (figure 14-25).

Figure 14-25. The new partition table

Warning

Up until now, we have not really modified the partition table, we just redesigned and rejected it. Further steps will effectively make our changes active, so if you do not intend to modify your system, click on the Undo button until you come back to the beginning.

You finally need to format (prepare to host files) the newly created partition: click on it, then on the Format button. Confirm the writing of the partition table, and then the formating of the partition. You may be asked to reboot the computer to make changes effective.

Figure 14-26. Confirm the writing of partition table

14.9.3. A note about the expert mode: save the partition table

Among many available features, the save and restore from file is one of the more interesting. It allows you to save the current partition table to a file on a disk (floppy for example) and then restore it in case you totally messed up your partition table. It can prove useful as long as you did not reformat partitions, otherwise data will be lost.


Tux on Star from MandrakeSoft Linux is a registered trademark of Linus Torvalds. All other trademarks and copyrights are the property of their respective owners.
Unless otherwise stated, all the content of these pages and all images are Copyright MandrakeSoft S.A. and MandrakeSoft Inc. 2001.
http://www.mandrakelinux.com/