--- 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 > On 5/16/2011 4:41 PM, Gavin Flower > wrote: > > > Motivation, existing RAID-6 swap partition > failed. I am thinking I should recreate it in a new > format, as currently it is 'Version : 0.90', rather than > simply rebuild it. > <snip> > > 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 > Thanks. Interesting! (Reminds me of when I first got into Linux. Then you could have any size swap file up to 128 MB, and have up to 8 swap files, for a maximum of 1 GB. I then had about 64 MB of RAM - now I have 8 GB of RAM. Also, swap partitions were recommended. When the 2.4 kernel first came out, it was said to be faster if you had at least 16 MB.) I read up and could not see any benefit in changing, so I ended up 'simply' reassembling the partition. The 2 things I had thought of altering, were the version of the super block and the chunk size. With the amount of RAM I have, performance is not normally an issue, I was thinking of reliability. The badblocks run did not reveal any problems, nor did checking the smart diagnostics in detail reveal anything significant. I think it was some kind of kernel error, transient anyhow. SUGGESTION: Could we please have some explanation of the benefits and tradeoffs between the different values of things like chunk size and super block version. -- 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