Systemd-analyze está me dando um resultado diferente dependendo de quantas vezes eu executo, estou fazendo Systemd-analyze verify mnt-HDDs.mount
e obtendo:
local-fs.target: Found ordering cycle on HDDs-unlock.service/start
local-fs.target: Found dependency on sysinit.target/start
local-fs.target: Found dependency on systemd-update-done.service/start
local-fs.target: Found dependency on local-fs.target/start
local-fs.target: Job systemd-update-done.service/start deleted to break ordering cycle starting with local-fs.target/start
local-fs.target: Found ordering cycle on HDDs-unlock.service/start
local-fs.target: Found dependency on sysinit.target/start
local-fs.target: Found dependency on systemd-journal-catalog-update.service/start
local-fs.target: Found dependency on local-fs.target/start
local-fs.target: Job systemd-journal-catalog-update.service/start deleted to break ordering cycle starting with local-fs.target/start
local-fs.target: Found ordering cycle on HDDs-unlock.service/start
local-fs.target: Found dependency on sysinit.target/start
local-fs.target: Found dependency on systemd-machine-id-commit.service/start
local-fs.target: Found dependency on local-fs.target/start
local-fs.target: Job systemd-machine-id-commit.service/start deleted to break ordering cycle starting with local-fs.target/start
local-fs.target: Found ordering cycle on HDDs-unlock.service/start
local-fs.target: Found dependency on sysinit.target/start
local-fs.target: Found dependency on local-fs.target/start
local-fs.target: Job local-fs.target/start deleted to break ordering cycle starting with local-fs.target/start
sysinit.target: Found ordering cycle on plymouth-read-write.service/start
sysinit.target: Found dependency on local-fs.target/start
sysinit.target: Found dependency on mnt-HDDs.mount/start
sysinit.target: Found dependency on HDDs-unlock.service/start
sysinit.target: Found dependency on sysinit.target/start
sysinit.target: Job plymouth-read-write.service/start deleted to break ordering cycle starting with sysinit.target/start
sysinit.target: Found ordering cycle on local-fs.target/start
sysinit.target: Found dependency on mnt-HDDs.mount/start
sysinit.target: Found dependency on HDDs-unlock.service/start
sysinit.target: Found dependency on sysinit.target/start
sysinit.target: Job local-fs.target/start deleted to break ordering cycle starting with sysinit.target/start
sysinit.target: Found ordering cycle on systemd-update-done.service/start
sysinit.target: Found dependency on local-fs.target/start
sysinit.target: Found dependency on HDDs-unlock.service/start
sysinit.target: Found dependency on sysinit.target/start
sysinit.target: Job systemd-update-done.service/start deleted to break ordering cycle starting with sysinit.target/start
sysinit.target: Found ordering cycle on systemd-machine-id-commit.service/start
sysinit.target: Found dependency on local-fs.target/start
sysinit.target: Found dependency on HDDs-unlock.service/start
sysinit.target: Found dependency on sysinit.target/start
sysinit.target: Job systemd-machine-id-commit.service/start deleted to break ordering cycle starting with sysinit.target/start
sysinit.target: Found ordering cycle on systemd-tmpfiles-setup.service/start
sysinit.target: Found dependency on local-fs.target/start
sysinit.target: Found dependency on HDDs-unlock.service/start
sysinit.target: Found dependency on sysinit.target/start
sysinit.target: Job systemd-tmpfiles-setup.service/start deleted to break ordering cycle starting with sysinit.target/start
sysinit.target: Found ordering cycle on plymouth-read-write.service/start
sysinit.target: Found dependency on local-fs.target/start
sysinit.target: Found dependency on HDDs-unlock.service/start
sysinit.target: Found dependency on sysinit.target/start
sysinit.target: Job plymouth-read-write.service/start deleted to break ordering cycle starting with sysinit.target/start
sysinit.target: Found ordering cycle on local-fs.target/start
sysinit.target: Found dependency on HDDs-unlock.service/start
sysinit.target: Found dependency on sysinit.target/start
sysinit.target: Job local-fs.target/start deleted to break ordering cycle starting with sysinit.target/start
As unidades criadas diretamente envolvidas em mnt-HDDs.mount:
mnt-HDDs.mount:
[Unit]
Description=Mount unit for encripted device /mnt/HDDs
After=HDDs-unlock.service
[Mount]
Where=/mnt/HDDs
What=/dev/mapper/cryptHDDB
Type=btrfs
Options=noatime,compress-force=zstd,autodefrag,flushoncommit
HDDs-unlock.service
[Unit]
Description=HDDB and HDDC unlock
After=media-key.mount umount.target local-fs-pre.target
Before=local-fs.target
Conflicts=umount.target
[Service]
Type=oneshot
RemainAfterExit=yes
KillMode=none
ExecStart=/usr/bin/HDDs-unlock.sh
ExecStop=/usr/bin/HDDs-lock.sh
[Install]
RequiredBy=mnt-HDDs.mount
media-key.mount
[Unit]
Description=HDDs key
StopWhenUnneeded=true
[Mount]
Where=/media/key
What=/dev/disk/by-id/usb-SMI_USB_DISK_AA00000000065845-0:0
Options=ro,offset=952320
DirectoryMode=0400
[Install]
RequiredBy=HDDs-unlock.service
Existe uma fstab
entrada que monta /mnt/HDDs/@
que por dependência automática chama por mnt-HDDs.mount
, ao reiniciar em busca de uma solução algumas vezes fez minha inicialização pular alguns serviços a ponto de algumas vezes inicializar sem rede, alguma luz para resolver esse ciclo de ordenação?
Ok, depois de muita pesquisa (e muitas revisitas a esta resposta aqui no StackExchange), percebi que essa resposta era sobre o mesmo problema que eu estava enfrentando.
Basicamente, as unidades de montagem ocorrem implicitamente entre local-fs-pre.targe e local-fs.targe, antes de basic.target, o problema é que os serviços ficam implícitos Requires=basic.target e After=basic.target. a solução foi desabilitar as dependências padrão: