Re: [PATCH] fstrim: add systemd units

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wednesday 09 April 2014, Thomas Bächler wrote:
> Am 09.04.2014 14:12, schrieb Ruediger Meier:
> >> well, "fstrim -a" contains heruistic to select the right filestems
> >> (it really does not call trim for all devices), it has been
> >> implemented to *avoid* sysadmins creativity. If you don't like it,
> >> you can use "fstrim <device>" (for example from crontab).
> >
> > I'd like the documentation more detailed.
> > Does it really run on all mounts or only /etc/fstab?
> > Does it write on automounted devices which are probably not owned
> > by the admin? Does it affect read-only mounts?
>
> The documentation is precise here:
>
> 'Trim all mounted filesystems on devices that support the discard
> operation.'

If this is 100% true then Karel's statement 10 lines above would be 
wrong.
Also this doc line indicates that even read-only mounts could be trimmed 
(if FS supports it) which would be at least dangerous if it runs 
automatically while admin is trying to repair a broken filesystem.

> It says exactly what it will do. Every one of your questions is
> answered.

> > IMO the task itself is already installed since we have fstrim's
> > option -a". You just need to _enable_ it to run whenever you want
> > for example by using crontab. That's trivial.
>
> Because it takes time. I have done it four times already and it cost
> me several minutes each time. Now nobody has to do it again.

> > Nobody would have thought about adding a 1-liner cronjob file to
> > util-linux eventhough any distro has /etc/cron.daily/. But now
> > systemd timer? Thats what I don't understand.
>
> I don't know why nobody thought about doing that in the past, maybe
> nobody cared about the needs of all those other admins. Maybe because
> installing a file into cron.daily automatically enables it. Maybe
> because nobody cared about anything but his own system?

I guess because adding one crontab line is trivial in comparision to add 
two files plus symlinks to get such systemd timer running. 

> > If _creating_ a systemd timer is too complicated for today's admins
>
> It is not complicated, it is just a task that shouldn't be repeated
> countless times.

Now you still need to enable it "countless times" which I would do using 
rsync or git anyway like I would sync self created timers, crontabs or 
whatever config files with same effort.

cu,
Rudi

--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux