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 barbesideEdit VolumeforMediacat_storage. -
Select
Manage Attachments, and clickDetach Volumefor instance 1. -
Click the
dropdown barbesideEdit VolumeforOS Volume. SelectCreate Snapshot -
Click
Snapshotsthen you should see the snapshot you just created,create volumeand 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_storageto the new instance similar to step 2 -
Now you should be able to
SSH ubuntu@<floating_ip>, dolsblkto check if you have/dev/vda1with larger size, you should see something like this except theMOUNTPOINTforvdb1should be empty:
- Do
sudo mount /dev/vdb1 /media/data, thenlsblkagain to check if you have mounted/dev/vdb1. Docd /media/data, you should have every data and Backup there.