LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 05-03-2007, 03:07 PM   #1
Doug Vitale
Member
 
Registered: Feb 2007
Distribution: Fedora 10/Mint 5 KDE
Posts: 69

Rep: Reputation: 16
Is Fedora using the swap partition?


I have three OS's installed on my hard drive (Fedora, OpenSUSE, and Ubuntu) and I think that they are sharing the one swap partition. Here's my drive according to fdisk:
Code:
Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1            5362        5613     2024190   83  Linux
/dev/sda2               1        2550    20482843+  83  Linux
/dev/sda3            2551        2811     2096482+  82  Linux swap / Solaris
/dev/sda4   *        2812        5361    20482875   83  Linux

Partition table entries are not in disk order
When I first boot to Fedora, before X starts it says for a few seconds:

Quote:
Unable to access resume device (LABEL=SWAP-sda3)
The SDA3 partition says "Linux swap/Solaris" because I previously tried to install Solaris but aborted the setup. Could this be a problem? How can I tell for sure that Fedora is using the swap partition? Thanks in advance.
 
Old 05-03-2007, 03:32 PM   #2
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
The reason it says "Linux swap/Solaris" is because Linux swap and Solaris share the same partition ID. That's perfectly normal. Check the output of 'free' in the swap line to see if it's recognized. I suspect the error message is more related to something confused about power management.
 
Old 05-03-2007, 09:07 PM   #3
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 61
Quote:
Could this be a problem? How can I tell for sure that Fedora is using the swap partition? Thanks in advance.
It's not a problem if you have lots of RAM and don't even use the swap as my system doesn't. From the output of free...
Code:
             total       used       free     shared    buffers     cached
Mem:       1027656     440356     587300          0      50860     260252
-/+ buffers/cache:     129244     898412
Swap:       594396          0     594396
Kind of an annoying message at any rate.
It's likely that your Fedora /etc/fstab points to a swap partition label which got borked during one of your install attempts.
I would just relabel it like this...
Code:
swapoff -a
mkswap -c -v1 -L SWAP-sda3 /dev/sda3
swapon -a
 
Old 05-04-2007, 05:31 AM   #4
decrepit
Member
 
Registered: May 2006
Distribution: Ubuntu10.04, < fedora12
Posts: 347

Rep: Reputation: 34
You should have "system monitor" on FC6 it's in System > Administration. Under resources it will say how big the swap partition is and how much is being used.
I had a similar error using multiple swap partitions, but all of them were mounted.
 
Old 05-04-2007, 08:57 AM   #5
Doug Vitale
Member
 
Registered: Feb 2007
Distribution: Fedora 10/Mint 5 KDE
Posts: 69

Original Poster
Rep: Reputation: 16
Quote:
Check the output of 'free' in the swap line to see if it's recognized.
How would I do that? I tried "free /dev/sda3" and that didn't work.

Quote:
Originally Posted by decrepit
You should have "system monitor" on FC6 it's in System > Administration. Under resources it will say how big the swap partition is and how much is being used.
I had a similar error using multiple swap partitions, but all of them were mounted.
System Monitor says that 0 bytes of my swap partition was being used...is that normal? Does the swap partition only get used when RAM is completely full?

By the way, do you know how to launch System Monitor in KDE? I couldn't find it. Thanks.
 
Old 05-04-2007, 01:36 PM   #6
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
Quote:
Originally Posted by Go2doug
How would I do that? I tried "free /dev/sda3" and that didn't work.
'man free' - free doesn't take a device argument - just 'free' should return something like
Code:
:free
             total       used       free     shared    buffers     cached
Mem:        516848     510584       6264          0     137944     182060
-/+ buffers/cache:     190580     326268
Swap:       979956         96     979860
If the swap/total said '0' instead of '979956' or some positive integer, then your swap would not be enabled. The 'used' part is irrelevant to whether it *can* be used.

Quote:
System Monitor says that 0 bytes of my swap partition was being used...is that normal? Does the swap partition only get used when RAM is completely full?
Generally, as you see with mine, after a while, a dribble may be used even if physical memory is not completely used. But, initially, seeing zero in use is not uncommon. So I wouldn't worry about it either way. If it needs to be used, it will be, so long as a proper swap partition exists, and swapon(8) has been done and so on.

Huh - R'ing TFM (of swapon) myself, 'swapon -s' should serve as well as eyeballing the output of free. Either way, though.
 
