Disks and partitions

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

Checking how much disk space is available

Click SystemAdministrationSystem Monitor and select the File Systems tab to see how much hard disk space is available on your computer.

Alternatively, click PlacesComputer, right-click a hard disk, click Properties and select the Basic tab to see a summary of the disk space currently available on that disk.

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.

How can I free-up some disk space?

There are several simple ways of making more disk space available:

  • Empty your trash by right-clicking the Trash icon on the bottom panel and selecting Empty the Trash folder.

  • Install Computer Janitor and run it by clicking SystemAdministrationSystem Janitor. This will remove unused or obsolete software packages from your computer. Read the list of packages carefully before you click Cleanup; packages that you have manually downloaded and installed may be listed as unused, even though they are not.

  • Remove software packages that you no longer use. See Add/Remove Applications for information on removing packages.

  • Delete files that you no longer need. You can use the Disk Usage Analyzer (ApplicationsAccessoriesDisk Usage Analyzer) to find which files are taking up the most space. Be careful not to delete files that you still need!

You can also compress and archive your old, rarely-used documents:

  1. Select the files and folders that you want to compress, right-click one of them and select Create Archive.

  2. Choose a name, location and format for the file (the .tar.gz format is the most commonly used on Ubuntu, .zip is compatible with Windows and .tar.lzma usually offers the best compression).

  3. Click Create. An archive file will be created containing compressed copies of your files.

  4. Delete the old uncompressed files to free some disk space.

Partitioning a device

You can use GNOME Partition Editor to partition storage devices. Install the gparted package 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.