LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 06-27-2007, 02:42 PM   #1
Volhv
Member
 
Registered: Sep 2006
Distribution: Debian 4.0 and Ubuntu 7.04
Posts: 50

Rep: Reputation: 15
Sharing swap


I plan to share swap partition between Debian 4.0 and Ubuntu 7.04. Have anyone tried it and had any problems?

Last edited by Volhv; 06-27-2007 at 02:44 PM.
 
Old 06-27-2007, 02:43 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
you should have no problems at all, there's nothign important or persistent in there, just and underlying filesystem for accessing the data, but as when a system boots it's reinitialised, there's nothing to go wrong.
 
Old 06-27-2007, 02:44 PM   #3
Volhv
Member
 
Registered: Sep 2006
Distribution: Debian 4.0 and Ubuntu 7.04
Posts: 50

Original Poster
Rep: Reputation: 15
Thanks, acid_kewpie.
 
Old 06-27-2007, 02:45 PM   #4
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,407

Rep: Reputation: 141Reputation: 141
It's OK to share swap, but don't try to use suspend if you do.
 
Old 06-27-2007, 04:43 PM   #5
Volhv
Member
 
Registered: Sep 2006
Distribution: Debian 4.0 and Ubuntu 7.04
Posts: 50

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Quakeboy02
It's OK to share swap, but don't try to use suspend if you do.
I understand that RAM content will be on swap when suspended, but why is it a problem? Is the concern that it will not boot into the same OS?
 
Old 06-27-2007, 05:04 PM   #6
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,407

Rep: Reputation: 141Reputation: 141
Quote:
Originally Posted by Volhv
I understand that RAM content will be on swap when suspended, but why is it a problem? Is the concern that it will not boot into the same OS?
You'd need to do a search, but I've seen posts now and again where someone has tried to resume the wrong OS and wound up with an OS that is marked as suspended and they had to manually change something in order to be able to boot normally (or something like that). Sorry, but I don't have any more info than that. I don't use suspend.
 
Old 06-28-2007, 08:59 AM   #7
Volhv
Member
 
Registered: Sep 2006
Distribution: Debian 4.0 and Ubuntu 7.04
Posts: 50

Original Poster
Rep: Reputation: 15
Thanks. I'll look for information.
 
Old 06-28-2007, 10:38 AM   #8
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
This has to be confirmed but I think that with newer kernels and newer suspend packages, it will refuse to resume a different kernel.

I'll maybe try it... I have to reboot for that
 
Old 06-28-2007, 12:08 PM   #9
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,407

Rep: Reputation: 141Reputation: 141
Quote:
Originally Posted by nx5000
This has to be confirmed but I think that with newer kernels and newer suspend packages, it will refuse to resume a different kernel.

I'll maybe try it... I have to reboot for that
But, what happens after you've booted from the other kernel that wasn't suspended. Does that delete all the info that the first one has been suspended, or does that one get placed in some sort of broken limbo?
 
Old 06-28-2007, 12:47 PM   #10
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
Quote:
Originally Posted by Quakeboy02
But, what happens after you've booted from the other kernel that wasn't suspended. Does that delete all the info that the first one has been suspended, or does that one get placed in some sort of broken limbo?
I guess they have a different signature. (some sort of bytes sequence to differentiate)

/me tries
 
Old 06-28-2007, 01:04 PM   #11
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
Suspending from 2.6.18-4-686, testing branch (for the s2disk and such).
(I use directly the command s2disk from a shell)

Booting the 2.6.21.5. The initrd warns:

Quote:
resume: The system snapshot image could not be read
This might be a result of booting a wrong kernel or typing in a wrong passphrase.
You can continue to boot the system and lose the saved state or reboot and try again.
[Notice that you may not mount any filesystem between now and successful resume. That would badly damage affected filesystems.]

Do you want to continue boot (Y/n)?
Hum I choose n

So that's quite robust.
 
Old 06-28-2007, 01:09 PM   #12
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
Quote:
Originally Posted by nx5000

So that's quite robust.
Uh wait.
System lockup

Maybe my suspend has never worked.. As soon as I got the warning it rebooted, I went back on the 2.6.18, typed my passphrase and went to fetch a beer
When I come back, I have the message
Quote:
suspend: Snapshotting system
And lockup..
lol
 
Old 06-28-2007, 01:15 PM   #13
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
Just checked and..

My suspend for the 2.6.18 does not work, that's why, not a problem of cross-kernel.

The suspend with 2.6.21.5 does work, good.

So it's specific to my system.

I see no problem in sharing swap. Make a try for the resume, as I did.

Last edited by nx5000; 06-28-2007 at 01:17 PM.
 
Old 06-28-2007, 01:39 PM   #14
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,407

Rep: Reputation: 141Reputation: 141
All I can say is that I remember a post from someone about this situation and one of their OSes got locked as a result of booting from a non-suspended OS and then trying to boot the "suspended" one. Whether they screwed up or newer kernels addressed it, I can't say. Hell, it's even likely that I just remember this wrong. Not trying to start a controversy.
 
Old 06-28-2007, 01:42 PM   #15
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
Spreading FUD? ;p

As I said, if you have the same uswsusp as me, this should not happen because it includes this warning.

I'm using uswsusp from debian 4.0.
 
  


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
Sharing swap between FC6 and Ubuntu Regulus Ubuntu 4 11-04-2006 07:08 AM
Sharing swap partitions Jongi SUSE / openSUSE 7 10-12-2005 08:36 AM
sharing swap partition abunsair Linux - Software 2 07-08-2005 01:53 PM
Swap Sharing? Synesthesia Linux - General 1 05-06-2005 02:40 AM
Sharing swap partition arubin Linux - Newbie 6 04-21-2004 12:09 PM

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

All times are GMT -5. The time now is 09:26 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