SMB service failed to start.

jacque8080

Dabbler
Joined
Feb 3, 2019
Messages
16
My hardware had a power disruption. Since then I get SMB service failed to start.

Last time, I got the advise of running chmod 0750 /var/db/samba4/winbindd_privileged and it fixed the problem. This time I run it and get the error message:

root@freenas[/]# chmod 777 /var/db/samba4/winbindd_privileged
chmod: /var/db/samba4/winbindd_privileged: Unknown error: 122
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
My hardware had a power disruption. Since then I get SMB service failed to start.

Last time, I got the advise of running chmod 0750 /var/db/samba4/winbindd_privileged and it fixed the problem. This time I run it and get the error message:

root@freenas[/]# chmod 777 /var/db/samba4/winbindd_privileged
chmod: /var/db/samba4/winbindd_privileged: Unknown error: 122

Can you post output of smbd -i?
 

jacque8080

Dabbler
Joined
Feb 3, 2019
Messages
16
root@freenas[~]# smbd -i
smbd version 4.7.0-GIT-ffd9576215e-FreeNAS started.
Copyright Andrew Tridgell and the Samba Team 1992-2017
error opening config file '/usr/local/etc/smb4.conf'
 

jacque8080

Dabbler
Joined
Feb 3, 2019
Messages
16
root@freenas[~]# python /usr/local/libexec/nas/generate_smb4_conf.py
Traceback (most recent call last):
File "/usr/local/libexec/nas/generate_smb4_conf.py", line 1740, in <module>
main()
File "/usr/local/libexec/nas/generate_smb4_conf.py", line 1691, in main
smb4_setup(client)
File "/usr/local/libexec/nas/generate_smb4_conf.py", line 1335, in smb4_setup
os.chmod(privatedir, 0o700)
OSError: [Errno 122] Unknown error: 122: '/var/db/samba4/private'
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
root@freenas[~]# python /usr/local/libexec/nas/generate_smb4_conf.py
Traceback (most recent call last):
File "/usr/local/libexec/nas/generate_smb4_conf.py", line 1740, in <module>
main()
File "/usr/local/libexec/nas/generate_smb4_conf.py", line 1691, in main
smb4_setup(client)
File "/usr/local/libexec/nas/generate_smb4_conf.py", line 1335, in smb4_setup
os.chmod(privatedir, 0o700)
OSError: [Errno 122] Unknown error: 122: '/var/db/samba4/private'
What output do you see if your chmod 0700 /var/db/samba4/private?
 

jacque8080

Dabbler
Joined
Feb 3, 2019
Messages
16
root@freenas[~]# chmod 0700 /var/db/samba4/private
chmod: /var/db/samba4/private: Unknown error: 122
 

jacque8080

Dabbler
Joined
Feb 3, 2019
Messages
16
root@freenas[~]# stat /var/db/samba4/private
stat: /var/db/samba4/private: stat: Unknown error: 122

root@freenas[~]# zfs list
NAME USED AVAIL REFER MOUNTPOINT
RAIDZ-14TB 2.88T 11.2T 2.86T /mnt/RAIDZ-14TB
RAIDZ-14TB/.system 72.3M 11.2T 1.17M legacy
RAIDZ-14TB/.system/configs-1c36823397d74dbc9e7d4fbefe8b455e 5.97M 11.2T 5.97M legacy
RAIDZ-14TB/.system/cores 7.80M 11.2T 7.80M legacy
RAIDZ-14TB/.system/rrd-1c36823397d74dbc9e7d4fbefe8b455e 24.7M 11.2T 24.7M legacy
RAIDZ-14TB/.system/samba4 346K 11.2T 346K legacy
RAIDZ-14TB/.system/syslog-1c36823397d74dbc9e7d4fbefe8b455e 32.2M 11.2T 32.2M legacy
RAIDZ-14TB/.system/webui 117K 11.2T 117K legacy
RAIDZ-14TB/Upload 20.9G 11.2T 20.9G /mnt/RAIDZ-14TB/Upload
RAIDZ2-6TB 3.05T 2.05T 3.05T /mnt/RAIDZ2-6TB
freenas-boot 1.43G 17.5G 64K none
freenas-boot/ROOT 1.43G 17.5G 29K none
freenas-boot/ROOT/Initial-Install 1K 17.5G 760M legacy
freenas-boot/ROOT/default 1.43G 17.5G 1.43G legacy
 

jacque8080

Dabbler
Joined
Feb 3, 2019
Messages
16
Are you able to stat /mnt/RAIDZ-14TB/.system/samba4 ?
it does not start and says Service failed to start

SMB service failed to start
 

jacque8080

Dabbler
Joined
Feb 3, 2019
Messages
16
Can you post output of ls -l /var/db/

