Re: "Swap area shorter than signature indicates"

2007-05-07 Thread Matteo Vescovi
On 05/07/2007 10:24 PM, Lennart Sorensen wrote:
> That message is what to expect for a raid1 with both devices up and
> running (U = Up)

I kind of knew that, but needed some confirm ;-)

>> Is the swap area working right despite the message above?
>> If so, why do I get that strange message in the logs?
> 
> Did you mkswap /dev/md1 or /dev/sda5?

I did it before via sudo but for some reasons it didn't work.

> Try doing swapoff, then make sure free shows no swap space, then use
> mkswap to recreate the swap on /dev/md1 and then swapon again and see if
> it gives a message then.

So, now I tried as superuser and it worked :-)

The log says:

server kernel: Adding 1951736k swap on /dev/md1.
Priority:-1 extents:1 across:1951736k

... and in free I've got the right size for the swap area.

Great!
Thanks a lot, Len! :-)

Greetings,

Matteo


-- 
Matteo F. Vescovi
mfv (at) fsugpadova (dot) org
Free Software Users Group Padova
GPG Fingerprint: 8EF0 F019 80D1 96BF C9C6  387E D6DE 031F 991F 9D2D


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: "Swap area shorter than signature indicates"

2007-05-07 Thread Cedar Cox

Everything seems setup correctly.  What's in /proc/swaps?

Probably you initialized the swap partitions before creating the raid
array (on /dev/sda5 and/or /dev/sdb5).  Software raid steals a bit of
space from the device so your resulting mirror is smaller than each
device.  Make sure first that you aren't using it (swapoff /dev/md1),
then do a mkswap /dev/md1 to reinitialize the array as swap.

Matteo Vescovi wrote:

Hi all.

The subject of this mail is the message I can find for every boot in my
/var/log/messages file.
I've set up a RAID1 environment with etch amd64; it's composed of 2
identical HDDs. The partitioning scheme is the same for both the devices.
I've put the swap area (a /dev/md1 made by /dev/sda5 and /dev/sdb5) in
the RAID, setting the ID label as "fd" (that is the 'Linux raid
autodetect' mode).

The /proc/mdstat file says about that partition:

md1 : active raid1 sda5[0] sdb5[1]
  1951744 blocks [2/2] [UU]

Is that correct?
Is the swap area working right despite the message above?
If so, why do I get that strange message in the logs?

Thanks a lot for your hints.

Greetings,

Matteo





--
-Cedar

What's an Intel chip doing in a Mac?
  A whole lot more than it's ever done in a PC.


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: "Swap area shorter than signature indicates"

2007-05-07 Thread Lennart Sorensen
On Mon, May 07, 2007 at 09:24:18PM +0200, Matteo Vescovi wrote:
> The subject of this mail is the message I can find for every boot in my
> /var/log/messages file.
> I've set up a RAID1 environment with etch amd64; it's composed of 2
> identical HDDs. The partitioning scheme is the same for both the devices.
> I've put the swap area (a /dev/md1 made by /dev/sda5 and /dev/sdb5) in
> the RAID, setting the ID label as "fd" (that is the 'Linux raid
> autodetect' mode).
> 
> The /proc/mdstat file says about that partition:
> 
> md1 : active raid1 sda5[0] sdb5[1]
>   1951744 blocks [2/2] [UU]
> 
> Is that correct?

That message is what to expect for a raid1 with both devices up and
running (U = Up)

> Is the swap area working right despite the message above?
> If so, why do I get that strange message in the logs?

Did you mkswap /dev/md1 or /dev/sda5?

Try doing swapoff, then make sure free shows no swap space, then use
mkswap to recreate the swap on /dev/md1 and then swapon again and see if
it gives a message then.  Making the swap on the low level filesystem
rather than the raid one would cause such problems, as would taking an
existing swap partition and adding a new drive and making raid on it and
not reinitializing the swap space to match the new slightly smaller size
(since raid does require a small superblock to store it's information).

--
Len Sorensen


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]