Adding a partition (or disk) to a server with the ispmanager panel
Why?
The ispmanager panel has an important feature: additional partitions or disks can be mounted only before installing the ispmanager panel, otherwise, smooth operation of the panel is not guaranteed.
As an exception, you can mount storage for backups after installing the panel. This will not affect operation.
The panel stores sites and user mail in the "/var/www/" directory, and databases in the "/var/lib/" directory. So to use a separate disk for storing sites and mail, use the mount point "/var/www/", and for databases – "/var/lib/". You can also use the "/var/" directory for all of it together.
Mount to the "/var/lib/" or "/var/" directory when installing the operating system, as they contain data from important OS directories.
Instructions
Mounting an additional disk in the "/var/www" directory:
1. Mount the additional disk to the server.
2. Create a GPT (recommended) or MBR type table on the new disk, and then create a partition, allocating all the free space.
3. Example with the "parted" utility:
parted /dev/sdc
(parted) mktable gpt
(parted) mkpart ext4 primary 0 -0M
4. Create a file system in the partition, e.g., "ext4":
mkfs -t ext4 /dev/sdc1
5. Mount the new partition "/dev/sdc1" to "/var/www/":
mount /dev/sdc1 /var/www
6. Add an entry to "/etc/fstab" for automatic mounting:
lsblk -f | grep sdc1
├─sdc2 ext4 30ee2560-8175-47f0-833d-92d565b1c296
echo 'UUID=30ee2560-8175-47f0-833d-92d565b1c296 /var/www ext4 rw 0 0' | sudo tee -a /etc/fstab
After performing these steps, ensure the new entry is present in the "/etc/fstab" file.
After rebooting, use "df -h" to check that the new partition has been automatically mounted in "/var/www/".
Now you can install the ispmanager panel and use the new partition!