Swap cofiguration for raspberry

  • Hi all, I'm running OMV in a raspberry pi B for a couple of years.
    I find out this line in syslog file:

    Code
    systemd[1]: Failed to activate swap /var/swap.
    systemd[1]: Dependency failed for Swap.
    systemd[1]: swap.target: Job swap.target/start failed with result 'dependency'.
    systemd[1]: var-swap.swap: Unit entered failed state.


    and after some lines

    Code
    systemd[1]: Starting Initializes zram swaping...
    init-zram-swapping[849]: Setting up swapspace version 1, size = 121.2 MiB (127098880 bytes)
    init-zram-swapping[849]: no label, UUID=f55f41cc-df07-4cfa-8ede-4524c6559dc3


    and startup ends with this:


    Code
    sudo swapon -s
    Filename				Type		Size	Used	Priority
    /dev/zram0                             	partition	124120	0	5
    /dev/zram1                             	partition	124120	0	5
    /dev/zram2                             	partition	124120	0	5
    /dev/zram3                             	partition	124120	0	5

    Is all fine?
    At the end I have swap file with zram never used, does OMV manage swap stuff or can I configure zram and swap myself?

  • Same situation with rpi4. The main question is should swap to be working with rpi or not, if so where is it should be located (zram, sd, somewere and should i fix it with chmod 600 /var/swap)?


    systemctl status var-swap.swap
    Oct 24 12:47:20 rpi systemd[1]: Activating swap /var/swap...
    Oct 24 12:47:20 rpi swapon[12392]: swapon: /var/swap: insecure permissions 0664, 0600 suggested.
    Oct 24 12:47:20 rpi swapon[12392]: swapon: /var/swap: read swap header failed
    Oct 24 12:47:20 rpi systemd[1]: var-swap.swap: Swap process exited, code=exited status=255
    Oct 24 12:47:20 rpi systemd[1]: Failed to activate swap /var/swap.
    Oct 24 12:47:20 rpi systemd[1]: var-swap.swap: Unit entered failed state.


    /etc/fstab
    proc /proc proc defaults 0 0
    /dev/mmcblk0p1 /boot vfat defaults 0 2
    /dev/mmcblk0p2 / ext4 defaults,noatime,commit=600 0 1
    /var/swap none swap sw 0 0
    # >>> [openmediavault]
    # <<< [openmediavault]
    tmpfs /tmp tmpfs defaults 0 0


    ls -l /var/swap
    -rw-rw-r-- 1 root root 0 May 31 2018 /var/swap


    free -h
    total used free shared buff/cache available
    Mem: 924M 264M 38M 17M 621M 629M
    Swap: 462M 279M 183M


    swapon -s
    Filename Type Size Used Priority
    /dev/zram0 partition 118332 71356 5
    /dev/zram1 partition 118332 71428 5
    /dev/zram2 partition 118332 71228 5
    /dev/zram3 partition 118332 71684 5

Jetzt mitmachen!

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