All of lore.kernel.org
 help / color / mirror / Atom feed
* Mirroring swap
@ 2003-06-25 19:39 Derek Yeung
  2003-06-26  7:07 ` Riley Williams
  2003-06-26  9:46 ` Scott McDermott
  0 siblings, 2 replies; 17+ messages in thread
From: Derek Yeung @ 2003-06-25 19:39 UTC (permalink / raw)
  To: linux-raid



Hi,

I'm running RedHat 9 on stock kernel 2.4.20 with software RAID 1.  

I was wondering if it's a good idea to also mirror the swap partition?  
I was reading old posts in the newsgroups that suggest this may not be a 
good idea but i can't seem to find an answer as to why.  i think mirroring 
swap would be a good idea as it would increase redundancy..  Any thoughts?  

If it's a good idea, can anyone suggest how i can do it?  (mirror swap?)  
I don't currently have it set up yet.


Thanks,
/dky


^ permalink raw reply	[flat|nested] 17+ messages in thread
* RE: Mirroring swap
@ 2003-06-25 19:58 Bailey, Scott
  0 siblings, 0 replies; 17+ messages in thread
From: Bailey, Scott @ 2003-06-25 19:58 UTC (permalink / raw)
  To: 'Derek Yeung'; +Cc: linux-raid

>I was wondering if it's a good idea to also mirror the swap partition?  

I've heard both sides of the argument, but my 2 cents says "mirror it".
Otherwise you run the risk of having your swap area become unusable
following a drive failure, which will make your system very upset if it
decides it needs to swap in (or out) data associated with that area.

>If it's a good idea, can anyone suggest how i can do it?  (mirror swap?)  

It's just another partition. :-) Assuming you have created a md device of
the appropriate size, just use "/dev/md5" [or whatever] in your mkswap
command and the first column of the swap entry in your /etc/fstab. Note that
you do *NOT* have separate partitions on the md device itself.

My preference in this situation actually is to use LVM on top of RAID so
that you don't have to mess around with so many md devices. In this
scenario, you create a much larger md device, put it into a volume group,
then create a logical volume of the desired size. That is: (very
abbreviated)

# pvcreate /dev/md5
# vgcreate myvg /dev/md5
# lvcreate --contiguous y --size 128m --name swapvol myvg
# mkswap /dev/myvg/swapvol
# swapon /dev/myvg/swapvol

I can't remember making the volume contiguous is actually a requirement for
Linux LVM or just garbage cluttering up my brain from HP-UX days. :-) 

Have fun,

	Scott

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2003-06-27 23:31 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-06-25 19:39 Mirroring swap Derek Yeung
2003-06-26  7:07 ` Riley Williams
2003-06-26  7:30   ` Matti Aarnio
2003-06-26  8:30   ` Gordon Henderson
2003-06-26 21:23     ` Gregory Leblanc
2003-06-26 21:44       ` Corey McGuire
2003-06-27  1:56         ` Scott McDermott
2003-06-27  2:14           ` Corey McGuire
2003-06-27  2:24             ` Scott McDermott
     [not found]               ` <200306261957360966.057B8F63@ilneval.coreyfro.com>
2003-06-27  3:22                 ` Corey McGuire
2003-06-27 16:17                   ` Ricky Beam
2003-06-27 18:04                     ` Show me the cache, was " Corey McGuire
2003-06-27 18:24                       ` Ricky Beam
2003-06-27 23:31                         ` Corey McGuire
2003-06-27  8:49       ` Gordon Henderson
2003-06-26  9:46 ` Scott McDermott
  -- strict thread matches above, loose matches on Subject: below --
2003-06-25 19:58 Bailey, Scott

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.