Raspberry (t)imesyncd hält externe Festplatte wach

honky-tonk

Captain
Registriert
Feb. 2009
Beiträge
4.093
Hallo,
ich betreibe auf dem Pi4 nextcloudpi mit einer externen HDD. Auf dieser liegt der nextcloud data ordner.

Mit buster hat sich die HDD nach ~20min selbst in den standby geschickt (HDparm funktioniert bei der ext. HDD nicht...WD mybook). Seit der neuinstallation mit bullseye geht die HDD nicht mehr in den standby.

Mit fatrace habe ich mal geschaut welche prozesse auf die HDD zugreifen.
alle ~5min scheint (t)imesyncd auf die platte zuzugreifen...open und direkt wieder close:
Code:
$ cd /media/hdd
$ fatrace -c
(imesyncd)(530860): O /media/hdd
(imesyncd)(530860): C /media/hdd
ich kann mir nicht vorstellen was die zeitsync. auf meiner HDD zu suchen hat. Hat jemand eine Erklärung oder ist imesyncd nicht timesyncd?
 
Hi,
lass doch mal nen "strace -p PID" laufen, natürlich mit der PID vom timesyncd.
Vielleicht kannst du da mehr erkennen...
 
kartoffelpü schrieb:
"strace -p PID" laufen
jede open close combi hat leider eine andere PID, von daher weiß ich nicht ob das dann so viel bringt. ich lasse es mal ne zeit lang mit laufen...mal sehen.
 
Oder die Dokumentation ansehen :)
https://www.freedesktop.org/software/systemd/man/timesyncd.conf.html
SaveIntervalSec=
The interval at which the current time is periodically saved to disk, in the absence of any recent synchronisation from an NTP server. This is especially useful for offline systems with no local RTC, as it will guarantee that the system clock remains roughly monotonic across reboots.

Takes a time interval value. The default unit is seconds, but other units may be specified, see systemd.time(5). Defaults to 60 seconds.
 
