|
Bugzilla – Full Text Bug Listing |
| Summary: | use existing swap file instead of recreating it each time during installation | ||
|---|---|---|---|
| Product: | [openSUSE] openSUSE 11.1 | Reporter: | peter czanik <peter> |
| Component: | Installation | Assignee: | Steffen Winterfeldt <snwint> |
| Status: | RESOLVED FEATURE | QA Contact: | Jiri Srain <jsrain> |
| Severity: | Enhancement | ||
| Priority: | P5 - None | CC: | aschnell, matt, snwint, tgoettlicher |
| Version: | Beta 5 | ||
| Target Milestone: | Future/Later | ||
| Hardware: | Other | ||
| OS: | Other | ||
| Whiteboard: | |||
| Found By: | --- | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
|
Description
peter czanik
2007-11-08 10:53:49 UTC
My comment here will be that obviously the use of existing swap files must be able to check if the file is real or sparse, and perhaps if it is already a valid swap file. Actually the check should be reversed, the presence of a swap header implies that the file is not sparse since mkswap will not operate on sparse files. This optimizes out the need to mkswap on a potentially slow medium (even 10 or 20 seconds is a long time to hang around). If the file is not a valid swap file then mkswap should be run, which will confirm that it is not sparse, then it can be activated. If the file fails mkswap then recreation of the swap file can be entertained. I wonder about the performance of making a swap file - is "dd" the best solution? As a preexisting tool it may be easier to entertain, but perhaps filling an existing file or creating it through some other method (fallocate?/fopen/fwrite loop/fclose..) is faster than starting from 0 and extending it? Checking for a valid swap sig would be ok. Linuxrc does swap activation for installation. Nudging this bug as it's still open and not sure of the status. I will test the swap activation this weekend (mem=256, precreated file on USB using dd) and see what happens and report back. *** Bug 438890 has been marked as a duplicate of this bug. *** Bump! The swap activation seems to be okay now but it relies on user interaction (to pick a file from somewhere) or worse, having a dedicated partition for it for addswap= parameter which requires manually partitioning the disk beforehand or using an evil slow USB stick (which still has to be chosen). Is it possible to activate swap and modify the addswap= parameter such that it uses Linuxrc paths instead of finding a block device entry from somewhere? This would help for the case where a file must be used. We have a use case where we want to configure a disk automatically and then reboot into the SuSE installer. The most comfortable way is to format a disk with a single partition for SuSE (with mke2fs -j -I 128 -L openSuSE-Foo /dev/sdaN) and then create a swap file on this partition both to reduce the amount of partitioning needed and alleviate the need for seperate partitions for boot (which overcomplicates matters when multiple installs are used, especially on MBR) and to reduce fragmentation of the swap file. The required boot line would then be something like boot hd:0 inst32 install=http://download.opensuse.org/distribution/11.1/repo/oss addswap=file:/swapfile?device=*label/openSuSE-Foo or hd:/swapfile?device=*label/openSuSE-Foo or whatever the thing would be. In the use case where a swap file is on a disk where SUSE is installed to (with a custom partition setup and not formatted) then ideally this would be passed into fstab such that it is activated at boot.swap time? This sort of includes the other bug report of a similar nature, https://bugzilla.novell.com/show_bug.cgi?id=438890 which I am about to mark as a duplicate of this bug.. :] As a side note I wonder is there any way to pass in a parameter without using AutoYaST to pick the device to install *TO* (possibly allowing some NFS urls to be dropped in) - or an easy way to make an AutoYaST image which can be passed in and somehow allow us to push an installation to an arbitrary partition which has already been formatted.. I know these are quite weird requirements but it makes the installation and testing of systems across our worldwide development team much less full of woe and despair and everyone having a different system setup by way of forgetting to click a button or having a personal preference..? This is a feature request. I already explained in another bugzilla entry that the use cases for swap files are rather low so I'll not add it to YaST unless product management wants it (and thus drops other new features). |