public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
* suspend to disk not working due to swap space failure
@ 2006-08-08 13:13 rasmit.ranjan
  2006-08-08 13:45 ` Rafael J. Wysocki
  2006-08-08 13:53 ` Johannes Berg
  0 siblings, 2 replies; 9+ messages in thread
From: rasmit.ranjan @ 2006-08-08 13:13 UTC (permalink / raw)
  To: linux-pm

Hi all,
    In my laptop, suspend to disk was working properly.But after so many
days I tried it today.But it failed. First time i tried it showed " Not
enough space, Error -12 suspending".But i tried once more. Then it
failed  showing "error: can not find swap device, try swapon -a ".This
seems my swap partition is not active. So I tried "swapon -a" but it did
not work. Also the output of "swapon -s " shows nothing. I tried "cat
/proc/swaps" but this shows nothing as well. So i tried creating a new
swap space by the command " mkswap". But still my swap partition does
not come up. I reboot my system but that did not work as well. What
might be the problem? 
My laptop has RAM of 256 MB and swap space is 1 GB and I am using kernel
2.6.15.4.
 
Thanks,
Rasmit. 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: suspend to disk not working due to swap space failure
  2006-08-08 13:13 rasmit.ranjan
@ 2006-08-08 13:45 ` Rafael J. Wysocki
  2006-08-08 13:53 ` Johannes Berg
  1 sibling, 0 replies; 9+ messages in thread
From: Rafael J. Wysocki @ 2006-08-08 13:45 UTC (permalink / raw)
  To: rasmit.ranjan; +Cc: linux-pm

On Tuesday 08 August 2006 15:13, rasmit.ranjan@wipro.com wrote:
> Hi all,
>     In my laptop, suspend to disk was working properly.But after so many
> days I tried it today.But it failed. First time i tried it showed " Not
> enough space, Error -12 suspending".But i tried once more. Then it
> failed  showing "error: can not find swap device, try swapon -a ".This
> seems my swap partition is not active. So I tried "swapon -a" but it did
> not work. Also the output of "swapon -s " shows nothing. I tried "cat
> /proc/swaps" but this shows nothing as well. So i tried creating a new
> swap space by the command " mkswap". But still my swap partition does
> not come up. I reboot my system but that did not work as well. What
> might be the problem? 

The header of your swap partition got lost.  Please try
"mkswap <your_swap_partition_name>" and then swapon -a.  If it works, the
suspend should work either.

Greetings,
Rafael

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: suspend to disk not working due to swap space failure
  2006-08-08 13:13 rasmit.ranjan
  2006-08-08 13:45 ` Rafael J. Wysocki
@ 2006-08-08 13:53 ` Johannes Berg
  1 sibling, 0 replies; 9+ messages in thread
From: Johannes Berg @ 2006-08-08 13:53 UTC (permalink / raw)
  To: rasmit.ranjan; +Cc: linux-pm

rasmit.ranjan@wipro.com wrote:
> So i tried creating a new
> swap space by the command " mkswap". But still my swap partition does
> not come up. I reboot my system but that did not work as well. What
> might be the problem? 
Is it listed in /etc/fstab so swapon -a can find it?

johannes

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: suspend to disk not working due to swap space failure
@ 2006-08-09  3:05 rasmit.ranjan
  0 siblings, 0 replies; 9+ messages in thread
From: rasmit.ranjan @ 2006-08-09  3:05 UTC (permalink / raw)
  To: rjw; +Cc: linux-pm

 