Old 05-04-2007, 02:07 PM   #7
bouchecl
Member
 
Registered: Nov 2005
Location: Quebec
Distribution: Fedora Core / Ubuntu
Posts: 37

Rep: Reputation: 15
Quote:
Originally Posted by digiot
'man free' - free doesn't take a device argument - just 'free' should return something like
[...]
Quite true, but I prefer using the command with the -m (output in MB) and -t (lists the sum of RAM + swap) arguments. It's more readable:

Code:
[bouchecl@fedora ~]$ free -mt
             total       used       free     shared    buffers     cached
Mem:           977        889         87          0         51        431
-/+ buffers/cache:        406        570
Swap:         1027          0       1027
Total:        2004        889       1115

Last edited by bouchecl; 05-04-2007 at 02:09 PM.
 
Old 05-04-2007, 02:31 PM   #8
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
To revert to you first question, you're seeing the message because the newer FC kernels check the swap partition to see if there''s a "suspend" image stored on it, and then to resume from it if one is found.

I'm not sure (since I seldom suspend), but there may be a "suspended" flag set (probably as an empty file in /) which triggers the "check for suspend" actions.

In any case, it's harmless. Unless, of course, you're actually trying to resume.

As to the other part of your question, many (but not, I think, all) distributions will automatically mount all the swap partitions they find on your system, and use them as necessary. So, if you actually suspend a FC session, then boot another distribution, the other distribution might overwrite your FC suspend/resume information so you'd not be able to resume.
 
Old 05-04-2007, 05:24 PM   #9
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
Quote:
Originally Posted by bouchecl
Quite true, but I prefer using the command with the -m (output in MB) and -t (lists the sum of RAM + swap) arguments. It's more readable:
If that's the case, make it an alias rather than specifying the options every time.

PTrenholme - now that you describe fedora's suspend mechanism, that sounds exactly right - except there's little 'might' about it. Swap is assumed to be scratch space and another distro would use it as soon as needed, so only sheer luck or no swapping would avoid the overwrite, I suspect. I wonder if this is common? Seems like a /.suspend file or /var/tmp/suspend (or something) should be created rather than using swap. Though, granted, that would require unallocated 'real' filesystem space. I dunno, though - I never use such features.
 
Old 05-06-2007, 04:06 PM   #10
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
Go2doug
To check if Fedora resumed swap in KDE, open System/KInfoCenter and click on "memory". If the swap section is not light green, then it was not resumed. I have had this happen in a couple distributions, Mandriva and Fedora. For Mandriva it was a result of changing the position of the swap partition in my boot manager from the 3rd partition to the 2nd partition after getting rid of the /home partition and moving it up the list. Even making the appropriate changes in /etc/fstab did not get it to resume, I had to put it back in the 3rd partition position and leave the second empty. I have an elaborate boot manager that only let's the OS see the partitions I want/it needs to see, so this may not apply to your case.
For Fedora, I have the x86_64 distribution, when I installed ntfs-3g from repositories and left SELinux in enabled mode, most adminstration and system setting features were not accessible, thus I could not even turn off SELinux. When I tried installing ntfs-3g from repositories on an image of the FC 6 installation with SELinux in permissive mode, the kernel could not resume swap, but everything else worked. I had to manually mount with command: 'swapon'. To remedy this I had to wipe that one out and load another image and install ntfs-3g and Fuse from source, everything works not using them from repositories, even after countless kernel upgrades since.

Last edited by Junior Hacker; 05-06-2007 at 04:13 PM.
 
Old 05-06-2007, 05:36 PM   #11
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,120

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Yuck.

Check for a "resume" keywork in your loader parms - you can always change it to noresume.
There's always suspend2 as a (better ???) option as well.

Personally, I prefer a distro where *I* make my own choices as to what gets installed/implemented.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Partition swap Mycado Linux - General 3 06-08-2006 07:24 AM
Swap partition paddyjoy Linux - Newbie 2 07-19-2005 07:17 PM
Swap partition Mojojo Linux - Hardware 10 01-20-2005 05:12 PM
more then one swap partition? SLaCk_KiD Linux - General 5 06-22-2003 10:50 PM
Newbie Installing Debian3 on m68k w/250M Partition Needs help creating swap partition AppleMac Linux - Newbie 2 11-01-2002 08:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 06:48 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration