Bug 722803 - FIXED_IN_GIT: Systemd does not honor pri=X option in fstab
Summary: FIXED_IN_GIT: Systemd does not honor pri=X option in fstab
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: systemd
Version: 15
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Michal Schmidt
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-07-18 01:01 UTC by john5342
Modified: 2011-10-05 03:53 UTC (History)
7 users (show)

Fixed In Version: systemd-26-10.fc15
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-09-09 17:07:53 UTC
Type: ---


Attachments (Terms of Use)

Description john5342 2011-07-18 01:01:56 UTC
Description of problem:
I have two disks with swap partitions. One is a very high speed solid state disk. The other is just a standard disk partition. If both are given the same priority the writes to them are interleaved resulting in both having the performance of the slower disk. This can be fixed by adding the "pri=X" mount option to the swap partition. This worked in the past but now that systemd seems to have taken over mounting the swap partitions this option seems to be ignored.

Semantics of the option can be found using "man swapon"

Version-Release number of selected component (if applicable):
systemd-26-8.fc15.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Add the "pri=X" option (where X is a number) to two different swap partitions. e.g.
/dev/sda2 swap swap defaults,pri=1 0 0                                                                                                         
/dev/sdb2 swap swap defaults,pri=2 0 0

2. On reboot run "cat /proc/swaps" and the priority is the last digit on each line.

Actual results:
Both swap partitions have a priority of 0 (the default and since they both have the same priority the partitions are interleaved)

Expected results:
/dev/sda2 has priority 1 and /dev/sdb2 has priority 2. My fast disk is used first and my slow disk only when the fast one runs out of space.

Additional info:
If i understand the systemd.swap man page correctly this can be worked around by creating a swap unit for the partition instead but if systemd reads swap partitions from fstab then it should really honor the mount options that go with it.

Comment 1 Michal Schmidt 2011-07-18 14:05:51 UTC
I see. It's a bug in the fstab parsing.

(In mount_find_pri(), mount_test_option() does not want the '=' sign in the needle.)

Comment 2 Fedora Update System 2011-09-01 00:34:43 UTC
systemd-35-1.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/systemd-35-1.fc16

Comment 3 Fedora Update System 2011-09-01 19:02:45 UTC
Package systemd-35-1.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing systemd-35-1.fc16'
as soon as you are able to, then reboot.
Please go to the following url:
https://admin.fedoraproject.org/updates/systemd-35-1.fc16
then log in and leave karma (feedback).

Comment 4 john5342 2011-09-01 19:51:01 UTC
Are there any plans to pull this into f15 as well? The patch upstream seems to be a 1 character fix that should be quick and easy to back port. Zero impact on people who don't use the option and will finally get things working as documented for people who do.

Thanks in advance.

Upstream commit: http://cgit.freedesktop.org/systemd/commit/?id=3a34ae3a4d211d9236ca77d9a162aa27ac11f5f9

Comment 5 Fedora Update System 2011-09-09 17:07:07 UTC
systemd-35-1.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 6 Fedora Update System 2011-09-25 23:29:43 UTC
systemd-26-10.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/systemd-26-10.fc15

Comment 7 Fedora Update System 2011-10-05 03:52:57 UTC
systemd-26-10.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.