When you add new disk first you need to identify device path.
# fdisk -l
and find path to your new disk, e.g.
Now create new partition:
# fdisk /dev/sdbThen press:
Command (m for help): p
Command (m for help): n
p primary partition (1-4)
Partition number (1-4): 1
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Now you can verify if new partition is visible by Linux system by typing:
You should see entries of old hard drive like:
/dev/sda /dev/sda1 /dev/sda2
and new ones:
Now you must create file system by typing:
This will create ext4 filesystem.
If you prefer xfs or other then check installed formatters by:
and use preferred one by:
On the last step you need to mount newly created file system.
Create directory where to mount:
or mount to already created directory.
NOTE: do not mount to directory containing files because they become not accessible.
Now do mount:
mount /dev/sdb1 /new_directory
At the end do not forget to make proper entries in /etc/fstab file to make mounts permanent.