root@freenas[~]# ls -l /var/db/
total 2103
drwxr-xr-x 2 root wheel 64 Mar 16 05:50 collectd
---------- 1 root wheel 366 Mar 16 09:49 dhclient.leases.vtnet0
drwx------ 2 operator operator 0 Jan 20 15:11 entropy
drwx------ 2 root wheel 0 Jan 20 15:11 freebsd-update
drwx------ 2 root wheel 0 Jan 20 15:11 hyperv
drwx------ 2 root wheel 0 Jan 20 15:11 ipf
-rw-r--r-- 1 nobody wheel 0 Jan 20 15:10 locate.database
drwxr-x--- 3 netdata netdata 128 Jan 20 15:10 netdata
drwx------ 2 root wheel 0 Jan 20 15:11 ntp
-rw-r--r-- 1 root wheel 6 Mar 16 06:50 ntpd.drift
-rw-r--r-- 1 root wheel 10408 Jan 20 15:10 ntpd.leap-seconds.list
drwxrwx--- 2 root uucp 0 Jan 20 15:11 nut
drwxr-xr-x 2 root wheel 192 Jan 20 15:10 pkg
drwxr-xr-x 2 root wheel 0 Jan 20 15:11 ports
drwxr-xr-x 2 root wheel 0 Jan 20 15:11 portsnap
lrwxr-xr-x 1 root wheel 21 Mar 16 05:50 samba4 -> /var/db/system/samba4
drwxr-xr-x 3 root wheel 64 Jan 20 15:11 samba4.20190316055035
-rw-r--r-- 1 root wheel 2097920 Jan 20 15:10 services.db
drwxr-xr-x 2 root wheel 0 Mar 16 05:50 sss
drwxr-xr-x 2 root wheel 0 Mar 16 05:50 sss_mc
drwx--x--x 3 root wheel 64 Jan 20 15:11 sudo
srwxr-xr-x 1 root wheel 0 Mar 16 05:50 syslog-ng.ctl
-rw------- 1 root wheel 16384 Mar 16 09:49 syslog-ng.persist
drwxrwxr-x+ 9 root wheel 11 Mar 16 09:46 system
drwxr-xr-x 3 root wheel 64 Jan 20 15:11 zfsd
-rw-r--r-- 1 root wheel 20 Mar 16 05:50 zoneinfo
 

jacque8080

Dabbler
Joined
Feb 3, 2019
Messages
16
stat is a command stat /mnt/RAIDZ-14TB/.system/samba4
Also post output of zfs get all RAIDZ-14TB/.system/samba4

root@freenas[/]# stat /mnt/RAIDZ-14TB/.system/samba4
stat: /mnt/RAIDZ-14TB/.system/samba4: stat: No such file or directory

root@freenas[/mnt/RAIDZ-14TB]# zfs get all RAIDZ-14TB/.system/samba4
NAME PROPERTY VALUE SOURCE
RAIDZ-14TB/.system/samba4 type filesystem -
RAIDZ-14TB/.system/samba4 creation Sat Jan 26 15:22 2019 -
RAIDZ-14TB/.system/samba4 used 346K -
RAIDZ-14TB/.system/samba4 available 11.2T -
RAIDZ-14TB/.system/samba4 referenced 346K -
RAIDZ-14TB/.system/samba4 compressratio 11.01x -
RAIDZ-14TB/.system/samba4 mounted yes -
RAIDZ-14TB/.system/samba4 quota none default
RAIDZ-14TB/.system/samba4 reservation none default
RAIDZ-14TB/.system/samba4 recordsize 128K default
RAIDZ-14TB/.system/samba4 mountpoint legacy local
RAIDZ-14TB/.system/samba4 sharenfs off default
RAIDZ-14TB/.system/samba4 checksum on default
RAIDZ-14TB/.system/samba4 compression lz4 inherited from RAIDZ-14TB
RAIDZ-14TB/.system/samba4 atime on default
RAIDZ-14TB/.system/samba4 devices on default
RAIDZ-14TB/.system/samba4 exec on default
RAIDZ-14TB/.system/samba4 setuid on default
RAIDZ-14TB/.system/samba4 readonly off default
RAIDZ-14TB/.system/samba4 jailed off default
RAIDZ-14TB/.system/samba4 snapdir hidden default
RAIDZ-14TB/.system/samba4 aclmode passthrough inherited from RAIDZ-14TB
RAIDZ-14TB/.system/samba4 aclinherit passthrough inherited from RAIDZ-14TB
RAIDZ-14TB/.system/samba4 canmount on default
RAIDZ-14TB/.system/samba4 xattr off temporary
RAIDZ-14TB/.system/samba4 copies 1 default
RAIDZ-14TB/.system/samba4 version 5 -
RAIDZ-14TB/.system/samba4 utf8only off -
RAIDZ-14TB/.system/samba4 normalization none -
RAIDZ-14TB/.system/samba4 casesensitivity sensitive -
RAIDZ-14TB/.system/samba4 vscan off default
RAIDZ-14TB/.system/samba4 nbmand off default
RAIDZ-14TB/.system/samba4 sharesmb off default
RAIDZ-14TB/.system/samba4 refquota none default
RAIDZ-14TB/.system/samba4 refreservation none default
RAIDZ-14TB/.system/samba4 primarycache all default
RAIDZ-14TB/.system/samba4 secondarycache all default
RAIDZ-14TB/.system/samba4 usedbysnapshots 0 -
RAIDZ-14TB/.system/samba4 usedbydataset 346K -
RAIDZ-14TB/.system/samba4 usedbychildren 0 -
RAIDZ-14TB/.system/samba4 usedbyrefreservation 0 -
RAIDZ-14TB/.system/samba4 logbias latency default
RAIDZ-14TB/.system/samba4 dedup off default
RAIDZ-14TB/.system/samba4 mlslabel -
RAIDZ-14TB/.system/samba4 sync standard default
RAIDZ-14TB/.system/samba4 refcompressratio 11.01x -
RAIDZ-14TB/.system/samba4 written 346K -
RAIDZ-14TB/.system/samba4 logicalused 1.37M -
RAIDZ-14TB/.system/samba4 logicalreferenced 1.37M -
RAIDZ-14TB/.system/samba4 volmode default default
RAIDZ-14TB/.system/samba4 filesystem_limit none default
RAIDZ-14TB/.system/samba4 snapshot_limit none default
RAIDZ-14TB/.system/samba4 filesystem_count none default
RAIDZ-14TB/.system/samba4 snapshot_count none default
RAIDZ-14TB/.system/samba4 redundant_metadata all default
RAIDZ-14TB/.system/samba4 org.freebsd.ioc:active yes inherited from RAIDZ-14TB
 

