Skip to main content
Topic: S6-log: warning: unable to rename /var/log/udevd/current (Read 1963 times) previous topic - next topic
0 Members and 4 Guests are viewing this topic.

S6-log: warning: unable to rename /var/log/udevd/current

Hi there,

I’ve made a clean install using base ISO and everything worked fine. So nothing was supposed to be broken but today I just tried rebooting my laptop and got the following:

S6-log: warning: unable to rename /var/log/udevd/current to /var/log/udevd/previous: no such file or directory

The message above was continuously repeated line by line and prevented the system from rebooting. I had to shut down the laptop manually. Could you please give me a hint of what the issue might be? Could anything be wrong with syslog-ng service?

Re: S6-log: warning: unable to rename /var/log/udevd/current

Reply #1
This is udevd not syslog-ng. Unfortunately, I have never seen this error before and have no idea what it means. To my knowledge, s6-log doesn't rename the current file to previous. I've never heard of this behavior. All I can say is make sure that your /var/log/udevd/ directory exists and that the s6log user has appropriate permissions to it (it should though). You can use tty7 if need be for debugging.

Re: S6-log: warning: unable to rename /var/log/udevd/current

Reply #2
There’s no /var/log/udevd/ directory and I’m not sure if it should exist.

Re: S6-log: warning: unable to rename /var/log/udevd/current

Reply #3
It is absolutely supposed to exist.

Re: S6-log: warning: unable to rename /var/log/udevd/current

Reply #4
I seemed to have forgotten to add a user to S6log group. Maybe that omission caused such a problem.

Re: S6-log: warning: unable to rename /var/log/udevd/current

Reply #5
The s6log user is a part of the s6log group. You shouldn't have needed to add a user to anything. This is supposed to happen when you install s6.

Re: S6-log: warning: unable to rename /var/log/udevd/current

Reply #6
I can’t realise what caused the problem then. Maybe some kind of a bug.

Re: S6-log: warning: unable to rename /var/log/udevd/current

Reply #7
Just chiming in that I had this exact issue also but I rectified it by making the directory /var/log/udevd/ and assigning ownership of it to the s6log user and group

Re: S6-log: warning: unable to rename /var/log/udevd/current

Reply #8
This is bizarre. The script is supposed to make this directory. The only reason it would not is if /var/log isn't writeable for some reason (but remount-root is supposed to do that).

Re: S6-log: warning: unable to rename /var/log/udevd/current

Reply #9
I didn’t have the directory /var/log/udevd/ created upon installation. Could it be due to separate subvolume for /var/log being created?

Re: S6-log: warning: unable to rename /var/log/udevd/current

Reply #10
The only directory I have is /run/service/udevd-log. I found there a file “run.user” containing the following:

“#! /bin/execlineb -p

envfile /etc/s6/config/udevd. conf
importas -sCUD "n3 s2000000 T' DIRECTIVES DIRECTIVES
ifelse { test -w /var/log } {
foreground { install -d -o slog -g s6log /var/log/udevd }
s6-setuidgid s6log exec -c s6-log -d3 -b -- ${DIRECTIVES} /var/log/udevd
}
foreground { install -d -o s6log -g s6log /run/log/udevd }
s6-setuidgid s6log exec -c s6-log -d3 -b ${DIRECTIVES} / run/log/udevd”

It looks like the directory should be created automatically, but it never has been in my case.

Re: S6-log: warning: unable to rename /var/log/udevd/current

Reply #11
Could you please advise me what kind of permissions I should have and how to check it? I’m stuck with this matter.

Upd: tried booting into live session from Plasma-ISO and made sure that “var/log/udevd” directory existed with appropriate permissions assigned to s6log (when running live), but after installation using Calamares (I normally do a base installation via terminal) it would not be created.

Re: S6-log: warning: unable to rename /var/log/udevd/current

Reply #12
The actual service files should be in /etc/s6/sv.

The only reason I can think of for it failing would be that the "test -w /var/log" test always fails (meaning you never have read/write access to /var/log). I have no idea why this would happen. Do you have this problem with any other *-log service? udev isn't the only one.

Re: S6-log: warning: unable to rename /var/log/udevd/current

Reply #13
The actual service files should be in /etc/s6/sv.

The only reason I can think of for it failing would be that the "test -w /var/log" test always fails (meaning you never have read/write access to /var/log). I have no idea why this would happen. Do you have this problem with any other *-log service? udev isn't the only one.

Yep, I’ve got the udevd-srv and udevd-log in /etc/s6/sv. For example, lvm2-monitor with ownership of s6log does exist.


Re: S6-log: warning: unable to rename /var/log/udevd/current

Reply #14
Maybe it will give you a clue:

I’ve noticed strange system’s behaviour: if ext4 is chosen upon fresh installing, all the necessary directories will be created, including “var/log/udevd” and “var/log/NetworkManager”, etc. Unfortunately, the same is not true for BTRFS being used.


The following are BTRFS mount options set:

mount -o subvol=/@,rw,noatime,compress=zstd,ssd,space_cache=v2 /dev/nvme0n1p2 /mnt
mount -o subvol=/@home,rw,noatime,compress=zstd,ssd,space_cache=v2 /dev/nvme0n1p2 /mnt/home
mount -o subvol=/@cache,rw,noatime,compress=zstd,ssd,space_cache=v2 /dev/nvme0n1p2 /mnt/var/cache
mount -o subvol=/@log,rw,noatime,compress=zstd,ssd,space_cache=v2 /dev/nvme0n1p2 /mnt/var/log

I reckon that the separate subvolume for “var/log” could cause the problem, but this is the way Calamares does.