Increase /tmp size

  • 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

    Code
    tmpfs     /tmp     tmpfs     defaults,size=25G,mode=1777     0     0


    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.

  • macom

    Hat das Thema freigeschaltet.
    • Offizieller Beitrag

    tmpfs defaults to half of your ram. How much ram does your system have?

    omv 7.4.2-2 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.14 | compose 7.2.1 | k8s 7.2.0-1 | cputemp 7.0.2 | mergerfs 7.0.5 | scripts 7.0.8


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

    • Offizieller Beitrag

    it does not work. Seems /tmp size configured according to RAM somewhere, and ignored fstab value.

    Since setting tmpfs to larger than your ram is going to swap at some point, why not just tell sort to use a temp dir other than something using tmpfs?


    Zitat

    -T, --temporary-directory=DIR

    use DIR for temporaries, not $TMPDIR or /tmp; multiple options specify multiple directories

    omv 7.4.2-2 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.14 | compose 7.2.1 | k8s 7.2.0-1 | cputemp 7.0.2 | mergerfs 7.0.5 | scripts 7.0.8


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Since setting tmpfs to larger than your ram is going to swap at some point, why not just tell sort to use a temp dir other than something using tmpfs?

    I got two option either set external /tmp or temporary increase /tmp. But i wondering why it's not working in fstab

    • Offizieller Beitrag

    But i wondering why it's not working in fstab

    Did you reboot or remount?

    omv 7.4.2-2 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.14 | compose 7.2.1 | k8s 7.2.0-1 | cputemp 7.0.2 | mergerfs 7.0.5 | scripts 7.0.8


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!