Greyhole
Greyhole copied to clipboard
Greyhole Daemon Not Starting
After a fresh install I realised the greyhole daemon is not automatically starting.
I can manually start it with sudo greyhole --daemon
but it seems to stop itself when I log out. Also it starts a FSCK every time I run it.
but it seems to stop itself when I log out
Expected. You'd need to use screen
or something similar to keep the processes running, after you disconnect.
But you shouldn't need to run it manually.
Did you try to run it using init.d or systemd (whichever is used by your OS)?
If that fails, either the greyhole.log
, the /var/log/messages
or /var/log/daemon
should tell you why it can't start.
If you can run manually, but your init.d/systemd can't start it, I would guess there is a problem with that config, somehow.
Sorry, yes I can keep it alive with Tmux. I just don't get why it's not starting automatically on a clean install (OMV / Debian)
root@openmediavault:~# /etc/init.d/greyhole start
[....] Starting greyhole (via systemctl): greyhole.serviceJob for greyhole.service failed because the control process exited with error code.
See "systemctl status greyhole.service" and "journalctl -xe" for details.
failed!
root@openmediavault:~# systemctl status greyhole.service
● greyhole.service - LSB: Starts the Greyhole daemon.
Loaded: loaded (/etc/init.d/greyhole; generated)
Active: failed (Result: exit-code) since Sun 2022-05-22 15:20:56 NZST; 12s ago
Docs: man:systemd-sysv-generator(8)
Process: 1569 ExecStart=/etc/init.d/greyhole start (code=exited, status=1/FAILURE)
May 22 15:20:55 openmediavault systemd[1]: Starting LSB: Starts the Greyhole daemon....
May 22 15:20:55 openmediavault greyhole[1569]: Starting Greyhole ... May 22 03:20:55 CRITICAL test-config: Failed to list Samba con
May 22 15:20:55 openmediavault greyhole[1569]: FAILED
May 22 15:20:56 openmediavault systemd[1]: greyhole.service: Control process exited, code=exited, status=1/FAILURE
May 22 15:20:56 openmediavault systemd[1]: greyhole.service: Failed with result 'exit-code'.
May 22 15:20:56 openmediavault systemd[1]: Failed to start LSB: Starts the Greyhole daemon..
...skipping...
● greyhole.service - LSB: Starts the Greyhole daemon.
Loaded: loaded (/etc/init.d/greyhole; generated)
Active: failed (Result: exit-code) since Sun 2022-05-22 15:20:56 NZST; 12s ago
Docs: man:systemd-sysv-generator(8)
Process: 1569 ExecStart=/etc/init.d/greyhole start (code=exited, status=1/FAILURE)
May 22 15:20:55 openmediavault systemd[1]: Starting LSB: Starts the Greyhole daemon....
May 22 15:20:55 openmediavault greyhole[1569]: Starting Greyhole ... May 22 03:20:55 CRITICAL test-config: Failed to list Samba con
May 22 15:20:55 openmediavault greyhole[1569]: FAILED
May 22 15:20:56 openmediavault systemd[1]: greyhole.service: Control process exited, code=exited, status=1/FAILURE
May 22 15:20:56 openmediavault systemd[1]: greyhole.service: Failed with result 'exit-code'.
May 22 15:20:56 openmediavault systemd[1]: Failed to start LSB: Starts the Greyhole daemon..
root@openmediavault:~# /usr/bin/greyhole --test-config May 22 03:23:27 CRITICAL test-config: Failed to list Samba configuration using 'testparm -s /etc/samba/smb.conf'.
Could it be because of OMV driving SAMBA?
Can you try testparm -s /etc/samba/smb.conf
?
Maybe your smb.conf is somewhere else..?
@gboudreau sorry cracking this open again after an OS drive lost (restored from backup phew!).
testparm -s /etc/samba/smb.conf
returns the samba config.
root@openmediavault:~# testparm -s /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Registered MSG_REQ_POOL_USAGE
Registered MSG_REQ_DMALLOC_MARK and LOG_CHANGED
Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[TimeMachine]"
Processing section "[Music]"
Global parameter allow insecure wide links found in service section!
Processing section "[_Mark]"
Global parameter allow insecure wide links found in service section!
Processing section "[_Sarah]"
Global parameter allow insecure wide links found in service section!
Processing section "[Photos]"
Global parameter allow insecure wide links found in service section!
Processing section "[Videos]"
Global parameter allow insecure wide links found in service section!
Processing section "[Software]"
Global parameter allow insecure wide links found in service section!
Processing section "[Test]"
Global parameter allow insecure wide links found in service section!
Processing section "[_Shared]"
Loaded services file OK.
WARNING: some services use vfs_fruit, others don't. Mounting them in conjunction on OS X clients results in undefined behaviour.
Server role: ROLE_STANDALONE
# Global parameters
[global]
disable spoolss = Yes
dns proxy = No
load printers = No
log file = /var/log/samba/log.%m
logging = syslog
max log size = 1000
multicast dns register = No
pam password change = Yes
panic action = /usr/share/samba/panic-action %d
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
passwd program = /usr/bin/passwd %u
printcap name = /dev/null
server string = %h server
socket options = TCP_NODELAY IPTOS_LOWDELAY
unix extensions = No
workgroup = DAN
fruit:aapl = yes
idmap config * : backend = tdb
aio read size = 16384
aio write size = 16384
create mask = 0777
directory mask = 0777
printing = bsd
use sendfile = Yes
wide links = Yes
[TimeMachine]
create mask = 0664
directory mask = 0775
ea support = No
force create mode = 0664
force directory mode = 0775
hide special files = Yes
inherit acls = Yes
path = /srv/dev-disk-by-uuid-a164fd78-7865-4c6b-a7b6-b04728a8c814/TimeMachine/
read only = No
store dos attributes = No
valid users = Sarah square_eyes
vfs objects = fruit streams_xattr
write list = Sarah square_eyes
fruit:time machine = yes
fruit:resource = file
fruit:metadata = netatalk
fruit:locking = none
fruit:encoding = private
[Music]
create mask = 0664
dfree command = /usr/bin/greyhole-dfree
directory mask = 0775
ea support = No
force create mode = 0664
force directory mode = 0775
hide special files = Yes
inherit acls = Yes
path = /srv/dev-disk-by-uuid-9103be31-ba73-4cec-8a0c-c26e13ab4b1f/Music/
read only = No
store dos attributes = No
vfs objects = greyhole
[Photos]
create mask = 0664
dfree command = /usr/bin/greyhole-dfree
directory mask = 0775
ea support = No
force create mode = 0664
force directory mode = 0775
hide special files = Yes
inherit acls = Yes
path = /srv/dev-disk-by-uuid-9103be31-ba73-4cec-8a0c-c26e13ab4b1f/Photos/
read only = No
store dos attributes = No
vfs objects = greyhole
[Videos]
create mask = 0664
dfree command = /usr/bin/greyhole-dfree
directory mask = 0775
ea support = No
force create mode = 0664
force directory mode = 0775
hide special files = Yes
inherit acls = Yes
path = /srv/dev-disk-by-uuid-9103be31-ba73-4cec-8a0c-c26e13ab4b1f/Videos/
read only = No
store dos attributes = No
vfs objects = greyhole
[Software]
create mask = 0664
dfree command = /usr/bin/greyhole-dfree
directory mask = 0775
ea support = No
force create mode = 0664
force directory mode = 0775
hide special files = Yes
inherit acls = Yes
path = /srv/dev-disk-by-uuid-9103be31-ba73-4cec-8a0c-c26e13ab4b1f/Software/
read only = No
store dos attributes = No
vfs objects = greyhole
[Test]
create mask = 0664
directory mask = 0775
ea support = No
force create mode = 0664
force directory mode = 0775
hide special files = Yes
inherit acls = Yes
path = /srv/dev-disk-by-uuid-9103be31-ba73-4cec-8a0c-c26e13ab4b1f/Test/
read only = No
store dos attributes = No
vfs objects = greyhole
[_Shared]
create mask = 0664
directory mask = 0775
ea support = No
force create mode = 0664
force directory mode = 0775
hide special files = Yes
inherit acls = Yes
path = /srv/dev-disk-by-uuid-9103be31-ba73-4cec-8a0c-c26e13ab4b1f/_Shared/
read only = No
store dos attributes = No
vfs objects = fruit streams_xattr
root@openmediavault:~# /usr/bin/greyhole --test-config Config is OK
Can you run the daemon manually?
sudo greyhole --daemon
What's the status of the service, when you try to start it manually?
/etc/init.d/greyhole start
systemctl status greyhole.service
Yes it runs fine manually. Earlier posts describe that state. I can run a fsck and monitor the logs no problem. I can run it in a tmux session. But if I reboot the machine it doesn't start of its own.
root@openmediavault:~# /etc/init.d/greyhole start
[ ok ] Starting greyhole (via systemctl): greyhole.service.
root@openmediavault:~# systemctl status greyhole.service
● greyhole.service - LSB: Starts the Greyhole daemon.
Loaded: loaded (/etc/init.d/greyhole; generated)
Active: active (exited) since Sun 2022-09-18 08:04:02 NZST; 30min ago
Docs: man:systemd-sysv-generator(8)
Process: 1074 ExecStart=/etc/init.d/greyhole start (code=exited, status=0/SUCCESS)
Sep 18 08:03:54 openmediavault systemd[1]: Starting LSB: Starts the Greyhole daemon....
Sep 18 08:04:01 openmediavault greyhole[1074]: Starting Greyhole ... OK
Sep 18 08:04:02 openmediavault systemd[1]: Started LSB: Starts the Greyhole daemon..
Your earlier post indicated :
May 22 15:20:55 openmediavault greyhole[1569]: Starting Greyhole ...
May 22 03:20:55 CRITICAL test-config: Failed to list Samba con...
Which you could reproduce with greyhole --test-config
This time, you say that greyhole --test-config
doesn't return this error, so I guess the service fails to start for another reason.
Check your systemctl logs, when starting the service.
I would guess tail-ing either /var/log/syslog
or /var/log/messages
, while trying to start the service in another shell, should show you the problem.
Yes not sure why the greyhole --test-config
no longer fails.
Thanks for the tip though I have fixed it! The logs /var/log/syslog
pointed me to an OMV error which took me to https://forum.openmediavault.org/index.php?thread/22768-rrd-problem/&postID=196603#post196603
Seems some fake startup script is put in place during OMV install or some other setup step. For whatever reason this was not swapped back out. Greyhole was not started because of this. Manually restoring the backup startup script from /sbin/start-stop-daemon.REAL
, reboot, and Greyhole is active on startup!
Thank you for your help. Love Greyhole :)