Re: Best way to create RAID-6 for swap partition - existing one failed
From: Gavin Flower <hidden>
Date: 2011-05-19 04:05:03
--- 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, 15:28 On 5/18/2011 9:50 PM, Gavin Flower wrote:quoted
Hibernation mostly worked (almost all problems wereassociated with the Radeon video drivers) when I was using the RAID-6 swap partition. So I was not anticipating any new problem with hibernations.quoted
I am using Fedora 14 with all the latest patchesapplied.quoted
$ uname -a Linux saturn 2.6.35.13-91.fc14.x86_64 #1 SMP Tue May 313:23:06 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux Did you modify grub accordingly since switching from swap partition to file, and reboot? My very basic understanding, after reading a single Google hit, is that hibernation to/from swap has a dependency on a grub entry. Thus, the problem you have now is not due to switching to a swap file per se. It's due to the hibernation code not automatically recognizing you did so. Did you read any of the Google search results? All of the answers you need should be there, or not far away. -- Stan
I looked at some Google results (see below), and have decided to revert to using a partition. As it is rapidly getting into more complications than I have time to pursue.
This is far from the '60 second change' you promised :-)
Cheers,
Gavin
///////////
Red Hat Bug 466408 is an RFE to support using a swap file.
In /etc/rc.d/rc.sysinit there are lines that expect a swap partition:
[...]
# Start up swapping.
update_boot_stage RCswap
action $"Enabling /etc/fstab swaps: " swapon -a -e
if [ "$AUTOSWAP" = "yes" ]; then
curswap=$(awk '/^\/dev/ { print $1 }' /proc/swaps | while read x; do get_numeric_dev dec $x ; echo -n " "; done)
swappartitions=$(blkid -t TYPE=swap -o device)
if [ x"$swappartitions" != x ]; then
for partition in $swappartitions ; do
[ ! -e $partition ] && continue
majmin=$(get_numeric_dev dec $partition)
echo $curswap | grep -qw "$majmin" || action $"Enabling local swap partitions: " swapon $partition
done
fi
fi
[...]
http://www.fedoraforum.org/forum/showthread.php?t=204114
[...]
Old 19th November 2008, 04:00 PM
stevea
[...]
I suspect that you cannot resume from a swap file without redesigning mkinitrd script. It currently resumes the swap (device or file) BEFORE it mounts the root file system, so I think the resume/unhibernate is destined to fail from a swap file. If you did mount the root first then you'd likely have a problem (fsck - unclean unmount) w/ the remounting that fs later (maybe not - it's read access only). Maybe the resume could work from a file, but that's unclear.
[...]
--
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