can't use swap after switch to LVM

Jeff Vian jvian10 at charter.net
Sun Apr 9 18:03:14 UTC 2006


On Sun, 2006-04-09 at 16:47 +0200, Joel Uckelman wrote:
> I just switched my desktop FC5 system from using software RAID over regular
> partitions to using software RAID over LVM; everything works fine, except
> I can't enable my swap.
> 
> On boot, I get the following messages:
> 
>    device-mapper: device 9:1 too small for target
>    device-mapper: dm-linear: Device lookup failed
>    device-mapper: error adding target to table
>    .
>    .
>    .
>    Unable to find swap-space signature
> 
> My swap volume is listed like this in my /etc/fstab:
> 
>    /dev/VolGroup00/LogVol01 swap swap defaults 0 0
> 
> If I try to format the swap volume, it tells me that it's too small:
> 
>    # mkswap /dev/mapper/VolGroup00-LogVol01
>    mkswap: error: swap area needs to be at least 40kB
> 
> But 'lvm lvs' reports that's it's 1GB:
> 
>    LogVol01 VolGroup00 -wi-d-     1.00G
                         ^^^^^^
from man lvs I get
-----------------
              The lv_attr bits are:

              1  Volume  type:  (m)irrored,  (o)rigin,  (p)vmove,
(s)napshot,
                 invalid (S)napshot, (v)irtual

              2  Permissions: (w)riteable, (r)ead-only

              3  Allocation  policy:   (c)ontiguous,   (n)ormal,
(a)nywhere,
                 (i)nherited  This  is  capitalised if the volume is
currently
                 locked against allocation changes, for example during
pvmove
                 (8).

              4  fixed (m)inor

              5  State:  (a)ctive,  (s)uspended,  (I)nvalid  snapshot,
invalid
                 (S)uspended snapshot, mapped (d)evice present without
tables,
                 mapped device present with (i)nactive table

              6  device (o)pen

--------------
On mine I see this
# lvs
  LV   VG   Attr   LSize   Origin Snap%  Move Log Copy%
  LV00 VG00 -wi-a- 992.00M

This is a 1gb swap partition that I have the lv active but not in use.


> I've tried deleting and recreating the swap volume:
> 
>    # lvm lvremove VolGroup00/LogVol01
>    # lvm lvcreate -L 1024M -n LogVol01 VolGroup00
>    device-mapper: reload ioctl failed: Invalid argument
>    Failed to activate new LV.
> 
The lv is not active.
Have you tried to activate it?
See the listing in man lvs for the identifying the state, and in man
lvchange for how to activate it.
  Something like "lvchange -a y LogVol01"  should make it active so you
can then use commands such as mkswap and mount with it.

I assume the volume group is activated.


> What's going wrong here?
> 
> -- 
> J.
> 




More information about the fedora-list mailing list