Bug#779412: block devices loosing state after resume: trigger udev rules to re-apply settings

Michael Biebl biebl at debian.org
Sat Feb 28 08:38:27 GMT 2015


Am 28.02.2015 um 09:30 schrieb Chris:
> (http://bugs.debian.org/779412 explanation)
> 
> There is a general problem with non-permanent block devices settings
> (hard disks, optical disks, usb storage, ...), that are not restored 
> when resuming from suspend (instead using factory defaults and 
> loosing all pre-suspend settings).
> 
> And as long as the ata/scsi command set drivers can not save and
> restore every state register a device may have (impossible?),
> systemd may ship a viable workaround for this:
> 
> A systemd unit file could trigger an udev change action upon resume for
> block devices. This way the same udev rules that set up the devices when
> they are first plugged, will re-apply their settings after resume.
> 
> Providing this centrally with the systemd package could avoid that 
> multiple packages ship their own files, resulting in multiple change 
> events triggerd on each resume.
> 
> Examples for very important (non-permanent) settings are with
> hdparm (i.e. the important -B hard disk wear settings)
> https://bugs.debian.org/725284
> smartctl/mdadm/lvm/btrfs/zfs/... (i.e. set error recovery timeouts to
> prevent controller resets and data loss)
> http://sourceforge.net/p/smartmontools/mailman/message/33501936/
> 

I don't think working around this in udev/systemd is a good idea.
After all, most of those custom settings aren't applied via udev rules
anyway. This should be fixed in the kernel properly (or the individual
services) and not be papered over in systemd.

Marco, what do you think?

-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-systemd-maintainers/attachments/20150228/42c395a9/attachment-0002.sig>


More information about the Pkg-systemd-maintainers mailing list