Re: migrating pld /var/run to /run (and related dirs)
On Sun, Feb 09, 2020 at 10:13:37 +0100, Jan Rękorajski wrote: > What about plugging all this symlinking into geninitrd / dracut? > This way we would have everything sorted before we even start booting to > the filesystem in question. Won't work on systems without initrd, won't be functional without regenerating images on systems using it. But it should be possible to make this as systemd unit itself. -- Tomasz Pala ___ pld-devel-en mailing list pld-devel-en@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-devel-en
Re: migrating pld /var/run to /run (and related dirs)
On Thu, 06 Feb 2020, Arkadiusz Miśkiewicz wrote: > > Hi. > > We need to finally do this while still keeping sysvinit compatibility > (using symlinks). > > Migrate > > /var/run to /run and keep /var/run -> /run symlink > /var/lock to /run/lock and /var/lock -> /run/lock symlink > /run/shm -> /dev/shm symlink > (any other?) > > I wonder what is the best approach to do that on live servers. > > Debian: https://wiki.debian.org/ReleaseGoals/RunDirectory > > I guess migration needs to be in rc.sysinit. After rootfs and /var mount do: > - create /run dirs and convert old dirs to symlinks > - add /run* tmpfs mounting entries to /etc/fstab if not existent, so > next time migration logic via rc.sysinit will not be needed at all. /run should already be a dir. Looks at FHS.spec. I see one problem with your rc.sysinit proposal, what about systemd systems? You do need to do the convertsion, and you don't have that file. What about plugging all this symlinking into geninitrd / dracut? This way we would have everything sorted before we even start booting to the filesystem in question. -- Jan Rękorajski| PLD/Linux SysAdm | bagginspld-linux.org | http://www.pld-linux.org/ ___ pld-devel-en mailing list pld-devel-en@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-devel-en
Re: migrating pld /var/run to /run (and related dirs)
On Sat, 08 Feb 2020, Jacek Konieczny wrote: > On 2/8/20 6:52 PM, Tomasz Pala wrote: > > On Thu, Feb 06, 2020 at 19:20:26 +0100, Arkadiusz Miśkiewicz wrote: > > > >> We need to finally do this while still keeping sysvinit compatibility > >> (using symlinks). > > > > Why do we need to do this? Legacy SysVinit uses /var/run and works, > > while systemd systems are already handled well (tmpfiles etc.) in /run. > > New systemd won't even boot properly when /run is a symlink. And many Do we even have that anywhere (/run as symlink)? poldek:/all-avail> desc -ll FHS | grep /run modesizename drwxr-xr-x 6/run drwxr-xr-x 6/var/run/ And FHS.spec commit 4e9a06c31d tells me it was so from the very start. Our current systemd package has var-run.mount bind mounting /run there, so in this case is just a matter of removing that file and symlinking /var/run on next boot. Don't know how it looks for SysVinit running systems, but can't be more complicated IMHO. -- Jan Rękorajski| PLD/Linux SysAdm | bagginspld-linux.org | http://www.pld-linux.org/ ___ pld-devel-en mailing list pld-devel-en@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-devel-en
Re: migrating pld /var/run to /run (and related dirs)
On Sat, Feb 08, 2020 at 20:00:47 +0100, Jacek Konieczny wrote: > New systemd won't even boot properly when /run is a symlink. And many How about mount --bind? > That is why the /var/run -> /run symlink should be provided. Yes, what is I'm afraid is that our rpm doesn't handle dir->symlink transition. We still need to clean /var/run at system start as long as we support kernels without tmpfs. -- Tomasz Pala ___ pld-devel-en mailing list pld-devel-en@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-devel-en
Re: migrating pld /var/run to /run (and related dirs)
On 2/8/20 6:52 PM, Tomasz Pala wrote: > On Thu, Feb 06, 2020 at 19:20:26 +0100, Arkadiusz Miśkiewicz wrote: > >> We need to finally do this while still keeping sysvinit compatibility >> (using symlinks). > > Why do we need to do this? Legacy SysVinit uses /var/run and works, > while systemd systems are already handled well (tmpfiles etc.) in /run. New systemd won't even boot properly when /run is a symlink. And many system components rely on /run and /var/run contents to be the same, especially when they are supposed to run on SysVinit and systemd systems with the same default config. > In other words: what problem are you going to solve and in which > scenarios? IMHO the /etc/init.d/ scripts should be kept as they are. That is why the /var/run -> /run symlink should be provided. Jacek ___ pld-devel-en mailing list pld-devel-en@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-devel-en
Re: migrating pld /var/run to /run (and related dirs)
On Thu, Feb 06, 2020 at 19:20:26 +0100, Arkadiusz Miśkiewicz wrote: > We need to finally do this while still keeping sysvinit compatibility > (using symlinks). Why do we need to do this? Legacy SysVinit uses /var/run and works, while systemd systems are already handled well (tmpfiles etc.) in /run. In other words: what problem are you going to solve and in which scenarios? IMHO the /etc/init.d/ scripts should be kept as they are. -- Tomasz Pala ___ pld-devel-en mailing list pld-devel-en@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-devel-en
migrating pld /var/run to /run (and related dirs)
Hi. We need to finally do this while still keeping sysvinit compatibility (using symlinks). Migrate /var/run to /run and keep /var/run -> /run symlink /var/lock to /run/lock and /var/lock -> /run/lock symlink /run/shm -> /dev/shm symlink (any other?) I wonder what is the best approach to do that on live servers. Debian: https://wiki.debian.org/ReleaseGoals/RunDirectory I guess migration needs to be in rc.sysinit. After rootfs and /var mount do: - create /run dirs and convert old dirs to symlinks - add /run* tmpfs mounting entries to /etc/fstab if not existent, so next time migration logic via rc.sysinit will not be needed at all. Or do fstab entries on rc-scripts package upgrade and only change /var/dirs to symlinks in rc.sysinit. End result is that /run entries are always tmpfs mounts while /var/ has symlinks for backward compatibility. Ideas? -- Arkadiusz Miśkiewicz, arekm / ( maven.pl | pld-linux.org ) ___ pld-devel-en mailing list pld-devel-en@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-devel-en