|
Bugzilla – Full Text Bug Listing |
| Summary: | Swap files which are not full partitions are not mounted at boot time | ||
|---|---|---|---|
| Product: | [openSUSE] openSUSE 12.1 | Reporter: | Tony Mechelynck <antoine.mechelynck> |
| Component: | Basesystem | Assignee: | Frederic Crozat <fcrozat> |
| Status: | RESOLVED FIXED | QA Contact: | E-mail List <qa-bugs> |
| Severity: | Major | ||
| Priority: | P5 - None | CC: | suse-beta |
| Version: | Final | ||
| Target Milestone: | --- | ||
| Hardware: | x86-64 | ||
| OS: | SUSE Other | ||
| Whiteboard: | |||
| Found By: | Community User | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
| Attachments: | dmesg output after booting with systemd.log_level=debug systemd.log_target=kmsg | ||
|
Description
Tony Mechelynck
2011-11-20 18:13:33 UTC
"swapon -av" displays the following: swapon on /swapfile swapon: /swapfile: insecure permissions 0644, 0600 suggested. swapon: /swapfile: found swap signature: version 1, page-size 4, same byte order swapon: /swapfile: pagesize=4096, swapsize=2147483648, devsize=2147483648 after which "swapon -s" shows not only /dev/sda2 (priority 0) but also /swapfile (priority -1). Long time no response.So closed.Feel free to reopen it.Thanks. Nobody reassigning the bug to the package maintainer is no reason to close a bug as "noresponse". Reopening (and temporarily assigning to me). Tony, do you boot with systemd or sysvinit? Do you see this bug when booting with the other init system? (In reply to comment #4) > Tony, do you boot with systemd or sysvinit? Do you see this bug when booting > with the other init system? I used to boot with init until the update to openSUSE 12.1 changed it to systemd without asking me. Since then I've had many problems of all kinds with the new boot procedure and my take about it is: it weren't broke, so why the hell did they gone fixt it? I don't know how to go back to booting with init, inittab, etc., and if I did, I would. P.S. Until openSUSE 11.4 (with init) I did not see this problem. (In reply to comment #5) > I used to boot with init until the update to openSUSE 12.1 changed it to > systemd without asking me. Since then I've had many problems of all kinds with > the new boot procedure and my take about it is: it weren't broke, so why the > hell did they gone fixt it? It looks like the "old" sysvinit won't be maintained in the future. Nevertheless many people agree with you - the switch was too early. I also had some "fun" with systemd in the beta phase. OTOH, I'm using systemd (from the 12.1 update repo) without problems on some servers and my laptop, so it is definitely getting better. > I don't know how to go back to booting with init, inittab, etc., and if I did, I would. For a temporary test, you can select sysvinit as init system in grub or use the additional boot parameter init=/sbin/sysvinit If you want to switch back to sysvinit permanently, run zypper in sysvinit-init It will suggest the removal of systemd-sysvinit. Does booting with sysvinit mount your swap files? (In reply to comment #7) [...] > For a temporary test, you can select sysvinit as init system in grub or use the > additional boot parameter > init=/sbin/sysvinit > > If you want to switch back to sysvinit permanently, run > zypper in sysvinit-init > It will suggest the removal of systemd-sysvinit. Ah, thanks for the info. > > Does booting with sysvinit mount your swap files? I'll try at next boot (after making sure that I still have a swap file -- I cleared it away a few weeks ago to make room on the disk). After selecting "System V" boot (F5 rolldown in the grub menu), both /dev/sda2 and /swapfile are listed by swapon -s (with priority -1 and -2 respectively). Now let's reboot with systemd (default)… …and swapon -s lists only /dev/sda2 (with priority 0). OK, then this is clearly a systemd issue. please boot with under systemd with the following parameters systemd.log_level=debug systemd.log_target=kmsg and attach dmesg output to this bug report. Thanks. (reverting the severity to major - seems I accidently changed it with my last comment) (In reply to comment #12) > please boot with under systemd with the following parameters > systemd.log_level=debug systemd.log_target=kmsg > > and attach dmesg output to this bug report. > > Thanks. Where do I specify those parameters? At the end of the kernel command-line in the grub menu (the same place as a nondefault runlevel)? yes, sorry, I forgot to tell you those are kernel commandline parameters. Created attachment 482935 [details]
dmesg output after booting with systemd.log_level=debug systemd.log_target=kmsg
try replacing "nofail" with "defaults" in /etc/fstab. It should fix your issue. (In reply to comment #17) > try replacing "nofail" with "defaults" in /etc/fstab. It should fix your issue. Hm, I'll try; but the idea was to make the file "optional" without the need to edit the fstab every time I create or remove the file (which I don't really need except when running some extremely memory-expensive job such as compiling and _linking_ the latest SeaMonkey changeset). If systemd tries to enable the swap (with "defaults" rather than "nofail") before remounting the / filesystem read-write, won't I get a fatal message from swapon when trying to enable /swapfile as a mandatory swap device? We'll see: if it doesn't work I now know how to reboot /sbin/sysvinit or even /bin/bash to undo the change in "emergency repairs" mode. (IIUC under sysvinit swapon is run twice: once very early to enable swap "partitions" as soon as possible, and a second time after fstab devices are mounted to enable swap "files" once they can be reached. Note also that unlike systemd, sysvinit mounts swap with negative priorities.) Well, stay tuned for further flash news on this channel ;-) With "defaults" instead of "nofail" /dev/sda2 and /swapfile appear both in the output of "swapon -s" but there is still a difference with what happens in sysvinit boot: - With sysvinit, /dev/sda2 has priority -1, /swapfile has -2 - With systemd, they both have priority 0 Does this mean that sysvinit will use sda2 in preference to swapfile and that sysvinit will use them both about equally? Here is the output of "swapon -s" soon after booting with systemd: Filename Type Size Used Priority /dev/sda2 partition 3148736 0 0 /swapfile file 3145724 0 0 sysvinit just calls swapon -a, so it is possible the logic in swapon -a is different than the "simple" swapon /dev/sda2 | swapon /swapfile calls done by systemd fixed in systemd >= 37-3.165.1 package in home:fcrozat:systemd ( http://download.opensuse.org/repositories/home:/fcrozat:/systemd/openSUSE_12.1/ ) for 12.1 and also in Factory. It will be part of next 12.1 maintenance update for systemd (although none is scheduled yet). Closing as fixed This is an autogenerated message for OBS integration: This bug (731601) was mentioned in https://build.opensuse.org/request/show/124228 Factory / systemd mr #157832 for openSUSE 12.1 This is an autogenerated message for OBS integration: This bug (731601) was mentioned in https://build.opensuse.org/request/show/157832 Maintenance / openSUSE-RU-2013:0443-1: An update that has four recommended fixes can now be installed. Category: recommended (moderate) Bug References: 731601,751253,770182,801423 CVE References: Sources used: openSUSE 12.1 (src): systemd-37-3.17.1, systemd-gtk-37-3.17.1 |