Move swap file to external drive

  • I know that swap is bad and also wear SD, so while compiling stuff sometimes I have errors that seems related to missing free memory.
    How can I move the swap file from /var/swap.file to something like /media/fa36508a-b3c4-4499-b30a-711dd5994225/ready_share/data that is a shared folder on a remote drive?

  • I haven't migrate swap to another drive, but you can use Gpart.


    Or you can buy another SSD and clone the old drive over it.


    If you want to prolong your SSD or flash drive, install Flashmemory plugin.

    OMV v5.0
    Asus Z97-A/3.1; i3-4370
    32GB RAM Corsair Vengeance Pro

  • Flashmemory plugin already installed.
    why have I to use gpart? I want to keep the swap file approach, not the swap partition one.
    Usually dphys-swapfile has the config in /etc/dphys-swapfile but I cannot find nothing there despite of with free -m I see
    total used free shared buffers cachedMem: 973 924 49 0 4 651-/+ buffers/cache: 267 705Swap: 69 69 0

    • Offizieller Beitrag

    Just add an entry


    CONF_SWAPFILE=/path/to/swap.filein/etc/dphys-swapfileand reboot.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


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


    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!