A
A
Andrew B2019-07-31 10:58:56
Debian
Andrew B, 2019-07-31 10:58:56

How to add locations to /tmp directory on Debian 9?

Recently, all sites began to fall, due to the fact that the / tmp directory is filled with temporary MySQL tables.
Can you please tell me how to remount all this correctly so that the /tmp directory is 50GB?

df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            7.9G     0  7.9G   0% /dev
tmpfs           1.6G   72M  1.5G   5% /run
/dev/sda5       2.7T  2.1T  482G  82% /
tmpfs           7.9G     0  7.9G   0% /dev/shm
tmpfs           5.0M   20K  5.0M   1% /run/lock
tmpfs           7.9G     0  7.9G   0% /sys/fs/cgroup
/dev/sda2      1008M   38M  920M   4% /boot
/dev/sda4       3.9G   17M  3.6G   1% /tmp
tmpfs           1.6G     0  1.6G   0% /run/user/0

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
pfg21, 2019-07-31
@doommyyy

option 2: unmount /tmp and delete the corresponding entry in /etc/fstab. create the directory /tmp, now it will be created on the partition / i.e. /dev/sda5
option 3: move the contents of the /tmp directory to a partition where there is free space.
delete /tmp and symlink to a new location instead,
or make an entry in /etc/fstab with the bind option. the /tmp directory will transparently lie on another partition.

S
Saboteur, 2019-07-31
@saboteur_kiev

Just umount / tmp
folder / tmp you probably already have.
PS In general, for the future, you can read about LVM, which allows you to edit partitions and increase online space. And in the case of some file systems, you can also reduce.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question