11.11. DiskDrake: manage 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 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).

11.11.1. The interface

Figure 11-23. The DiskDrake main window

The main DiskDrake window (figure 11-23) is divided in four zones:

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

In this section, we are going to make a little exercise that will use 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 look like the current /home partition (figure 11-24), before any modification. We choose to shrink this partition in order to create the new one on the freed space.

Figure 11-24. The /home partition before resizing

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

Figure 11-25. Choosing a new size

When this is done, you notice 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 appeared. A dialog (figure 11-26) 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 filesystem you want (generally Linux native) and then enter the mount point of that partition, in our case /home/ftp.

Figure 11-26. Defining the new partition

This is what our projected partition table looks like now (figure 11-27).

Figure 11-27. The new partition table

Warning

Up to now we did not really modify 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 it 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 in the meanwhile to take changes into account.

Figure 11-28. Confirm the writing of partition table

11.11.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 that 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. 2000.
http://www.linux-mandrake.com/