Announcement

Collapse
No announcement yet.

[SOLVED]How to activate swap partition?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [SOLVED]How to activate swap partition?

    Okay , I just realize it when I open KSysGuard. It is written "no swap space available". Then I check with "vmstat" and "free" the result is same (the swap is not used).
    I have see the swappiness at /proc/sys/vm/swappiness and the value is 60.
    Also I have swap partition at hda6 and hda8 (accidentally create 2 swap partition) . So anybody have idea, what should I do??
    P4 3.06 HT,RAM 512 MB, 80GB HD, Geforce 6200 LE, Kubuntu 8.04

    #2
    Re: How to activate swap partition?

    The command to turn it on is
    Code:
    sudo swapon
    as per:

    http://www.linuxcommand.org/man_pages/swapon8.html

    However, the swap partition must be correctly identified in the /etc/fstab file. If so, then it should be activated automatically at boot time.

    Comment


      #3
      Re: How to activate swap partition?

      You can also set this in Kmenu -> system settings -> advanced [tab] -> disk & filesystems.
      Activate Administration Mode and modify/add your swap partitions.

      Comment


        #4
        Re: How to activate swap partition?

        I have try to use swapon... and the result is this :
        I type : sudo swapon -a /dev/hda6

        swapon: cannot canonicalize /dev/disk/by-uuid/9cc2b9d5-0b39-4724-82de-01e80ba5e6ed: No such file or directory
        swapon: cannot stat /dev/disk/by-uuid/9cc2b9d5-0b39-4724-82de-01e80ba5e6ed: No such file or directory
        swapon: cannot canonicalize /dev/disk/by-uuid/dc9dcecf-bde9-487a-ae54-f7c204d6fefe: No such file or directory
        swapon: cannot stat /dev/disk/by-uuid/dc9dcecf-bde9-487a-ae54-f7c204d6fefe: No such file or directory

        Does anybody know what's going on? could it be my filesystem corrupted or damaged??
        P4 3.06 HT,RAM 512 MB, 80GB HD, Geforce 6200 LE, Kubuntu 8.04

        Comment


          #5
          Re: How to activate swap partition?

          Yep, possibly.

          If you can post the output of
          Code:
          fdisk -lu
          ,
          Code:
          blkid
          and
          Code:
          cat /etc/fstab
          , maybe we can see the problem.

          Comment


            #6
            Re: How to activate swap partition?

            Yohooo ...solve!

            after see the cat/etc/fstab and compare with /dev/disk/by-uuid, the symbolic links are not same. So, I edit the /etc/fstab with the symbolic name in by-uuid directory. After save the file. Voila! the KSysGuard show the size swap being used.

            Here is the the result I look at /dev/disk/by-uuid
            lrwxrwxrwx 1 root root 10 2008-04-11 03:51 21d592f8-c644-4605-85a4-781e216cddb0 -> ../../hda6
            lrwxrwxrwx 1 root root 10 2008-04-11 03:51 48AC1356AC133E3E -> ../../hda5
            lrwxrwxrwx 1 root root 10 2008-04-11 03:51 5245c180-9a8b-4465-a8f8-d92902fc329a -> ../../hda7
            lrwxrwxrwx 1 root root 10 2008-04-11 03:51 68FB-5937 -> ../../hda1
            lrwxrwxrwx 1 root root 10 2008-04-11 03:51 8748fcad-6e66-4339-b046-14f1395765e3 -> ../../hda8
            lrwxrwxrwx 1 root root 10 2008-04-11 03:51 af63a094-ec51-11dc-8244-d1cfae280f6f -> ../../hda9


            And this is the fstab before edit by me:
            ...
            # /dev/hda6
            UUID=9cc2b9d5-0b39-4724-82de-01e80ba5e6ed none swap sw 0 0
            # /dev/hda8
            UUID=dc9dcecf-bde9-487a-ae54-f7c204d6fefe none swap sw 0 0
            ...

            But still, I don't how and when did it change.... Still a mystery.
            P4 3.06 HT,RAM 512 MB, 80GB HD, Geforce 6200 LE, Kubuntu 8.04

            Comment


              #7
              Re: [SOLVED]How to activate swap partition?

              Good! I also don't know what would change the symlinks.

              Comment


                #8
                Re: [SOLVED]How to activate swap partition?

                uuid of the swap partition seems to change if you change it in anyway. For example I got this 'disconnect' between the uuid in /etc/fstab and what /dev/disk/by-uuid reports when I resized my swap partition and formatted it.

                Comment

                Working...
                X