Colasoft Knowledge Base nChronos How-tos How to Expand the Storage Space on nChronos Server

How to Expand the Storage Space on nChronos Server

E-mail Print PDF

Storing the packet files on the server can be really helpful for retrospective analysis. However, it may come to a point that you don’t have enough storage space. In order to expand the storage space, you consider adding one more hard disk to the server. Unfortunately, CentOS won’t automatically create a partition for the new disk. So you need to create a partition by yourself. Please follow the steps below to do so:

We need login to the server side as root user.

1. Check the hard disks with the command: fdisk –l

The name of new disk in this demo is sdb. As you can see there are two partitions already in sda, but no partition in sdb. If you are adding a third disk, it would show as sdc, and the fourth one as sdd, and so on.

1

2. Create a new partition

a. Input command: fdiks /dev/sdb

2

b. View the current partition by inputting: p

As you can see, there is no partition yet. If there is a partition, you could delete the partition by inputting: d

Also, you could always check the help document by inputting: m

3

c. Create a new partition by inputting: n

d. Create the partition as extended by inputting: e

e. Set the partition number as: 1

f. Set the first cylinder as the default by pressing Enter

g. Set the last cylinder as the default by pressing Enter

h. Input: n

i. Create the logical partition by inputting: l

j. Set the first cylinder as the default by pressing Enter

k. Set the last cylinder as the default by pressing Enter

4

l. Check if the partition has been created by inputting: p

Remember the device name for the logical partition. In this demo, the device of logical partition is sdb5.

5

m. Save the change by inputting: w

6

3. Format the new partition into ext4 with command: mke2fs –t ext4 /dev/sdb5

7

4. Create a mount dir, in this demo we name it as /datab, with command: mkdir /datab

8

5. Mount the new disk to the file with the command : mount /dev/sdb5 /datab

Check the result with the command: df –Th

9

6. Edit the fstab file to set the automatically mounting when the system start with the command: vim /etc/fstab

Add the following record to the configuration file:

/dev/sdb5 /datab ext4 default 0 0

After finish the configuration, press ESC key to escape from the editing, and type :wq! to save the changing.

10

 

 

Last Updated on Wednesday, 07 December 2016 09:35  

Add comment


Security code
Refresh