Re: Best way to create RAID-6 for swap partition - existing one failed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



--- On Thu, 19/5/11, Stan Hoeppner <stan@xxxxxxxxxxxxxxxxx> wrote:

> From: Stan Hoeppner <stan@xxxxxxxxxxxxxxxxx>
> Subject: Re: Best way to create RAID-6 for swap partition - existing one failed
> To: "Gavin Flower" <gavinflower@xxxxxxxxx>
> Cc: linux-raid@xxxxxxxxxxxxxxx, neilb@xxxxxxx, mb@xxxxxxxxxxxxx
> Date: Thursday, 19 May, 2011, 6:59
[...]
> Forget using a partition.  Simply use a swap
> file.  This example creates
> a 1GB swap file in the / filesystem.  You can locate
> it on any
> filesystem you wish.
> 
> # swappoff -a
> # dd if=/dev/zero of=/swapfile1 bs=1024 count=1048576
> # mkswap /swapfile1
> # swapon /swapfile1
> # vi /etc/fstab
> Add:
> /swapfile1 swap swap defaults 0 0
> 
> and remove your old entry for the failed swap partition.
> 
> There is little performance difference between swap files
> and swap
> partitions with modern kernels.  The kernel will map
> the disk location
> of the swap file and perform direct disk access, bypassing
> the
> filesystem and buffer cache.
> 
> -- 
> Stan
> 

I just checked the man page for mkswap, it still recommends using a partition.

"WARNING
       The swap header does not touch the first block.  A boot loader or  disk label can be there, but it is not a recommended setup.  The recommended setup is to use a separate partition for a Linux swap area."

I am curious to know the tradeoffs between having a file and using a partition for swap.  While it may not make much difference in my current situation, it might to others.

--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux