Announcement

Collapse
No announcement yet.

swap file missing

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

    swap file missing

    In the past 24 hours, my KB 14.10 has become unusable when I'm running a browser (Firefox), and have more than a few tabs open. It just get very slow - I'm running this on an HP Mini 110 Netbook.

    Looking at my system load viewer widget, I see something odd: "Swap: not available". Launching the KDE Partition Manager, I see that partition /dev/sda2/ (3.82 Gb), which should be swap, is labeled type "unknown".

    It appears to me that I have lost my swap file. Correct?

    And if so, how do I get it back? I cannot find anything about this in a search of the forum.

    Any suggestions would be most appreciated!

    #2
    Let's see your /etc/fstab file.
    Using Kubuntu Linux since March 23, 2007
    "It is a capital mistake to theorize before one has data." - Sherlock Holmes

    Comment


      #3
      /etc/fstab file

      Originally posted by Snowhog View Post
      Let's see your /etc/fstab file.
      # /etc/fstab: static file system information.
      #
      # Use 'blkid' to print the universally unique identifier for a
      # device; this may be used with UUID= as a more robust way to name devices
      # that works even if disks are added and removed. See fstab(5).
      #
      # <file system> <mount point> <type> <options> <dump> <pass>
      # / was on /dev/sda3 during installation
      UUID=26190641-f9c2-49f0-bf8b-0333ed0308a5 / ext4 errors=remount-ro 0 1
      # /home was on /dev/sda1 during installation
      UUID=a6c1ac27-3c94-427f-889f-167e5be6d682 /home ext4 defaults 0 2
      # swap was on /dev/sda2 during installation
      #UUID=a19b48e3-4398-4e0c-bb16-b3357b4af719 none swap sw 0 0
      /dev/mapper/cryptswap1 none swap sw 0 0

      Comment


        #4
        Encrypted swap partition? Why?
        Using Kubuntu Linux since March 23, 2007
        "It is a capital mistake to theorize before one has data." - Sherlock Holmes

        Comment


          #5
          To protect client information I am legally required to keep private, I run Truecrypt, and thinking that it creates its own encrypted swap when it first executes. I just tried terminating Truecrypt, which normally is one of the first application programs I launch after a reboot, so I can access client information, and the encrypted swap did not disappear.

          What's odd to me is that I've been running Truecrypt for probably well over a year, and it's not affected my normal swap file. Now suddenly something has happened, and I cannot account for it at all.

          If I uninstalled Truecrypt (which I need only for a couple of application programs), somehow restored the swap (don't know how to do this), and reinstalled Truecrypt, it would surely recreate an encrypted swap for its own use, and everything would be ok, just as it has been for over a year. I'd like first to simply restore the swap, if possible, without Truecrypt running, and see if that alone would restore normal function.

          Comment


            #6
            I don't use encryption, so I can't provide any qualified advise. But as I understand it, any partition, once encrypted but where the encryption tool/engine isn't used/running, won't be accessible (let alone even recognized) if not unencrypted first.
            Using Kubuntu Linux since March 23, 2007
            "It is a capital mistake to theorize before one has data." - Sherlock Holmes

            Comment


              #7
              Let's investigate. What's the output of these commands:
              Code:
              cat /proc/meminfo | grep -i swap
              
              cat /proc/swaps
              
              swapon --show
              
              vmstat -s | grep -i swap
              
              vmstat -w
              
              free

              Comment


                #8
                [I wrote this before seeing SteveRiley's response; I'll post this anyway as it may be relevant.]

                I have uninstalled Truecrypt. I then used KDE partition editor to change /dev/sda2 to type "linuxswap" (I deleted the old swap partition first, of course). I then rebooted, hoping I had restored the swap file. Nope. Not so.

                Here is my current /etc/fstab:

                Code:
                UUID=a6c1ac27-3c94-427f-889f-167e5be6d682    /home    ext4    defaults    0    2
                UUID=26190641-f9c2-49f0-bf8b-0333ed0308a5    /    ext4    errors=remount-ro    0    1
                And here is what I see in the KDE partition editor, currently:

                Click image for larger version

Name:	KDE-Partition-Editor-screenshot.png
Views:	1
Size:	88.6 KB
ID:	642638

                What can I do to restore my swap file?

                [I'll now try the commands in SteveRiley's post and report back.]

                Comment


                  #9
                  Originally posted by SteveRiley View Post
                  Let's investigate. What's the output of these commands:
                  Code:
                  cat /proc/meminfo | grep -i swap
                  
                  cat /proc/swaps
                  
                  swapon --show
                  
                  vmstat -s | grep -i swap
                  
                  vmstat -w
                  
                  free
                  Code:
                  $ cat /proc/meminfo | grep -i swap
                  SwapCached:            0 kB
                  SwapTotal:             0 kB
                  SwapFree:              0 kB
                  Code:
                  $ cat /proc/swaps
                  Filename
                  Code:
                  tomc@LT:~$ swapon --show
                  tomc@LT:~$
                  Code:
                  tomc@LT:~$  vmstat -s | grep -i swap
                         216300 K swap cache
                              0 K total swap
                              0 K used swap
                              0 K free swap
                              0 pages swapped in
                              0 pages swapped out
                  tomc@LT:~$
                  Code:
                  tomc@LT:~$ vmstat -w
                  procs ---------------memory-------------- ---swap-- -----io---- -system-- ------cpu-----
                   r  b     swpd     free     buff    cache   si   so    bi    bo   in   cs us sy id wa st
                   0  0        0    18712     6416   211856    0    0   476    44  357  815 35  8 50  7  0
                  tomc@LT:~$

                  Comment


                    #10
                    You have a swap partition, but your system knows nothing about it -- as is evidenced by the output of those various commands. You'll need a line in /etc/fstab to declare /dev/sda2 as your swap partition.

                    This should do it:
                    Code:
                    /dev/sda2   none   swap   sw   0   0

                    Comment


                      #11
                      SteveRiley - indeed it does! Thank you very much.

                      Comment

                      Working...
                      X