> -----Original Message-----
> From: Rafael J. Wysocki [mailto:rjw@sisk.pl] 
> Sent: Tuesday, August 08, 2006 7:15 PM
> To: Rasmit Ranjan (WT01 - Semiconductors & Consumer Electronics)
> Cc: linux-pm@lists.osdl.org
> Subject: Re: [linux-pm] suspend to disk not working due to 
> swap space failure
> 
> On Tuesday 08 August 2006 15:13, rasmit.ranjan@wipro.com wrote:
> > Hi all,
> >     In my laptop, suspend to disk was working properly.But after so 
> > many days I tried it today.But it failed. First time i 
> tried it showed 
> > " Not enough space, Error -12 suspending".But i tried once 
> more. Then 
> > it failed  showing "error: can not find swap device, try swapon -a 
> > ".This seems my swap partition is not active. So I tried 
> "swapon -a" 
> > but it did not work. Also the output of "swapon -s " shows 
> nothing. I 
> > tried "cat /proc/swaps" but this shows nothing as well. So i tried 
> > creating a new swap space by the command " mkswap". But 
> still my swap 
> > partition does not come up. I reboot my system but that did 
> not work 
> > as well. What might be the problem?
> 
> The header of your swap partition got lost.  Please try 
> "mkswap <your_swap_partition_name>" and then swapon -a.  If 
> it works, the suspend should work either.

I tried doing this as wel. But it didn't work. Actually my /etc/fstab
file doesn't show any entry for swap partition.
> 
> Greetings,
> Rafael
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: suspend to disk not working due to swap space failure
@ 2006-08-09  3:05 rasmit.ranjan
  2006-08-09  6:04 ` Rafael J. Wysocki
  0 siblings, 1 reply; 9+ messages in thread
From: rasmit.ranjan @ 2006-08-09  3:05 UTC (permalink / raw)
  To: johannes; +Cc: linux-pm

 

> -----Original Message-----
> From: Johannes Berg [mailto:johannes@sipsolutions.net] 
> Sent: Tuesday, August 08, 2006 7:23 PM
> To: Rasmit Ranjan (WT01 - Semiconductors & Consumer Electronics)
> Cc: linux-pm@lists.osdl.org
> Subject: Re: [linux-pm] suspend to disk not working due to 
> swap space failure
> 
> rasmit.ranjan@wipro.com wrote:
> > So i tried creating a new
> > swap space by the command " mkswap". But still my swap 
> partition does 
> > not come up. I reboot my system but that did not work as well. What 
> > might be the problem?
> Is it listed in /etc/fstab so swapon -a can find it?

No it is not listed in /etc/fstab file. But `fdisk -l` shows the swap
partition.
> 
> johannes
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: suspend to disk not working due to swap space failure
  2006-08-09  3:05 rasmit.ranjan
@ 2006-08-09  6:04 ` Rafael J. Wysocki
  0 siblings, 0 replies; 9+ messages in thread
From: Rafael J. Wysocki @ 2006-08-09  6:04 UTC (permalink / raw)
  To: linux-pm; +Cc: johannes, rasmit.ranjan

On Wednesday 09 August 2006 05:05, rasmit.ranjan@wipro.com wrote:
> 
> > -----Original Message-----
> > From: Johannes Berg [mailto:johannes@sipsolutions.net] 
> > Sent: Tuesday, August 08, 2006 7:23 PM
> > To: Rasmit Ranjan (WT01 - Semiconductors & Consumer Electronics)
> > Cc: linux-pm@lists.osdl.org
> > Subject: Re: [linux-pm] suspend to disk not working due to 
> > swap space failure
> > 
> > rasmit.ranjan@wipro.com wrote:
> > > So i tried creating a new
> > > swap space by the command " mkswap". But still my swap 
> > partition does 
> > > not come up. I reboot my system but that did not work as well. What 
> > > might be the problem?
> > Is it listed in /etc/fstab so swapon -a can find it?
> 
> No it is not listed in /etc/fstab file. But `fdisk -l` shows the swap
> partition.

OK

What's the name of your swap partition and how does your /etc/fstab look like?

