Section 1: Configure /home2

Step 1: Identify the Disk

Run the following command to list attached storage devices:

lsblk

Example output:

vdb 253:16 0 500G 0 disk

Assume /dev/vdb will be used for /home2.

Step 2: Create a New Partition (only for new/empty disks)

parted -s /dev/vdb mklabel gpt
parted -s /dev/vdb unit mib mkpart primary 0% 100%

Step 3: Format the Partition

mkfs.ext4 /dev/vdb1

Step 4: Mount the Volume

Create a mount point and add the volume to /etc/fstab:

mkdir /home2
echo >> /etc/fstab
echo '/dev/vdb1 /home2 ext4 defaults,noatime,nofail 0 0' >> /etc/fstab
mount /home2
systemctl daemon-reexec

Step 5: Set /home2 as the Default cPanel Home Directory (Optional)

To configure cPanel to use /home2 for new accounts, refer to this guide:

https://support.cpanel.net/hc/en-us/articles/360057480754-How-to-create-new-cPanel-users-on-a-different-home-directory

Restart cPanel:

/scripts/restartsrv_cpsrvd

 

Section 2: Configure /home3

Step 1: Identify the Disk

Run:

lsblk

Example output:

vdc 253:32 0 500G 0 disk

Assume /dev/vdc will be used for /home3.

Step 2: Create a New Partition (only for new/empty disks)

parted -s /dev/vdc mklabel gpt
parted -s /dev/vdc unit mib mkpart primary 0% 100%

Step 3: Format the Partition

mkfs.ext4 /dev/vdc1

Step 4: Mount the Volume

Create a mount point and update /etc/fstab:

mkdir /home3
echo >> /etc/fstab
echo '/dev/vdc1 /home3 ext4 defaults,noatime,nofail 0 0' >> /etc/fstab
mount /home3
systemctl daemon-reexec

Step 5: Set /home3 as the Default cPanel Home Directory (Optional)

To configure cPanel to use /home3 for new accounts, refer to this guide:

https://support.cpanel.net/hc/en-us/articles/360057480754-How-to-create-new-cPanel-users-on-a-different-home-directory

Restart cPanel:

/scripts/restartsrv_cpsrvd

¿Fue útil la respuesta? 0 Los Usuarios han Encontrado Esto Útil (0 Votos)