How to Mount a Secondary Drive as a Backup Drive For CENTOS

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 using mkfs.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











  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to Move Accounts From One cPanel Server To Another ?

  This tutorial explains a simple, straightforward method for migrating cPanel accounts from...

How do I set the Primary Interface in WHM?

Under Basic cPanel/WHM Configuration, there is an area called Primary Interface. By default, if...

How to install cPanel on CentOS

Installation Notes A CentOS or Red Hat server that is going to have cPanel installed needs a...

Why is cPanel/WHM not loading?

There are two main reasons why cPanel/WHM isn't loading that we've seen.Brand New ServerIf you...

Where Does cPanel Put It?

I can think of a few things that are wrong with that title but in all seriousness…don’t...