Get the Disk View use "lsblk
" to better visualize hard disks
#lsblk
To see the details of disk
#fdisk -l /dev/sdb
(NOTE: sdb is the hardware name of the disk. Disk name can be different from system to system)
Now to Partition the Disk
Partition the drive using fdisk. You will want to pay close attention to the size of the partition you want, extended or primary, etc:
[root@wwcp ~]# fdisk /dev/sdb
You should now see the secondary drives partitioned space:
#lsblk
Create an ext4 file system on this partition usingmkfs.ext4 /dev/vdb1
[root@wwcp ~]# mkfs.ext3 /dev/sdb1
Create a mount point and mount the secondary drive to this mount point:
[root@wwcp ~]# mkdir /backup
[root@wwcp ~]# mount /dev/sdb1 /backup
Get the drive/partition UUID with the following:
#ls -l /dev/disk/by-uuid/
Add the drive to auto-mount via/etc/fstab
using the partitions UUID:
[root@wwcp ~]# vi /etc/fstab
You should now see the drive via$ df -h
:
[root@wwcp ~]# df -h or [root@wwcp ~]# lsblk