6. Managing Storage in Graphical Environment

The physical storage that we have will be divided into different chunks called partitions. We can create maximum of four primary partitions in a disk or alternatively three primary partitions and one extended partition. Logical partitions can be created within an extended partition.(extended partition cannot be mounted or will not be formatted with any file-system but it will be divided into different logical partitions)
In Linux the partitions will be represented as device files  in /dev with names:
first device:  /dev/sda and the partitions: /dev/sda1 ....
for the next device: /dev/sdb and so forth

note: In virtualized environment the names will be /dev/vd?

Creating Partitions
--------------------
To create and manage partitions we have a Graphical utility called Disk utility.
Go application -> system tools -> Disk utility

1. Select the free area of the disk
2. Select create partition
3. Give a name and size for the partition. Keep the file system as ext4 as its the default file-system in Red hat 6 and create.
4. Now you have a partition. Mount it. now its usable
5. The Partition that you have just created will not get mounted automatically in next boot. To do so you have to make an entry in /etc/fstab. (when you are mounting the device for the first time, it will write an entry in /etc/mtab. You can copy that entry to /etc/fstab also).
An entry in /etc/fstab will be like

/dev/sda2 /data ext4 defaults 1 2

It says the system that the device /dev/sda2 with file-system ext4 should be mounted in /data with default options, and it should be backed up and checked for errors normally. (we will discuss more about fstab later)