# Unable to find swap-space signature

## Codo

Hello everybody:

  Every now and then I am having problems with my swap partition.  I get this:

```
$ dmesg

Unable to find swap-space signature
```

 and I cannot swap here.  I have to then do a 

```
$ mkswap /dev/hda3

$ swapon /dev/hda3
```

 to be able to enable swap again, as if the swap partition gets somehow corrupted...

Any ideas?

----------

## moocha

Perhaps you're dual-booting and the other OS writes to the swap partition clobbering the SWAPSPACE2 signature?

----------

## Codo

Well, I doubt it.  I dual boot with WinXP sometimes.

If this is what is happening, it would be very disturbing...  Would that mean that it may overwrite my reiser partition? :Shocked:   :Shocked:   :Shocked: 

----------

## quickshiftin

just stumbled in to the problem as well.  i wonder if vmware with a windows guest had anything to do with it...  im going to keep an eye on it in the future.

----------

## ueymir

Are you booting different kernels? I had the problem once that some kernels had the right name for the swap device, some did not. Probably not really a solution, but worth checking I guess ...   :Wink: 

----------

## quickshiftin

the whole thing started when trying to compile eclipse and was getting some error (cant remember what it was).  but when i checked dmesg i found a request was made to the kernel for more memory than the system could alocate, and that included swap!  this is not verified, but i think the swap somehow got brought offline or something whenever this happened, because i had to 

$mkswap /dev/hda2  afterwards to see it in action with a call to

$swapon -s

i had to shut down kde and a lot of services to get eclipse to compile, but its compiled and i cant wait to get into it  :Very Happy: 

----------

## syg00

Can't answer the question directly, but you are all aware that you can have multiple swaps mounted ???.

If you think you are subject to "running out", just add more. Once you have formatted it, add them to fstab.

"swapon -s" will tell you what you have mounted.

As for me, I never run emerges in X - give it all the machine it needs, and go do something else. Mind you, I only ever sync/update every couple of weeks, so it usually has a bit to do.

----------

## quickshiftin

 *syg00 wrote:*   

> Can't answer the question directly, but you are all aware that you can have multiple swaps mounted ???.
> 
> If you think you are subject to "running out", just add more. Once you have formatted it, add them to fstab.
> 
> "swapon -s" will tell you what you have mounted.
> ...

 

thats really cool.  if i knew that i wouldnt have had to shut down my gui and what not to get eclipse compiled.  thanks for the tip  :Smile: 

----------

## mingotta

Hello. I have the same problem.

I get "Unable to find swap-space signature" in my dmesg output.

It might be because I'm testing my newly installed RAID1 Gentoo Linux and seeing if it boots correctly from both hard drives.

It does boot correctly from both HD's but perhaps this so-called swap-space signature gets changed at every swapon so the next time it tries to mount it, somehow it doesn't match what it expects it to be.

I don't know, I'll dig further and hopefully find a way to have the swap space mounted automatically!

To mount it manually, since this is a RAID1 system, I need to

# mdadm --assemble /dev/md1 /dev/hda2 /dev/hdc2

# swapon /dev/md1

As a reminder, to check what partitions are mounted as swap, launch

# swapon -s 

or

# top

or

# free -m

----------

## mingotta

I adopted a workaround: I modified /etc/fstab so that now it swaps on the two swap partitions on the two disks separately, not as a RAID1.

The problem must lie in the RAID1, but I'm too tired to investigate further!

----------

## DamianHole

Hi mingotta,

I had the same probem, using raid1 with swap.

The fix for me was, to set the the partition type to 'fd' (Linux raid autodetect), not to '82' (Linux swap / Solaris).

Damian.

----------

