Overview

If a RAP server was configured without additional mirrored 2TB or larger disks, or the disks were not properly configured before, the upload and var directories will be smaller than required and may cause issues. The uploads should be moved over to the mirrored pair and var should be expanded to fill the space previously reserved for uploads. From the provided df -h output only the relevant and usable 


Process

Before you begin, make sure you have root privileges, then put the RAP into maintenance mode and stop the webserver.

sudo su

sudo -u apache /usr/bin/php /var/www/rap/occ maintenance:mode --on

systemctl stop httpd

Move uploads

Verify the extra mirrored pair is listed as /dev/sdX for instance

lsblk


Create a partition on /dev/sdX, the extra mirrored pair, with fdisk.

fdisk /dev/sdX

n

p

“Enter”

“Enter”

w


Make a file system on the new partition.

mkfs.xfs /dev/sdX1



*For use in field units only*

Make a temporary mount point, /mnt/newuploads.

mkdir /mnt/newuploads


Mount /dev/sdX1.

mount /dev/sdX1 /mnt/newuploads


Copy the contents of /var/www/rap/uploads to /mnt/newuploads.

cp -ax /var/www/rap/uploads/* /mnt/newuploads


Verify everything copied correctly.

diff -r /var/www/rap/uploads/ /mnt/newuploads/

*end field unit only section*


Edit fstab

vim /etc/fstab

Add this line, but assure this is the correct block device

/dev/sdX1 /var/www/rap/uploads    xfs     defaults        0 0


Reboot and verify sdX1 is mounted.

reboot ; exit

df -h


Ensure that apache is the owner of the upload location

chown -R apache:apache /var/www/rap/uploads