Storing Engine data in a secondary disk drive
In some situations, you may want the Engine to store its data in a disk drive different from the system drive:
Little space available in the system drive.
Faster secondary drive.
The following procedure shows you the recommended way for storing the data of the Engine in a secondary disk drive:
Log in to the CLI of the Appliance that hosts the Engine.
Create a new partition in the secondary disk using fdisk. For this part of the procedure, we assume that your secondary disk is a second SCSI or SATA device in the Appliance named /dev/sdb. If this is not the case, you make have to adapt the commands below to suit your specific needs. Type the following commands to create the first primary partition in the secondary disk:
sudo fdisk /dev/sdb
n(for creating a new partition)
p(for creating a primary partition)
1(create the first partition)
1(default number for the first cylinder)
2610(default number for the last cylinder)
w(write the partition info to the disk)
Format your newly created partition with the ext4 filesystem:
sudo mkfs -t ext4 /dev/sdb1
Stop the Engine:
sudo systemctl stop nxengine@1
Rename the data folder of the Engine to keep its contents:
cd /var/nexthink/engine/sudo mv 01/ 01-old/
Recreate the data folder of the Engine:
sudo mkdir 01/
Mount the folder on the recently created partition of the secondary disk:
sudo mount /dev/sdb1 /var/nexthink/engine/01
Edit the /etc/fstab file for the system to automatically mount the secondary drive while booting:
sudo vi /etc/fstab
Add the following line to the end of the file:
/dev/sdb1 /var/nexthink/engine/01 ext4 defaults 1 2
Save your changes and quit the text editor:
Copy the contents of the old data folder of the Engine to the new data folder:
sudo cp -r /var/nexthink/engine/01-old/* /var/nexthink/engine/01
Set the Engine as owner of the data folder:
chown -R nxengine:nxengine /var/nexthink/engine/01
Restart the Engine
sudo systemctl start nxengine@1
Now the Engine is using the secondary disk drive as storage medium.
You can use a similar method to store the logs of the Engine in a secondary disk drive. Just mount the directory
/var/log/nexthink on a partition of the secondary disk in much the same way as explained above for
The operations described in this article should only be performed by a Nexthink Engineer or a Nexthink Certified Partner.
If you need help or assistance, please contact your Nexthink Certified Partner.