I need to sort 7 GB txt file and extract uniq lines. PC has OMV on 4 core CPU and 16 Gb RAM. And i supposed it will be enough because file size less than available memory, however after executing
# sort -u 7GB.txt > testsort.txt
sort: write failed: /tmp/sortjpzocK: No space left on device
I tried to increase /tmp by adding below line in /etc/fstab
but it does not work after reboot, i still got 7.3G /tmp
Code
root@media:~# df -h
Filesystem Size Used Avail Use% Mounted on
udev 7.3G 0 7.3G 0% /dev
tmpfs 1.5G 2.6M 1.5G 1% /run
/dev/nvme0n1p2 467G 199G 245G 45% /
tmpfs 7.3G 84K 7.3G 1% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 7.3G 0 7.3G 0% /tmp
/dev/nvme0n1p1 511M 152K 511M 1% /boot/efi
However if i need temporary increase, it works
Code
root@media:~# mount -o remount,size=25G /tmp/
root@media:~# df -h
Filesystem Size Used Avail Use% Mounted on
udev 7.3G 0 7.3G 0% /dev
tmpfs 1.5G 2.6M 1.5G 1% /run
/dev/nvme0n1p2 467G 199G 245G 45% /
tmpfs 7.3G 84K 7.3G 1% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 25G 0 25G 0% /tmp
/dev/nvme0n1p1 511M 152K 511M 1% /boot/efi
I know that i may tell sort to use another folder to keep temp files for its work but i wish to increase /tmp permanently.