Mount a disk as /home2 for cPanel servers
=================================
1) To see the free disk available on the server
[root@server2 ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 120G 0 disk
├─sda1 8:1 0 200M 0 part /boot/efi
├─sda2 8:2 0 1G 0 part /boot
└─sda3 8:3 0 118.8G 0 part
├─centos-root 253:0 0 50G 0 lvm /
├─centos-swap 253:1 0 7.6G 0 lvm [SWAP]
└─centos-home 253:2 0 61.2G 0 lvm /home
sdb 8:16 0 1000G 0 disk
loop0 7:0 0 2.2G 0 loop /home/virtfs/apollos/var/tmp
[root@server2 ~]#
2) Use the command fdisk to confirm > fdisk -l
3) Create a directory mkdir /home2
4) make the partition on /dev/sdb by executing
fdisk /dev/sdb
and then use following in the prompt
>“n” for new partition
> “p” for primary partition
> “1” for the first partition
> “Enter” / “Enter” for the first AND last cylinders (automatically use the entire disk)
> “w” to save what you have done
5)Next step is to format the parted disk.
mkfs.ext4 /dev/sdb1
6) Mount formate partition
mount /dev/sdb1 /home2
7) If you want the partition to auto mount on server (re)boot edit fstab file located at /etc/fstab and add one of following lines at the bottom
/dev/sdb1 /home2 ext3 defaults 0 0
(if you're not sure how to add fstab entry, then use /etc/mtab entries as a reference )
Mount the file system by using the command
Mount -a or mount
========================================
Login to WHM
9) Basic WebHost Manager® Setup >> set /home2 directory instead of /home
Thanks
Sreejith C