<div dir="ltr"><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_extra"><br><div class="gmail_quote">On 22 September 2017 at 15:51, Lennart Poettering <span dir="ltr"><<a href="mailto:lennart@poettering.net" target="_blank">lennart@poettering.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Fr, 22.09.17 15:21, Andy Pieters (Pieters.Andy+systemd@gmail.<wbr>com) wrote:<br>
<br>
> Hi all<br>
><br>
> Apologies if already covered or not suitable for this mailing list.<br>
><br>
> As the title says, does anyone have any ideas on autofsck on hotplugging a<br>
> USB storage device containing jfs.<br>
><br>
> Mount always fails if the jfs is dirty, but a single fsck is all that is<br>
> needed to make it mountable again...<br>
<br>
</span>You can put something together using the SYSTEMD_WANTS udev property,<br>
and pull in a systemd-fsck@.service instance for your device from<br>
there.<br>
<br>
That said, I'd suggest going the other way, and just using<br>
"systemd-mount" instead for mounting the device. It has a couple of<br>
benefits: first of all it will automatically do an fsck before<br>
mounting the device. But secondly it can do autofs mounts, so that the<br>
file system only remains mounted as long as it is accessed, and is<br>
unmounted automatically a short time after the last access<br>
happened. That way you get the biggest chance that the file system<br>
remains clean and should it not be clean is automatically corrected.<br>
<span class="HOEnZb"><font color="#888888"><br>
Lennart<br></font></span></blockquote><div><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">​I'm liking this idea. Thank you Lennart :)​</div></div></div></div>