Uploaded image for project: 'Funtoo Linux'
  1. Funtoo Linux
  2. FL-8880

Next release unable to activate swapfile on another partition.

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Normal Normal
    • None
    • None
    •  
    • Openrc is attempting to activate swapfile on another partition before the partition is mounted.

      Openrc is unable to activate swapfile on another partition. If I manually type command "swapon -a"  after boot completes the swapfile is enabled.

      Two funtoo 1.4-release installs successfully activate swapfile on another partition. 

      Perhaps it is trying to enable swap before the partition that owns the swapfile is mounted.

      From rc.log:

      • Activating swap devices ...
        swapon: cannot open /funtoo64/swapfile: No such file or directory

      Openrc is treating the partition that owns the swapfile as a localmount.
      If I edit /etc/init.d/swap and change the depends to "after localmount" the swapfile is activated.
      Why does openrc see the mount of this partition as a localmount ?

      All partition mounts listed in fstab are localmount.
      The fact a swap file is on the partition is of no relevance.
      The default behavior of openrc is to enable swap before localmount which only works with a swap formatted partition.
      A swap file can't be enabled if the partition it's on is not mounted prior to running swapon.
      Swap file activation requires swap to be executed after local mount.

      Swap file requires editing /etc/conf.d/swap :

      /etc/conf.d/swap
      # If you are only using local swap partitions, you should not change
      # this file. Otherwise, you need to uncomment the below rc_before line
      # followed by the appropriate rc_need line.
      #rc_before="!localmount"
      #
      # If you are using swap files stored on local file systems, uncomment
      # this line.
      #rc_need="localmount"
      #
      # If you are using swap files stored on network file systems or swap
      # partitions stored on network block devices such as iSCSI, uncomment
      # this line.
      #rc_need="netmount"
      

            Unassigned Unassigned
            cardinal cardinal
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: