tmp issue and rebuild instance - UTMediaCAT/mediacat-docs GitHub Wiki
/tmp
/tmp
is a folder in linux OS that stores any temperate file generated by processes.
It will cause all kinds of problem if /tmp
is full.
Use df -kh
to check usage of /tmp
. You should see something similar to this:
Usually /tmp is stored under /dev/vda1, you can verify this with df -kh /tmp
.
The /tmp usage in the above example is 33% (26G/78G). If it reach 100% when running an crawler, consider clean up /tmp or increase /tmp size by rebuilding the instance.
Clean /tmp
Use this command sudo find /tmp -type f -atime +10 -delete
to clean up /tmp regularly.
It will delete all files in /tmp that has not been accessed for more than 10 days. Change +10
to delete more recent /tmp files.
Rebuilding Instance
NOTE!!! Always do some test in Arbutus Cloud before you make any change to a major Instance!!!
Login to Compute Canada UI with password here.
OS volume
stored the OS, it includes /tmp. Mediacat_storage
stores all important crawler data and the whole OS Backup in /media/data/Backup
.
Check this page for more instruction on backup.
-
Click the
dropdown bar
besideEdit Volume
forMediacat_storage
. -
Select
Manage Attachments
, and clickDetach Volume
for instance 1. -
Click the
dropdown bar
besideEdit Volume
forOS Volume
. SelectCreate Snapshot
-
Click
Snapshots
then you should see the snapshot you just created,create volume
and increaseSize (GiB)
to the size you want:
- Click
Compute
->Instance
, then chooseLaunch Instance
(follow instructions in linked video). Select the volume you just created to boot the instance.
-
Reattach
Mediacat_storage
to the new instance similar to step 2 -
Now you should be able to
SSH ubuntu@<floating_ip>
, dolsblk
to check if you have/dev/vda1
with larger size, you should see something like this except theMOUNTPOINT
forvdb1
should be empty:
- Do
sudo mount /dev/vdb1 /media/data
, thenlsblk
again to check if you have mounted/dev/vdb1
. Docd /media/data
, you should have every data and Backup there.