Re: Best way to create RAID-6 for swap partition - existing one failed
From: Gavin Flower <hidden>
Date: 2011-05-18 22:31:55
--- On Thu, 19/5/11, Stan Hoeppner <stan@hardwarefreak.com> wrote:
From: Stan Hoeppner <redacted> Subject: Re: Best way to create RAID-6 for swap partition - existing one failed To: "Gavin Flower" <redacted> Cc: linux-raid@vger.kernel.org, neilb@suse.de, mb@gem.win.co.nz Date: Thursday, 19 May, 2011, 9:53 On 5/18/2011 3:13 PM, Gavin Flower wrote:quoted
--- On Thu, 19/5/11, Stan Hoeppner <stan@hardwarefreak.com>wrote:quoted
quoted
From: Stan Hoeppner <redacted> Subject: Re: Best way to create RAID-6 for swappartition - existing one failedquoted
quoted
To: "Gavin Flower" <redacted> Cc: linux-raid@vger.kernel.org,neilb@suse.de, mb@gem.win.co.nzquoted
quoted
Date: Thursday, 19 May, 2011, 6:59 On 5/16/2011 4:41 PM, Gavin Flower wrote:quoted
Motivation, existing RAID-6 swap partitionfailed. I am thinking I should recreate itin a newquoted
quoted
format, as currently it is 'Version : 0.90',rather thanquoted
quoted
simply rebuild it. <snip> Forget using a partition. Simply use a swap file. This example creates a 1GB swap file in the / filesystem. You canlocatequoted
quoted
it on any filesystem you wish. # swappoff -a # dd if=/dev/zero of=/swapfile1 bs=1024count=1048576quoted
quoted
# mkswap /swapfile1 # swapon /swapfile1 # vi /etc/fstab Add: /swapfile1 swap swap defaults 0 0 and remove your old entry for the failed swappartition.quoted
quoted
There is little performance difference betweenswap filesquoted
quoted
and swap partitions with modern kernels. The kernelwill mapquoted
quoted
the disk location of the swap file and perform direct disk access,bypassingquoted
quoted
the filesystem and buffer cache. -- StanThanks. Interesting! (Reminds me of when I first got into Linux. Thenyou 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.)quoted
I read up and could not see any benefit in changing,so I ended up 'simply' reassembling the partition. The big benefits are flexibility, simplicity, and time consumed. Given your particular case it seems a bit ironic that you see no benefit in using swap files. The time to resolution in this case would be mere seconds with swap files. How much total time did you spend reassembling your swap partition, bot command execution time, but your total time? -- Stan
I took longer than I'm prepared to admit! :-) I'll take note, and either apply your idea next time it happens, or when I do a major O/S upgrade. Thanks. -- To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html