Rafael

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: suspend to disk not working due to swap space failure
@ 2006-08-10  6:23 rasmit.ranjan
  2006-08-10 20:57 ` Rafael J. Wysocki
  0 siblings, 1 reply; 9+ messages in thread
From: rasmit.ranjan @ 2006-08-10  6:23 UTC (permalink / raw)
  To: rjw, linux-pm; +Cc: johannes

 

> -----Original Message-----
> From: Rafael J. Wysocki [mailto:rjw@sisk.pl] 
> Sent: Wednesday, August 09, 2006 11:34 AM
> To: linux-pm@lists.osdl.org
> Cc: Rasmit Ranjan (WT01 - Semiconductors & Consumer 
> Electronics); johannes@sipsolutions.net
> Subject: Re: [linux-pm] suspend to disk not working due to 
> swap space failure
> 
> On Wednesday 09 August 2006 05:05, rasmit.ranjan@wipro.com wrote:
> > 
> > > -----Original Message-----
> > > From: Johannes Berg [mailto:johannes@sipsolutions.net]
> > > Sent: Tuesday, August 08, 2006 7:23 PM
> > > To: Rasmit Ranjan (WT01 - Semiconductors & Consumer Electronics)
> > > Cc: linux-pm@lists.osdl.org
> > > Subject: Re: [linux-pm] suspend to disk not working due to swap 
> > > space failure
> > > 
> > > rasmit.ranjan@wipro.com wrote:
> > > > So i tried creating a new
> > > > swap space by the command " mkswap". But still my swap
> > > partition does
> > > > not come up. I reboot my system but that did not work as well. 
> > > > What might be the problem?
> > > Is it listed in /etc/fstab so swapon -a can find it?
> > 
> > No it is not listed in /etc/fstab file. But `fdisk -l` 
> shows the swap 
> > partition.
> 
> OK
> 
> What's the name of your swap partition and how does your 
> /etc/fstab look like?
> 

Output of `fdisk -l` : 

Disk /dev/hda: 40.0 GB, 40007761920 bytes
255 heads, 63 sectors/track, 4864 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1               1         383     3076416   12  Compaq
diagnostics
/dev/hda2   *         384        2612    17904442+   c  W95 FAT32 (LBA)
/dev/hda3            2613        3887    10241437+  83  Linux
/dev/hda4            3888        4864     7847752+   5  Extended
/dev/hda5            3888        3952      522081   82  Linux swap /
Solaris

Content of /etc/fstab :

# This file is edited by fstab-sync - see 'man fstab-sync' for details
LABEL=/                 /                       ext3    defaults
1 1
/dev/devpts             /dev/pts                devpts  gid=5,mode=620
0 0
/dev/shm                /dev/shm                tmpfs   defaults
0 0
/dev/proc               /proc                   proc    defaults
0 0
/dev/sys                /sys                    sysfs   defaults
0 0

/dev/hdc                /media/cdrecorder       auto
pamconsole,exec,noauto,managed 0 0


> Rafael
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: suspend to disk not working due to swap space failure
  2006-08-10  6:23 suspend to disk not working due to swap space failure rasmit.ranjan
@ 2006-08-10 20:57 ` Rafael J. Wysocki
  0 siblings, 0 replies; 9+ messages in thread
From: Rafael J. Wysocki @ 2006-08-10 20:57 UTC (permalink / raw)
  To: rasmit.ranjan; +Cc: johannes, linux-pm

