[CentOS] Re: Install on two discs with Software Raid and LVM

David G. Miller dave at davenjudy.org
Tue Feb 5 15:21:01 UTC 2008


Scott Silva <ssilva at sgvwater.com> wrote:

> on 2/4/2008 2:43 PM Joseph L. Casale spake the following:
>   
>>> >> Create a swap lv in the vg you created out of /dev/md1, assuming /dev/md0 is /boot.
>>> >>
>>> >> -Ross
>>>       
>> > 
>> > Oh, I thought it wasn’t good to run swap inside software raid? If I was wrong,
>>     
> I assume this is beneficial since if one of the HD’s tanks while its running,
> it will survive the failure and not need to reboot?
>   
>> > 
>> > Thanks!
>> > jlc
>>     
> That is an old assumption from the infancy of software raid, less than optimal 
>   installed ram, and slower processors. When ram was expensive, you used more 
> swap because it was cheaper. But ram is so much cheaper now that it make no 
> sense to run a machine that needs to touch swap except in an emergency.
>   
Not really a valid assumption about install enough memory and swap won't 
get used. *nixes have a design feature that swaps out programs that 
aren't used "just in case" the some other program needs the space. Sun 
workstations back in the '80s and '90s used to be the worst at this. It 
was faster to shutdown at night and restart in the morning since leaving 
the system up all night would result in most everything getting swapped 
out to disk "just in case" the space would be needed. Try to use the 
system in the morning and it would be busy swapping everything back into 
RAM for quite a while.

So with 2GB of RAM on my desktop, I still see 144K of swap getting used 
with me generating very little activity as I read my e-mail. If my swap 
"went away", I would have a problem if Linux tried to swap back in 
whatever that 144k of program is. Better to have swap on a RAID volume.

Cheers,
Dave

-- 
Politics, n. Strife of interests masquerading as a contest of principles.
-- Ambrose Bierce




More information about the CentOS mailing list