jacque8080

Dabbler
Joined
Feb 3, 2019
Messages
16
At least it's Saturday, during the day time for me.

freenas-boot/ROOT/default on / (zfs, local, noatime, nfsv4acls)
devfs on /dev (devfs, local, multilabel)
tmpfs on /etc (tmpfs, local)
tmpfs on /mnt (tmpfs, local)
tmpfs on /var (tmpfs, local)
fdescfs on /dev/fd (fdescfs)
RAIDZ-14TB on /mnt/RAIDZ-14TB (zfs, local, nfsv4acls)
RAIDZ-14TB/Upload on /mnt/RAIDZ-14TB/Upload (zfs, local, nfsv4acls)
RAIDZ2-6TB on /mnt/RAIDZ2-6TB (zfs, local, nfsv4acls)
RAIDZ-14TB/.system on /var/db/system (zfs, local, nfsv4acls)
RAIDZ-14TB/.system/cores on /var/db/system/cores (zfs, local, nfsv4acls)
RAIDZ-14TB/.system/samba4 on /var/db/system/samba4 (zfs, local, nfsv4acls)
RAIDZ-14TB/.system/syslog-1c36823397d74dbc9e7d4fbefe8b455e on /var/db/system/syslog-1c36823397d74dbc9e7d4fbefe8b455e (zfs, local, nfsv4acls)
RAIDZ-14TB/.system/rrd-1c36823397d74dbc9e7d4fbefe8b455e on /var/db/system/rrd-1c36823397d74dbc9e7d4fbefe8b455e (zfs, local, nfsv4acls)
RAIDZ-14TB/.system/configs-1c36823397d74dbc9e7d4fbefe8b455e on /var/db/system/configs-1c36823397d74dbc9e7d4fbefe8b455e (zfs, local, nfsv4acls)
RAIDZ-14TB/.system/webui on /var/db/system/webui (zfs, local, nfsv4acls)
 

jacque8080

Dabbler
Joined
Feb 3, 2019
Messages
16
root@freenas[/mnt/RAIDZ-14TB]# ls -loTH /var/db/system
total 26
drwxrwxr-x+ 3 root wheel uarch 3 Feb 2 03:45:01 2019 configs-1c36823397d74dbc9e7d4fbefe8b455e
drwxrwxr-x+ 2 root wheel uarch 5 Mar 11 04:48:51 2019 cores
drwxrwxr-x+ 3 root wheel uarch 4 Feb 3 18:33:43 2019 ixdiagnose
-rwxrwxr-x 1 root wheel uarch 0 Jan 26 15:22:01 2019 nfs-stablerestart
-rwxrwxr-x 1 root wheel uarch 0 Jan 26 15:22:01 2019 nfs-stablerestart.bak
drwxrwxr-x+ 4 root wheel uarch 5 Mar 16 05:50:39 2019 rrd-1c36823397d74dbc9e7d4fbefe8b455e
drwxr-xr-x+ 4 root wheel uarch 14 Mar 9 15:26:44 2019 samba4
drwxrwxr-x+ 3 root wheel uarch 3 Jan 26 15:22:01 2019 syslog-1c36823397d74dbc9e7d4fbefe8b455e
drwxrwxr-x+ 2 root wheel uarch 2 Jan 26 15:22:00 2019 webui
 
Top