On Thursday 10 August 2006 08:23, rasmit.ranjan@wipro.com wrote:
> 
> > -----Original Message-----
> > From: Rafael J. Wysocki [mailto:rjw@sisk.pl]
> > Sent: Wednesday, August 09, 2006 11:34 AM
> > To: linux-pm@lists.osdl.org
> > Cc: Rasmit Ranjan (WT01 - Semiconductors & Consumer
> > Electronics); johannes@sipsolutions.net
> > Subject: Re: [linux-pm] suspend to disk not working due to
> > swap space failure
> >
> > On Wednesday 09 August 2006 05:05, rasmit.ranjan@wipro.com wrote:
> > >
> > > > -----Original Message-----
> > > > From: Johannes Berg [mailto:johannes@sipsolutions.net]
> > > > Sent: Tuesday, August 08, 2006 7:23 PM
> > > > To: Rasmit Ranjan (WT01 - Semiconductors & Consumer Electronics)
> > > > Cc: linux-pm@lists.osdl.org
> > > > Subject: Re: [linux-pm] suspend to disk not working due to swap
> > > > space failure
> > > >
> > > > rasmit.ranjan@wipro.com wrote:
> > > > > So i tried creating a new
> > > > > swap space by the command " mkswap". But still my swap
> > > > partition does
> > > > > not come up. I reboot my system but that did not work as well.
> > > > > What might be the problem?
> > > > Is it listed in /etc/fstab so swapon -a can find it?
> > >
> > > No it is not listed in /etc/fstab file. But `fdisk -l`
> > shows the swap
> > > partition.
> >
> > OK
> >
> > What's the name of your swap partition and how does your
> > /etc/fstab look like?
> >
> 
> Output of `fdisk -l` :
> 
> Disk /dev/hda: 40.0 GB, 40007761920 bytes
> 255 heads, 63 sectors/track, 4864 cylinders
> Units = cylinders of 16065 * 512 = 8225280 bytes
> 
>    Device Boot      Start         End      Blocks   Id  System
> /dev/hda1               1         383     3076416   12  Compaq
> diagnostics
> /dev/hda2   *         384        2612    17904442+   c  W95 FAT32 (LBA)
> /dev/hda3            2613        3887    10241437+  83  Linux
> /dev/hda4            3888        4864     7847752+   5  Extended
> /dev/hda5            3888        3952      522081   82  Linux swap /
> Solaris

So your swap is supposed to be /dev/hda5.  Please do

# mkswap /dev/hda5

[BTW, you could create the swap as a primary partition too.]

> Content of /etc/fstab :
> 
> # This file is edited by fstab-sync - see 'man fstab-sync' for details
> LABEL=/                 /                       ext3    defaults
> 1 1
> /dev/devpts             /dev/pts                devpts  gid=5,mode=620
> 0 0
> /dev/shm                /dev/shm                tmpfs   defaults
> 0 0
> /dev/proc               /proc                   proc    defaults
> 0 0
> /dev/sys                /sys                    sysfs   defaults
> 0 0
> 
> /dev/hdc                /media/cdrecorder       auto
> pamconsole,exec,noauto,managed 0 0

Please add the following line to your /etc/fstab:

/dev/hda5	swap	swap	defaults	0 0

Then (assuming you have run mkswap already) please do

# swapon -a

and check if it shows up in /proc/swaps .

Greetings,
Rafael

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: suspend to disk not working due to swap space failure
@ 2006-08-11  4:51 rasmit.ranjan
  0 siblings, 0 replies; 9+ messages in thread
From: rasmit.ranjan @ 2006-08-11  4:51 UTC (permalink / raw)
  To: rjw; +Cc: johannes, linux-pm

 

