Disks and partitions

This section provides instructions on how to handle disks and drives, such as removable hard disks.

Checking disk capacity

To check the amount of free and used space on a disk, do either of the following:

  • Press PlacesComputer, right click on the disk you want to check and select Properties. The free space on the disk will be displayed on the Basic tab.

  • Press SystemAdministrationSystem Monitor and select the File Systems tab. All disks currently connected to the system should be displayed in the list, along with their free and used capacities.

Advanced disk-usage analysis

For a more accurate analysis of your filesystem, press ApplicationsAccessoriesDisk Usage Analyzer to start the Disk Usage Analyzer.

Press Scan Home to scan your home directory, or press Scan Filesystem to scan the whole filesystem.

See the Disk Usage Analyzer Manual for more information.

Partitioning a device

You can use GNOME Partition Editor to partition storage devices. Install the gparted package (see Add Applications) and then press SystemAdministration Gnome Partition Editor to start the partition editor.

[Caution]

Be careful when altering disk partitions, as it is possible to lose your data if you delete or change the wrong partition.

Freeing space for a new partition

To create a new partition inside an already partitioned device, you must first resize an existing partition. If you already have free space, skip to the section called “Creating a new partition”; otherwise, follow the instructions below:

  1. Press SystemAdministration Gnome Partition Editor.

  2. Select the device to partition from the drop-down list at the top-right of the main window.

  3. A list of partitions will appear. Select the desired partition and choose PartitionUnmount.

  4. To resize the partition choose Resize/Move. The dialog Resize/Move will be shown. You can use the Free Space Following (MiB) box to choose how much space to free after this partition, or Free Space Preceding (MiB) to free space before this partition. Alternatively you can use the slider to adjust the partition size.

  5. To apply the changes, click Resize/Move.

Creating a new partition

To create a new partition:

  1. Select the device to partition from the drop-down list at the top-right of the main window.

  2. A list of partitions will appear. Select the one called unallocated and click New.

  3. From the Filesystem drop-down list choose the desired type of filesystem to use and click Add.

  4. To apply all the changes made, click Apply.

Formatting a partition

You can use GNOME Partition Editor to format disk partitions (see the section called “Partitioning a device” for more information on GNOME Partition Editor).

To format a partition, do as follows:

  1. Press SystemAdministration Gnome Partition Editor.

  2. Select the device to partition from the drop-down list at the top-right of the main window.

  3. A list of partitions will appear. Select the desired partition and choose PartitionUnmount.

  4. Select the partition you want to format and choose PartitionFormat to and select from the list the type of filesystem to format the partition to.

  5. To apply all the changes made, click Apply.

[Warning]

Pressing Apply will cause all of the files on the partition to be permanently deleted.

What is formatting?

To format a hard disk, device or partition means to prepare that particular device to be used for storing data.

The operation of formatting a hard disk or partition is when a specific data-storage format is applied to that device; this format is the “filesystem”.

When you buy a disk it is usually not formatted, and cannot yet be used for storing data. When you format the device, you will notice that the free space on it is less than the original size. This is due to the fact that some space has to be used to make the device usable; this space is occupied by the filesystem. Also, disk manufacturers often use a different standard to measure disk capacity, which results in a further discrepancy.

What is a filesystem?

A filesystem is a particular way of storing and organizing files on a storage device such as a hard disk, and is an important part of an operating system. Without a filesystem, accessing and storing files would be impossible.

There are different types of filesystem. The most common are:

  • ext2 and ext3: these are usually found on GNU/Linux operating systems. Ubuntu uses ext3 as its default filesystem.

  • FAT16 and FAT32: these are Microsoft Windows filesystems found on older computers. If you would like to share data between two computers, the FAT32 format is a good choice.

  • NTFS: this is the filesystem type used by more modern versions of Microsoft Windows.

  • HFS+: this is the Mac OS X default filesystem type.

What is a Partition?

A partition is a means of dividing the storage capacity of a device, such as a hard disk, into several parts which can then be treated as separate storage devices (“logical devices”).

Each logical device is seen by the operating system as a distinct device, and thus is treated as an independent disk.

Partitioning a hard disk can be done for several reasons:

  • To retrieve free space

  • To install different operating systems

  • To better organize data on the hard disk

Mounting and Unmounting Devices

When you connect a removable storage device to your computer, it must be mounted by the operating system so that you are able to access the files on the device.

To find out how to mount and unmount storage devices, see Using Removable Media

When you copy files to a storage device, they are not always written to the device immediately. Instead, they are often stored in a queue so that they can all be transferred across to the device at the same time (for reasons of efficiency). If you disconnect the device before all of the files have been transferred, then you could lose the files. To prevent this, you must always unmount a storage device before disconnecting it.