kartoffelpü schrieb:
Vielleicht kannst du da mehr erkennen...
kann man nicht ich denke dass das relevante dann im neu gespawnten prozess passiert
Code:
epoll_pwait(4, [{EPOLLIN, {u32=2529639152, u64=367601859312}}], 9, -1, NULL, 8) = 1
--- SIGCONT {si_signo=SIGCONT, si_code=SI_USER, si_pid=1, si_uid=0} ---
read(5, "\17\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 128) = 128
setsockopt(15, SOL_SOCKET, SO_SNDBUF, [8388608], 4) = 0
getsockopt(15, SOL_SOCKET, SO_SNDBUF, [425984], [4]) = 0
geteuid()                               = 103
getgid()                                = 109
getegid()                               = 109
sendmsg(15, {msg_name={sa_family=AF_UNIX, sun_path="/run/systemd/notify"}, msg_namelen=22, msg_iov=[{iov_base="WATCHDOG=1", iov_len=10}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, MSG_NOSIGNAL) = 10
close(15)                               = 0
timerfd_settime(6, TFD_TIMER_ABSTIME, {it_interval={tv_sec=0, tv_nsec=0}, it_value={tv_sec=507771, tv_nsec=341962000}}, NULL) = 0
gettid()                                = 532523
epoll_ctl(4, EPOLL_CTL_DEL, 12, NULL)   = 0
close(12)                               = 0
gettid()                                = 532523
openat(AT_FDCWD, "/var/lib/systemd/timesync/clock", O_RDONLY|O_NOFOLLOW|O_CLOEXEC|O_PATH) = 12
fstat(12, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
utimensat(AT_FDCWD, "/proc/self/fd/12", NULL, 0) = 0
close(12)                               = 0
socket(AF_UNIX, SOCK_DGRAM|SOCK_CLOEXEC, 0) = 12
getsockopt(12, SOL_SOCKET, SO_SNDBUF, [212992], [4]) = 0
setsockopt(12, SOL_SOCKET, SO_SNDBUF, [8388608], 4) = 0
getsockopt(12, SOL_SOCKET, SO_SNDBUF, [425984], [4]) = 0
setsockopt(12, SOL_SOCKET, SO_SNDBUFFORCE, [8388608], 4) = -1 EPERM (Operation not permitted)
getuid()                                = 103
geteuid()                               = 103
getgid()                                = 109
getegid()                               = 109
sendmsg(12, {msg_name={sa_family=AF_UNIX, sun_path="/run/systemd/notify"}, msg_namelen=22, msg_iov=[{iov_base="STOPPING=1\nSTATUS=Shutting down."..., iov_len=34}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, MSG_NOSIGNAL) = 34
close(12)                               = 0
epoll_ctl(4, EPOLL_CTL_DEL, 14, NULL)   = 0
close(14)                               = 0
socket(AF_UNIX, SOCK_DGRAM|SOCK_CLOEXEC, 0) = 12
getsockopt(12, SOL_SOCKET, SO_SNDBUF, [212992], [4]) = 0
setsockopt(12, SOL_SOCKET, SO_SNDBUF, [8388608], 4) = 0
getsockopt(12, SOL_SOCKET, SO_SNDBUF, [425984], [4]) = 0
setsockopt(12, SOL_SOCKET, SO_SNDBUFFORCE, [8388608], 4) = -1 EPERM (Operation not permitted)
getuid()                                = 103
geteuid()                               = 103
getgid()                                = 109
getegid()                               = 109
sendmsg(12, {msg_name={sa_family=AF_UNIX, sun_path="/run/systemd/notify"}, msg_namelen=22, msg_iov=[{iov_base="STATUS=Idle.", iov_len=12}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, MSG_NOSIGNAL) = 12
close(12)                               = 0
socket(AF_UNIX, SOCK_DGRAM|SOCK_CLOEXEC, 0) = 12
getsockopt(12, SOL_SOCKET, SO_SNDBUF, [212992], [4]) = 0
setsockopt(12, SOL_SOCKET, SO_SNDBUF, [8388608], 4) = 0
getsockopt(12, SOL_SOCKET, SO_SNDBUF, [425984], [4]) = 0
setsockopt(12, SOL_SOCKET, SO_SNDBUFFORCE, [8388608], 4) = -1 EPERM (Operation not permitted)
getuid()                                = 103
geteuid()                               = 103
getgid()                                = 109
getegid()                               = 109
sendmsg(12, {msg_name={sa_family=AF_UNIX, sun_path="/run/systemd/notify"}, msg_namelen=22, msg_iov=[{iov_base="STATUS=Idle.", iov_len=12}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, MSG_NOSIGNAL) = 12
close(12)                               = 0
socket(AF_UNIX, SOCK_DGRAM|SOCK_CLOEXEC, 0) = 12
getsockopt(12, SOL_SOCKET, SO_SNDBUF, [212992], [4]) = 0
setsockopt(12, SOL_SOCKET, SO_SNDBUF, [8388608], 4) = 0
getsockopt(12, SOL_SOCKET, SO_SNDBUF, [425984], [4]) = 0
setsockopt(12, SOL_SOCKET, SO_SNDBUFFORCE, [8388608], 4) = -1 EPERM (Operation not permitted)
getuid()                                = 103
geteuid()                               = 103
getgid()                                = 109
getegid()                               = 109
sendmsg(12, {msg_name={sa_family=AF_UNIX, sun_path="/run/systemd/notify"}, msg_namelen=22, msg_iov=[{iov_base="STATUS=Idle.", iov_len=12}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, MSG_NOSIGNAL) = 12
close(12)                               = 0
epoll_ctl(4, EPOLL_CTL_DEL, 11, NULL)   = 0
close(11)                               = 0
epoll_ctl(4, EPOLL_CTL_DEL, 9, NULL)    = 0
sendto(8, "\4\0\0\0\0\0\0\0\20\0\0\0\0\0\0\0", 16, MSG_NOSIGNAL, NULL, 0) = 16
futex(0x7fae02a090, FUTEX_WAIT, 532524, NULL) = -1 EAGAIN (Resource temporarily unavailable)
close(7)                                = 0
close(8)                                = 0
close(9)                                = 0
close(10)                               = 0
signalfd4(5, [TERM], 8, SFD_CLOEXEC|SFD_NONBLOCK) = 5
close(5)                                = 0
close(4)                                = 0
close(6)                                = 0
close(16)                               = 0
close(13)                               = 0
exit_group(0)                           = ?
+++ exited with 0 +++
Ergänzung ()

cloudman schrieb:
Oder die Dokumentation ansehen
SaveIntervalSec ist bei mir auskommentiert und default ist ja 60sec...beobachte aber eher so 5-15min intervalle.

kann ja mal versuchen das zu disablen
Ergänzung ()

@cloudman SaveIntervalSec kennt raspbian bullseye scheinbar nicht /etc/systemd/timesyncd.conf:20: Unknown key name 'SaveIntervalSec' in section 'Time' :-/ die variable ist in bullseye noch nicht drin
 
Zuletzt bearbeitet:
timesyncd deaktivieren und z.b. chrony installieren :)
 
  • Gefällt mir
Reaktionen: andy_m4 und honky-tonk
Update:

es sieht so aus als würde systemd-timesyncd.service alle paar minuten neu gestartet, weshalb sich auch die PID ändert
 
Ich hatte mal ein "fatrace -c |grep imesyncd" für 1,5h laufen, und kein einziger Zugriff auf irgendwas.

Prüf doch mal das Log vom timesyncd:
Code:
journalctl -u systemd-timesyncd.service
 
kartoffelpü schrieb:
Prüf doch mal das Log vom timesyncd
Code:
Sep 21 13:12:15 nextcloudpi systemd-timesyncd[536400]: Initial synchronization to time server [xxx]:123 (fritz.box).
Sep 21 13:19:52 nextcloudpi systemd[1]: Stopping Network Time Synchronization...
Sep 21 13:19:52 nextcloudpi systemd[1]: systemd-timesyncd.service: Succeeded.
Sep 21 13:19:52 nextcloudpi systemd[1]: Stopped Network Time Synchronization.
Sep 21 13:19:52 nextcloudpi systemd[1]: Starting Network Time Synchronization...
Sep 21 13:19:52 nextcloudpi systemd[1]: Started Network Time Synchronization.
Sep 21 13:19:52 nextcloudpi systemd-timesyncd[536479]: Initial synchronization to time server [xxx]:123 (fritz.box).
Sep 21 13:33:03 nextcloudpi systemd[1]: Stopping Network Time Synchronization...
Sep 21 13:33:03 nextcloudpi systemd[1]: systemd-timesyncd.service: Succeeded.
Sep 21 13:33:03 nextcloudpi systemd[1]: Stopped Network Time Synchronization.
Sep 21 13:33:03 nextcloudpi systemd[1]: Starting Network Time Synchronization...
Sep 21 13:33:03 nextcloudpi systemd[1]: Started Network Time Synchronization.
Sep 21 13:33:03 nextcloudpi systemd-timesyncd[537774]: Initial synchronization to time server [xxx]:123 (fritz.box).
Sep 21 13:34:47 nextcloudpi systemd[1]: Stopping Network Time Synchronization...
Sep 21 13:34:47 nextcloudpi systemd[1]: systemd-timesyncd.service: Succeeded.
Sep 21 13:34:47 nextcloudpi systemd[1]: Stopped Network Time Synchronization.

sieht ganz darach aus als würde der etwas oft neu gestartet und gestopt.

kartoffelpü schrieb:
Ich hatte mal ein "fatrace -c |grep imesyncd" für 1,5h laufen, und kein einziger Zugriff auf irgendwas.
auch auf pi bullseye?

hab jetzt mal chrony installiert mal abwarten, bis jetzt sieht's gut aus
 
honky-tonk schrieb:
auch auf pi bullseye?
Jein, Bullseye, aber Debian auf x64 HW. Hatte ich schon im letzten Beitrag geschrieben, aber aus irgendeinem Grund wieder gelöscht :)
 

Ähnliche Themen

Zurück
Oben