> -----Original Message-----
> From: Rafael J. Wysocki [mailto:rjw@sisk.pl] 
> Sent: Friday, August 11, 2006 2:27 AM
> To: Rasmit Ranjan (WT01 - Semiconductors & Consumer Electronics)
> Cc: linux-pm@lists.osdl.org; johannes@sipsolutions.net
> Subject: Re: [linux-pm] suspend to disk not working due to 
> swap space failure
> 
> On Thursday 10 August 2006 08:23, rasmit.ranjan@wipro.com wrote:
> > 
> > > -----Original Message-----
> > > From: Rafael J. Wysocki [mailto:rjw@sisk.pl]
> > > Sent: Wednesday, August 09, 2006 11:34 AM
> > > To: linux-pm@lists.osdl.org
> > > Cc: Rasmit Ranjan (WT01 - Semiconductors & Consumer Electronics); 
> > > johannes@sipsolutions.net
> > > Subject: Re: [linux-pm] suspend to disk not working due to swap 
> > > space failure
> > >
> > > On Wednesday 09 August 2006 05:05, rasmit.ranjan@wipro.com wrote:
> > > >
> > > > > -----Original Message-----
> > > > > From: Johannes Berg [mailto:johannes@sipsolutions.net]
> > > > > Sent: Tuesday, August 08, 2006 7:23 PM
> > > > > To: Rasmit Ranjan (WT01 - Semiconductors & Consumer 
> Electronics)
> > > > > Cc: linux-pm@lists.osdl.org
> > > > > Subject: Re: [linux-pm] suspend to disk not working 
> due to swap 
> > > > > space failure
> > > > >
> > > > > rasmit.ranjan@wipro.com wrote:
> > > > > > So i tried creating a new
> > > > > > swap space by the command " mkswap". But still my swap
> > > > > partition does
> > > > > > not come up. I reboot my system but that did not 
> work as well.
> > > > > > What might be the problem?
> > > > > Is it listed in /etc/fstab so swapon -a can find it?
> > > >
> > > > No it is not listed in /etc/fstab file. But `fdisk -l`
> > > shows the swap
> > > > partition.
> > >
> > > OK
> > >
> > > What's the name of your swap partition and how does your 
> /etc/fstab 
> > > look like?
> > >
> > 
> > Output of `fdisk -l` :
> > 
> > Disk /dev/hda: 40.0 GB, 40007761920 bytes
> > 255 heads, 63 sectors/track, 4864 cylinders Units = 
> cylinders of 16065 
> > * 512 = 8225280 bytes
> > 
> >    Device Boot      Start         End      Blocks   Id  System
> > /dev/hda1               1         383     3076416   12  Compaq
> > diagnostics
> > /dev/hda2   *         384        2612    17904442+   c  W95 
> FAT32 (LBA)
> > /dev/hda3            2613        3887    10241437+  83  Linux
> > /dev/hda4            3888        4864     7847752+   5  Extended
> > /dev/hda5            3888        3952      522081   82  Linux swap /
> > Solaris
> 
> So your swap is supposed to be /dev/hda5.  Please do
> 
> # mkswap /dev/hda5
> 
> [BTW, you could create the swap as a primary partition too.]
> 
> > Content of /etc/fstab :
> > 
> > # This file is edited by fstab-sync - see 'man fstab-sync' 
> for details
> > LABEL=/                 /                       ext3    defaults
> > 1 1
> > /dev/devpts             /dev/pts                devpts  
> gid=5,mode=620
> > 0 0
> > /dev/shm                /dev/shm                tmpfs   defaults
> > 0 0
> > /dev/proc               /proc                   proc    defaults
> > 0 0
> > /dev/sys                /sys                    sysfs   defaults
> > 0 0
> > 
> > /dev/hdc                /media/cdrecorder       auto
> > pamconsole,exec,noauto,managed 0 0
> 
> Please add the following line to your /etc/fstab:
> 
> /dev/hda5	swap	swap	defaults	0 0
> 
> Then (assuming you have run mkswap already) please do
> 
> # swapon -a
> 
> and check if it shows up in /proc/swaps .


Thanks Rafael. It worked and now my suspend to disk is also working.
Thanks.
> 
> Greetings,
> Rafael
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2006-08-11  4:51 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-10  6:23 suspend to disk not working due to swap space failure rasmit.ranjan
2006-08-10 20:57 ` Rafael J. Wysocki
  -- strict thread matches above, loose matches on Subject: below --
2006-08-11  4:51 rasmit.ranjan
2006-08-09  3:05 rasmit.ranjan
2006-08-09  6:04 ` Rafael J. Wysocki
2006-08-09  3:05 rasmit.ranjan
2006-08-08 13:13 rasmit.ranjan
2006-08-08 13:45 ` Rafael J. Wysocki
2006-08-08 13:53 ` Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox