Bug 1731443 - zramstart doesn't support restart
Summary: zramstart doesn't support restart
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: zram
Version: 30
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Peter Robinson
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-07-19 12:32 UTC by Bastien Nocera
Modified: 2019-10-10 05:58 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:


Attachments (Terms of Use)

Description Bastien Nocera 2019-07-19 12:32:01 UTC
zram-0.3-1.fc30.noarch

$ systemctl status zram-swap.service
● zram-swap.service - Enable compressed swap in memory using zram
   Loaded: loaded (/usr/lib/systemd/system/zram-swap.service; enabled; vendor preset: disabled)
   Active: active (exited) since Fri 2019-07-19 14:27:15 CEST; 29s ago
  Process: 3908 ExecStart=/usr/sbin/zramstart (code=exited, status=0/SUCCESS)
 Main PID: 3908 (code=exited, status=0/SUCCESS)

Jul 19 14:27:15 classic zramstart[3908]: swapon: cannot open /dev/zram0:: No such file or directory
Jul 19 14:27:15 classic zramstart[3908]: swapon: cannot open failed: No such file or directory
Jul 19 14:27:15 classic zramstart[3908]: swapon: cannot open to: No such file or directory
Jul 19 14:27:15 classic zramstart[3908]: swapon: cannot open reset:: No such file or directory
Jul 19 14:27:15 classic zramstart[3908]: swapon: cannot open Device: No such file or directory
Jul 19 14:27:15 classic zramstart[3908]: swapon: cannot open or: No such file or directory
Jul 19 14:27:15 classic zramstart[3908]: swapon: cannot open resource: No such file or directory
Jul 19 14:27:15 classic zramstart[3908]: swapon: cannot open busy: No such file or directory
Jul 19 14:27:15 classic zramstart[3908]: Activated ZRAM swap device of 7971 MB
Jul 19 14:27:15 classic systemd[1]: Started Enable compressed swap in memory using zram.

Some error checking might be necessary.

Comment 1 Pavol Šimo 2019-10-10 05:58:57 UTC
Not only restart, in my system it does not even start - error is the same.

This little patch fixes it for me:

--- zramstart.orig	2019-10-10 07:57:43.308104881 +0200
+++ zramstart	2019-10-10 07:57:33.235051662 +0200
@@ -14,6 +14,7 @@
 
 # zram in recent kernels is multitreaded so we don't need to balance across CPUs
 modprobe -q zram num_devices=1
+sleep 1
 
 # Create ZRAM with first device, lz4 algorithm
 zramdev=$(zramctl --find --algorithm lz4 --size ${zram_size}MB 2>&1)


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