Adding a New Disk Drive to an Centos 6 System

Share

I have several servers with Centos running Domino, Sametime etc. I need to setup Sametime Proxy just to use with IBM Connections and Mobile Devices.

We are a small deployment but need more disk space to setup the Proxy on the same machine of the community server

This command above show the hard drives installed

# ls /dev/sd*
/dev/sda   /dev/sda1  /dev/sda2

After instal a new one i get this

# ls /dev/sd*
/dev/sda   /dev/sda1  /dev/sda2 /dev/sdb

dev/sdb is the new hard disk

Create a new partition

# su –
# fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0xd1082b01.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won’t be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

WARNING: DOS-compatible mode is deprecated. It’s strongly recommended to
        switch off the mode (command ‘c’) and change display units to
        sectors (command ‘u’).

Command (m for help):

Switch off DOS compatible mode and change the units to sectors by entering the c and u commands:

Command (m for help): c
DOS Compatibility flag is not set
Command (m for help): u
Changing display/entry units to sectors

In order to view the current partitions on the disk enter the p command:

Command (m for help): p

Disk /dev/sdb: 34.4 GB, 34359738368 bytes
255 heads, 63 sectors/track, 4177 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xd1082b01

  Device Boot      Start         End      Blocks   Id  System

Command (m for help): n
Command action
  e   extended
  p   primary partition (1-4)
p
Partition number (1-4):

Partition number (1-4): 1
First sector (2048-67108863, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-67108863, default 67108863):
Using default value 67108863

Now that we have specified the partition we need to write it to the disk using the w command:

If we now look at the devices again we will see that the new partition is visible as /dev/sdb1:

# ls /dev/sd*
/dev/sda  /dev/sda1  /dev/sda2  /dev/sdb  /dev/sdb1

Create the file system

# /sbin/mkfs.ext3 -L /proxy /dev/sdb1

Mounting the filesystem

mkdir /stproxy

# mount /dev/sdb1 /stproxy

Configuring Centos 6 to Automatically Mount a Filesystem

Edit /etc/fstab

add the line

LABEL=/proxy           /stproxy               ext3    defaults        1 2

This link helps a lot