[systemd-devel] nested x-systemd.automount - parent always mounted

2020-07-27 Thread Reindl Harald
Hi

is this a kernel limitation or could systemd act better by *not* mount
/boot unconditional becasue of the inherited /boot/efi?

[root@firewall:~]$ cat /etc/fstab
UUID=48ffb5f1-9ee0-4637-85ab-089e3c91c578 /boot ext4
defaults,noauto,nofail,x-systemd.automount,discard 0 1
UUID=8C0B-91C5 /boot/efi vfat
defaults,noauto,nofail,x-systemd.automount,discard 0 1
UUID=9b4bf81a-5b1e-4922-b0d1-e6b65e9b61f9 / ext4  defaults,discard 0 1

---

that's early boot and defeats the idea delay as much as possible after
network / firewall rules to keep the downtime at kernel updates as small
as possible

Jul 28 01:55:49 firewall.esx.vmware.local kernel: EXT4-fs (sdb1):
re-mounted. Opts: discard
Jul 28 01:55:49 firewall.esx.vmware.local kernel: EXT4-fs (sda3):
mounted filesystem without journal. Opts: discard
Jul 28 01:55:49 firewall.esx.vmware.local systemd-journald[319]: Journal
started
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] systemd.timer every X days?

2020-07-27 Thread Andrei Borzenkov
26.07.2020 22:56, Ian Pilcher пишет:
> My NAS has 16 MD RAID devices.  I've created a simple service
> (raidcheck@.service) that will trigger a check of the RAID device
> identified by the argument.  E.g., 'systemctl start raidcheck@md1' will
> trigger the check of md1 (after checking that no other array is being
> checked/synced, no arrays are degraded, etc.).
> 
> It takes 6-8 hours to check one of these arrays, so I want to run one
> check every night at 23:00.  So (picking tonight as an arbitrary
> starting point) md1 would run tonight, md2 would run tomorrow night, md3
> would run the following night ... all the way through md16.  Then the
> cycle would start over with md1.
> 
> I had thought that I would be able to create 16 separate timers (one for
> each device), each scheduled to trigger every 16 days at 23:00, starting
> on a particular day.
> 
> Looking through the systemd.timer(5) and systemd.time(7) man pages,
> however, I haven't been able to figure out how to do this.  Is it not
> possible, or am I missing something?
> 

Not using native timer syntax. Repetition is really shorthand for list
of values in the same period (i.e. 2020-07-03/16 is just short form of
2020-07-03,19); it does not mean "repeat every 16 days from now on".

You could have boot time service that creates 16 timers with something like

systemd-run --on-calendar=first-date-and-time-for-this-timer
--on-unit-active=16days --unit=your.service

This could also be generator, but it also runs on every daemon-reload
which happens quite often.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel