Your message dated Sun, 23 Jul 2023 09:45:35 +0200
with message-id <[email protected]>
and subject line Re: udisks2: Make it possible to use zram device for /tmp
has caused the Debian Bug report #945539,
regarding udisks2: Make it possible to use zram device for /tmp
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.)
--
945539: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=945539
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: udisks2
Version: 2.8.4-1
Severity: wishlist
It would be nice if the service script [email protected] could support
creating partitions for /tmp. I think at the end of the day that is a
nice usecase!
I have implemented the service /etc/systemd/system/[email protected]
as follows:
[Unit]
Description=Setup zram based device %i
After=dev-%i.device
Requires=dev-%i.device
Before=local-fs.target umount.target
[Service]
Type=oneshot
RemainAfterExit=yes
EnvironmentFile=-/etc/zram.conf.d/%i
ExecStart=/bin/sh -c 'if [ -n "$ZRAM_COMPRESSION" ]; then echo
$ZRAM_COMPRESSION > /sys/class/block/%i/comp_algorithm; fi'
ExecStart=/bin/sh -c 'if [ -n "$ZRAM_STREAMS_NUM" ]; then echo
$ZRAM_STREAMS_NUM > /sys/class/block/%i/max_comp_streams; fi'
ExecStart=/bin/sh -c 'if [ -n "$ZRAM_DEV_SIZE" ]; then echo
$ZRAM_DEV_SIZE > /sys/class/block/%i/disksize; fi'
ExecStart=/bin/sh -c 'if [ "$SWAP" = "y" ]; then mkswap /dev/%i
&& swapon /dev/%i; fi'
ExecStart=/bin/sh -c 'if [ "$TMP" = "y" ]; then mke2fs -q -m 0
-b 4096 -O sparse_super -L %i /dev/%i && mount -t ext2 /dev/%i /tmp &&
chmod 1777 /tmp; fi'
ExecStop=-/bin/sh -c 'echo 1 > /sys/class/block/%i/reset'
[Install]
WantedBy=local-fs-pre.target
/etc/zram.conf.d/zram0:
ZRAM_COMPRESSION=lz4
ZRAM_DEV_SIZE=100M
SWAP=y
/etc/zram.conf.d/zram1:
ZRAM_COMPRESSION=lz4
ZRAM_DEV_SIZE=100M
TMP=y
After that comment out mounting of /tmp in fstab and:
systemctl enable [email protected]
systemctl enable [email protected]
I have encountered a problem that there is no "mode=1777" mount option
for ext2, that is why I call "chmod 1777" explicitly after mounting it.
Any further improvements are welcomed.
--
With best regards,
Dmitry
--- End Message ---
--- Begin Message ---
On Tue, 26 Nov 2019 18:14:18 +0100 Dmitry Katsubo <[email protected]> wrote:
Package: udisks2
Version: 2.8.4-1
Severity: wishlist
It would be nice if the service script [email protected] could support
creating partitions for /tmp. I think at the end of the day that is a
nice usecase!
zram support was completely removed from udisks.
I'm thus closing this bug report as wontfix.
Regards,
Michael
OpenPGP_signature
Description: OpenPGP digital signature
--- End Message ---