Details

      Description

      Been investigating why the new swap feature isn't working.

      Tested with appliance as follows:

      name: f15-jeos
      summary: swap test
      os:
        name: fedora
        version: 15
      hardware:
        partitions:
          "/":
            size: 3
          "swap":
            size: 2
      packages:
        - @base
        - @core
      

      As you can see from the logs, the extra device is created and the swap command is run along with various other gubbins to make it valid swap (grep swap):
      https://gist.github.com/1187334
      https://gist.github.com/1187314

      Unfortunately, you can see it results in the following useless fstab which has no label.

      LABEL=  swap swap    defaults,noatime 0 0
      devpts     /dev/pts  devpts  gid=5,mode=620   0 0
      tmpfs      /dev/shm  tmpfs   defaults         0 0
      proc       /proc     proc    defaults         0 0
      sysfs      /sys      sysfs   defaults         0 0
      

      Naturally /proc/swaps is empty.

      Fixing it in-image is trivial. I simply re-ran mkswap with labelling `mkswap -L SWAP /dev/sda1` and jammed it into /etc/fstab, then `swapon SWAP`. In this example the device name is /dev/sda2

      Filename				Type		Size	Used	Priority
      /dev/sda2                               partition	1999868	0	0
      

      I then tested it worked as expected, to do this I set high swapping behaviour

      sysctl vm.swappiness=100

      Then ran a benchmark that ate ram. Worked a charm, so the device itself is working fine.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                goldmann Marek Goldmann
                Reporter:
                msavy Marc Savy
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: