Your message dated Thu, 18 Oct 2018 20:12:23 +0200
with message-id <[email protected]>
and subject line Re: Bug#911275: systemd: ignores swap options (discard) from
/etc/fstab ?
has caused the Debian Bug report #911275,
regarding systemd: ignores swap options (discard) from /etc/fstab ?
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
911275: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=911275
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: systemd
Version: 232-25+deb9u4
Severity: normal
Dear Maintainer,
Apparently, systemd ignores swap options (namely, "discard") from
"/etc/fstab";
i.e. my SSD swap partition gets activated, but with TRIM disabled.
For reference:
//
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/mm/swapfile.c?h=v4.9.133#n2567
pr_info("Adding %uk swap on %s. Priority:%d extents:%d across:%lluk
%s%s%s%s%s\n",
p->pages<<(PAGE_SHIFT-10), name->name, p->prio,
nr_extents, (unsigned long long)span<<(PAGE_SHIFT-10),
(p->flags & SWP_SOLIDSTATE) ? "SS" : "",
(p->flags & SWP_DISCARDABLE) ? "D" : "",
(p->flags & SWP_AREA_DISCARD) ? "s" : "",
(p->flags & SWP_PAGE_DISCARD) ? "c" : "",
(frontswap_map) ? "FS" : "");
BTW, manually playing with discard options & swapoff/swapon has resulted
in the following (reasonable) changes
of the final word of the kernel message:
<no discard option> => SSFS
discard => SSDscFS
discard=pages => SSDcFS
discard=once => SSDsFS
P.S. I don't know whether the current issue is related to that old
openSUSE bug,
but anyway I'm leaving these links here:
https://bugzilla.novell.com/show_bug.cgi?id=897422
https://github.com/systemd/systemd/commit/47cb901e38cd7092576fc8e76cc4a14f39bf719d
-- Package-specific info:
-- System Information:
Debian Release: 9.5
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 4.9.0-8-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8),
LANGUAGE=en_US:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages systemd depends on:
ii adduser 3.115
ii libacl1 2.2.52-3+b1
ii libapparmor1 2.11.0-3+deb9u2
ii libaudit1 1:2.6.7-2
ii libblkid1 2.29.2-1+deb9u1
ii libc6 2.24-11+deb9u3
ii libcap2 1:2.25-1
ii libcryptsetup4 2:1.7.3-4
ii libgcrypt20 1.7.6-2+deb9u3
ii libgpg-error0 1.26-2
ii libidn11 1.33-1
ii libip4tc0 1.6.0+snapshot20161117-6
ii libkmod2 23-2
ii liblz4-1 0.0~r131-2+b1
ii liblzma5 5.2.2-1.2+b1
ii libmount1 2.29.2-1+deb9u1
ii libpam0g 1.1.8-3.6
ii libseccomp2 2.3.1-2.1
ii libselinux1 2.6-3+b3
ii libsystemd0 232-25+deb9u4
ii mount 2.29.2-1+deb9u1
ii procps 2:3.3.12-3+deb9u1
ii util-linux 2.29.2-1+deb9u1
Versions of packages systemd recommends:
ii dbus 1.10.26-0+deb9u1
ii libpam-systemd 232-25+deb9u4
Versions of packages systemd suggests:
ii policykit-1 0.105-18
pn systemd-container <none>
pn systemd-ui <none>
Versions of packages systemd is related to:
pn dracut <none>
ii initramfs-tools 0.130
ii udev 232-25+deb9u4
-- no debconf information
-- Some terminal output:
$ cat /etc/fstab
...
UUID=<UUID_4> none swap sw,discard=once 0 0
$ sudo swapoff -va
swapoff /dev/sda4
$ /sbin/swapon
$ sudo swapon -va
swapon: /dev/sda4: found signature [pagesize=4096, signature=swap]
swapon: /dev/sda4: pagesize=4096, swapsize=<size_0>, devsize=<size_0>
swapon /dev/sda4
$ sudo journalctl | grep -i swap
Oct 18 01:26:26 Computer1 kernel: zswap: loaded using pool lzo/zbud
Oct 18 01:26:26 Computer1 systemd[1]: Found device <SSD_model> Swap01.
Oct 18 01:26:26 Computer1 systemd[1]: Found device <SSD_model> Swap01.
Oct 18 01:26:26 Computer1 systemd[1]: Activating swap Swap Partition...
Oct 18 01:26:26 Computer1 kernel: Adding <size_1>k swap on /dev/sda4.
Priority:-1 extents:1 across:<size>k SSFS
Oct 18 01:26:26 Computer1 systemd[1]: Activated swap Swap Partition.
Oct 18 01:26:26 Computer1 systemd[1]: Activated swap
/dev/disk/by-uuid/<UUID_4>.
Oct 18 01:26:26 Computer1 systemd[1]: Reached target Swap.
Oct 18 01:27:14 Computer1 sudo[1049]: user1 : TTY=tty1 ;
PWD=/home/user1 ; USER=root ; COMMAND=/sbin/swapoff -va
Oct 18 01:27:27 Computer1 sudo[1057]: user1 : TTY=tty1 ;
PWD=/home/user1 ; USER=root ; COMMAND=/sbin/swapon -va
Oct 18 01:27:33 Computer1 kernel: Adding <size_1>k swap on /dev/sda4.
Priority:-1 extents:1 across:<size>k SSDsFS
--
Best wishes,
Bob
--- End Message ---
--- Begin Message ---
Version: 239-10
Am 18.10.18 um 04:52 schrieb Michael Biebl:
> Am 18.10.18 um 04:42 schrieb Michael Biebl:
>> Am 18.10.18 um 02:23 schrieb Bob Bib:
>>>
>>> UUID=<UUID_4> none swap sw,discard=once
>>> 0 0
>>
>> Where is that discard mount option documented?
>
> And please also test this with v239 from sid/buster
Just tried this with v239 from unstable and it seems to work.
So I'm closing this as fixed
> root@pluto:~# grep discard /etc/fstab
> UUID=c0d2bc19-898f-4306-a734-85e547e249f0 none swap
> sw,discard=once 0 0
> root@pluto:~# systemctl list-unit-files --type=swap
> UNIT FILE
> STATE
> dev-disk-by\x2duuid-c0d2bc19\x2d898f\x2d4306\x2da734\x2d85e547e249f0.swap
> generated
>
> 1 unit files listed.
> root@pluto:~# systemctl restart
> "dev-disk-by\x2duuid-c0d2bc19\x2d898f\x2d4306\x2da734\x2d85e547e249f0.swap"
> root@pluto:~# dmesg | grep swap
> [ 0.936778] zswap: loaded using pool lzo/zbud
> [ 5.573100] Adding 4095996k swap on /dev/sda4. Priority:-2 extents:1
> across:4095996k SSFS
> [ 9841.683686] Adding 4095996k swap on /dev/sda4. Priority:-2 extents:1
> across:4095996k SSDsFS
--
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?
signature.asc
Description: OpenPGP digital signature
--- End Message ---