Add / Mount a New Hard Disk : Linux Server
One of the first problems encountered by users these days is that they run out of disk space to store data. Fortunately, disk space is now one of the cheapest of all IT commodities. In this chapter, we will look at the steps necessary to integrate a new disk drive into a Linux ( Debian )system.
We will be using
For the test, I have added a new raw hard disk with 20 GB Capacity. This will be later mounted as /fog. Fog is an open source deployment software. I will be using this drive /fog to store FOG project images.

Now power on your Linux instance and login with user root or any other users with sudo access.
Run fdisk -l command.

New disk added is shown here as /dev/sdc
To partition a particular hard disk ( /dev/sdc ) : fdisk /dev/sdc
Value | Description |
n | Create Partition |
p | print partition table |
d | delete a partition |
q | exit without saving the changes |
s | write the changes and exit |

Ok - first thing - primary and logical partitions are concept for MBR disks only.
For modern GPT format disks - all partitions are primary.
Differences between primary and logical:
1st you can boot only from primary partition (i.e. bootloader partition always is primary)
2nd there are limitations of how many primary partitions on MBR disk you can make:
max is 3 primary and 1 extended or 4 primary. So if you need more than 4 partitions on single MBR disk, then you'll have to use extended partition.
- http://www.tomshardware.co.uk
Accept default partition number, unless you don’t have any special requirement to change.

Assign first sector to value : 2048 ( default ).

Provide the size of the partition. Use + prefix. For now, we will use 18 GB ( Total was 20 GB - 2048 MB for the first sector )

Save change using option w and exit. Now the disk is created. Run

Now format the disk with mkfs command.

Create a folder and mount new partition as shown below:


In order to set up the system so that the new file system is automatically mounted at boot time, an entry needs to be added to the /etc/
