Re: [systemd-devel] Help! iSCSI based file systems with "_netdev" causing ordering cycles to occur (random services and mounts fail)

2023-10-30 Thread Cristian Rodríguez
On Sat, Oct 28, 2023 at 12:46 AM Tony Rodriguez 
wrote:

> On 10/27/23 07:06, Lennart Poettering wrote:
> > On Do, 26.10.23 19:03, Tony Rodriguez (unixpro1...@gmail.com) wrote:
> >
> >> Experiencing this same issue with iSCSI and systemd-239 for RH8/Rocky8
> and
> >> RH9/Rocky9 system-252. Nothing was done on my end to create this
> issue.  In
> >> other words, no custom mount/unit files or services, just your typical
> ISO
> >> install and rpm updates.
> >>
> >> An ordering cycle occurs, when "_netdev" is specified within /etc/fstab
> for
> >> systemd.  This happens with systemd-239-14 and systemd-239-18 using
> iSCSI
> >> based file systems.Seems others are experiencing this as well (see
> link
> >> below).  I can also confirm this happens with systemd-252 (RH9/Rocky9)l.
> >> Especially if "_netdev" is used with either "/var" or "/usr" iSCSI based
> >> devices/file systems.  The system may not boot, may not mount file
> systems,
> >> may not start services/unit files, and the system becomes slow during
> system
> >> boot.
> >>
> >> Does anyone know of a fix/patch and root cause for this?
> >>
> >> Please see this link:
> >>
> https://issues.redhat.com/browse/RHEL-12987?jql=project%20%3D%20RHEL%20AND%20affectedVersion%20%3D%20rhel-9.2.0%20AND%20text%20~%20%22iscsi%22
> >>
> >> # cat /etc/fstab
> >> [...
>
> 1) Lennart's recommendation of removing "/tmp" within /etc/fstab and
> using tmpfs for "/tmp" appears to stop the dependency issue for
> systemd-239 for systemd-252.  However, RH8 and RH9 don't support
> systemd-networkd, I am wondering how this can be overcome if removing
> "/tmp" and using "tmpfs" aren't options?  Would I have to modify various
> services and targets? What would I need to add or remove within services
> and targets to avoid these dependencies?
>

everything on the system depends on /tmp having behaviour and semantics of
a local filesystem. it is literally part of ABI if you wish. it is
hardcoded everywhere
it must "be there" always and until the last minute.
Don't do that then ! it is not only systemd..

What is exactly your problem ? you cannot commit a little ram to tmpfs ?


Re: [systemd-devel] Help! iSCSI based file systems with "_netdev" causing ordering cycles to occur (random services and mounts fail)

2023-10-30 Thread Lennart Poettering
On Mo, 30.10.23 10:17, Lennart Poettering (lenn...@poettering.net) wrote:

> On Fr, 27.10.23 20:46, Tony Rodriguez (unixpro1...@gmail.com) wrote:
>
> > Andrea asked for more details so I have provide this verbose output.
> >
> > 1) Lennart's recommendation of removing "/tmp" within /etc/fstab and using
> > tmpfs for "/tmp" appears to stop the dependency issue for systemd-239 for
> > systemd-252.  However, RH8 and RH9 don't support systemd-networkd, I am
> > wondering how this can be overcome if removing "/tmp" and using "tmpfs"
> > aren't options?  Would I have to modify various services and targets? What
> > would I need to add or remove within services and targets to avoid these
> > dependencies?
>
> This is something you'd have to ask your OS vendor. If they don't
> support netwokrd, they will support something else, and maybe it has a
> way to run in early boot or initrd.
>
> Booting without /tmp/ mounted during early boot is simply not
> supported from upstream, sorry, can't help you there. Please contact
> your OS vendor if they can help you.
>
> > 2) On another note, with RH9 systemd-252-14/systemd-252-18 and iscsi, new
> > dependency issues occur if "_netdev" within /etc/fstab is specified for
> > "/var" or "/usr".
>
> If /usr/ is split off it *must* be mounted even earlier than /tmp/: it
> must be mounted in the initrd, nothing else is supported, sorry.
>
> If /var/ is split off it must be mounted at the same point as /tmp/,
> i.e some time in early boot, not necessarily in the initrd though.

Since we never documented this properly I have put together another
piece of documentation that summarizes the requirements on mounts and
when they must be available during boot:

https://github.com/systemd/systemd/pull/29761

You can see the rendered version here (until the next PR push that is)

https://github.com/systemd/systemd/blob/87828aae4712bdb300101b05911392c43d081a6b/docs/MOUNT_REQUIREMENTS.md

Lennart

--
Lennart Poettering, Berlin


Re: [systemd-devel] Help! iSCSI based file systems with "_netdev" causing ordering cycles to occur (random services and mounts fail)

2023-10-30 Thread Lennart Poettering
On Fr, 27.10.23 20:46, Tony Rodriguez (unixpro1...@gmail.com) wrote:

> Andrea asked for more details so I have provide this verbose output.
>
> 1) Lennart's recommendation of removing "/tmp" within /etc/fstab and using
> tmpfs for "/tmp" appears to stop the dependency issue for systemd-239 for
> systemd-252.  However, RH8 and RH9 don't support systemd-networkd, I am
> wondering how this can be overcome if removing "/tmp" and using "tmpfs"
> aren't options?  Would I have to modify various services and targets? What
> would I need to add or remove within services and targets to avoid these
> dependencies?

This is something you'd have to ask your OS vendor. If they don't
support netwokrd, they will support something else, and maybe it has a
way to run in early boot or initrd.

Booting without /tmp/ mounted during early boot is simply not
supported from upstream, sorry, can't help you there. Please contact
your OS vendor if they can help you.

> 2) On another note, with RH9 systemd-252-14/systemd-252-18 and iscsi, new
> dependency issues occur if "_netdev" within /etc/fstab is specified for
> "/var" or "/usr".

If /usr/ is split off it *must* be mounted even earlier than /tmp/: it
must be mounted in the initrd, nothing else is supported, sorry.

If /var/ is split off it must be mounted at the same point as /tmp/,
i.e some time in early boot, not necessarily in the initrd though.

Lennart

--
Lennart Poettering, Berlin