[CentOS] Apparently no swap configured

William L. Maltby CentOS4Bill at triad.rr.com
Tue Oct 28 10:23:40 UTC 2008


On Tue, 2008-10-28 at 00:21 -0700, John R Pierce wrote:
> Ian Masters wrote:
> > which show your swap partition, whereas on my problem system, 'swapon
> > -s' produces no output at all.
> >   
> 
> ok, that confirms your supposition, you have no swap configured.

All this raised a question in my mind. What's the value of have a swap
managed by LVM? ISTM that: 1) swap is usually configured to be the
maximum needed (depending on system usage and who you're talking to, 1,
2 times real memory usually), 2) additional overhead with no gain (I
know several claim little to no overhead but background tells me there
is always *some* even if small), 3) if you *do* increase this LV size to
increase swap size, another mkswap is needed to "map" the new space, 4)
more swap can be added by defining more LVs for swap, a partition
dedicated to swap or a swap file with a file system and then mkswap and
activating it.

I always just define a partition for that, flag it as swap in the
partitioning process and go with that set up. I can envision the
convenience of being able to temporarily disable swap, slapping a file
system on it and addressing some need. Or even destroying the LV and
freeing the PV for other use. But that sounds sort of far-fetched.

My *guess* is that the OP failed to mark a partition type of 82 for swap
during install and thus ended up with this odd configuration. It's only
a guess though.

Wouldn't it be better to vgremove/pvremove that thing and flag it as
type 82, mkswap, etc.?

> <snip sig stuff>

-- 
Bill




More information about the CentOS mailing list