Register now or log in to join your professional community.
First find your new disk by using this command
fdisk -cul /dev/sd* (if RHEL6 then -cul or if7 then -l)
if disk is IDE then fdisk -cul /dev/hd*
it may be like sdc , sdb , hda etc
Now you have to partition it by using this command
fdisk /dev/sdX (x=b/c/d )
partprobe /dev/sdX (if RHEL6 then reboot it if7 then just partprobe)
Do file system
mkfs.ext4 /dev/sdXn (for ext4 filesystem)
#fdisk -l to list all available hard disks
#fdisk -cu /dev/sd? to start the process and display the warning message
#portprob /dev/sd? to reload the new partition table
#mkfa.ex4 /dev/sd? to create a file system ex4
then you can mount it using
# mount -t ext4 /dev/sd? /<the directory >
or
you can add it in fstab file
#vim /etc/fstab
/dev/sd? /<directory> ext4 default 11
or by using UUID
UUID=?????????????? /<directory> ext default11
:wq
use this command to get UUID
#blkid
after you edited the fstab file use this command to check if it mounted correctly
#mount -a