Run these commands (with sudo in front of them or, less preferably, as the root user):
fdisk -l > /tmp/saveOfOutput # This creates a baseline for step #3 below.
2) With a physical server: Turn off the server and connect the physical disk, and turn it back on.
With a virtual server: Add the disk in vSphere
3) As root, issue these commands:
fdisk -l #find added device in the output of this command
#If it is not seen, reboot. You can compare the output with the /tmp/saveOfOutput file above.
# In this example, we'll assume that the newly added disk is called /dev/sdc
fdisk -l /dev/sdc
vgcreate vgpoolci /dev/sdc #Replace "vgpoolci" with an arbitrary name throughout these directions.
lvcreate -L 229.8G -n lvci vgpoolci
#229.8G should be replaced with the desired size of the logical volume.
#Replace "lvci" with an arbitrary name of a logical volume throughout these directions.
mkfs -t ext3 /dev/vgpoolci/lvci
mkdir /newdirname # Replace newdirname with the desired name of a new directory throughout these directions.
mount -t ext3 /dev/vgpoolci/lvci /newdirname
To have the file system mount every time (after rebooting), you can modify the /etc/fstab. However, mistakes in this file can prevent the system from booting again. To recover the system, you may need to log into maintenance mode. If the file system is read only, please see this link. If you want to be conservative and avoid modifying the /etc/fstab, do these steps instead (to have the new disk and file system mount automatically):
iii. Enter these two lines of text and save the changes (change "/dev/vgpoolci/lvci' to what you used in step #8):
#!/bin/bash mount -t ext3 /dev/vgpoolci/lvci /newdirname