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.

  1. Click the dropdown bar beside Edit Volume for Mediacat_storage.

  2. Select Manage Attachments, and click Detach Volume for instance 1.

  3. Click the dropdown bar beside Edit Volume for OS Volume. Select Create Snapshot

  4. Click Snapshots then you should see the snapshot you just created, create volume and increase Size (GiB) to the size you want:

  1. Click Compute -> Instance, then choose Launch Instance (follow instructions in linked video). Select the volume you just created to boot the instance.
  1. Reattach Mediacat_storage to the new instance similar to step 2

  2. Now you should be able to SSH ubuntu@<floating_ip>, do lsblk to check if you have /dev/vda1 with larger size, you should see something like this except the MOUNTPOINT for vdb1 should be empty:

  1. Do sudo mount /dev/vdb1 /media/data, then lsblk again to check if you have mounted /dev/vdb1. Do cd /media/data, you should have every data and Backup there.