shwa87 Posted December 10, 2023 Share Posted December 10, 2023 Hello - is there a way to delay the startup of samba until the array is fully started and/or start it manually or via a script after the array is fully started via user scripts? Could I theoretically use a user script to disable smb on array shutdown and then a user script to enable it at startup or sometime after startup? Thanks! Quote Link to comment
shwa87 Posted December 10, 2023 Author Share Posted December 10, 2023 I want to stop getting bootup delays due to winbindd hanging because it keeps trying to connect because my domain controller runs in an unRAID VM. So I'd like to effectively keep Samba out of the picture until the array is started so any delays aren't as a big deal. Alternatively, even being able to have winbindd stop trying after X number of failures (i.e. say 2 failures) during bootup. Thanks! Quote Link to comment
shwa87 Posted December 11, 2023 Author Share Posted December 11, 2023 I think I have a possible solution... add this to a user script that runs when the array is shutdown: sed -i 's/shareSMBEnabled="ads"/shareSMBEnabled=“no”/g’ /boot/config/share.cfg But I don't think I can do it in reverse because the config file would only be read at startup. So essentially, I'd need a set of commands that would enable SMB AD as the array is started. This seems like it could be possible, since I can join AD via CLI without stopping the array even though if its done in the GUI it forces services to stop and start (and thus fails since the domain controller runs in a VM) Are there commands that can achieve this? Quote Link to comment
MrGrey Posted December 11, 2023 Share Posted December 11, 2023 5 hours ago, shwa87 said: So I'd like to effectively keep Samba out of the picture until the array is started Have you fully thought about what might happen? 5 hours ago, shwa87 said: keep Samba out of the picture until the array is started Are Samba shares on your array? They will or won't be before/after it starts. Clear as mud. MrGrey. Quote Link to comment
MAM59 Posted December 11, 2023 Share Posted December 11, 2023 7 hours ago, shwa87 said: it keeps trying to connect because my domain controller runs in an unRAID VM. So I'd like to effectively keep Samba out of the picture until the array is started so any delays aren't as a big deal A typical "UNRAID not understood" and "Chicken & Egg" Problem. A VM on UNRAID will not start without the array beeing started and samba is up and running (the shares are available). So there is NO WAY to delay SAMBA until your Domain Controller is up. You either live with the (I bet) excessive delays or you correct your error and move off your PDC to a real computer (or VM elsewhere). 1 Quote Link to comment
Kilrah Posted December 11, 2023 Share Posted December 11, 2023 12 hours ago, shwa87 said: delay the startup of samba until the array is fully started That's already the case, samba only starts once the array is started. But Dockers/VM also start after the array is started, so... Quote Link to comment
shwa87 Posted December 11, 2023 Author Share Posted December 11, 2023 10 hours ago, MAM59 said: A VM on UNRAID will not start without the array beeing started and samba is up and running (the shares are available). Why does samba need to be up and running in order for vms to start? There are no shares being passed to the VMs nor are shares mapped. The VMs live on an SSD pool and the domains and system 'shares' are not SMB shares... Quote Link to comment
shwa87 Posted December 11, 2023 Author Share Posted December 11, 2023 6 hours ago, Kilrah said: That's already the case, samba only starts once the array is started. But Dockers/VM also start after the array is started, so... If this is the case, why does Samba/winbind lag/hang even when the array is NOT slated to start on boot if there's an unclean shutdown or if I set it not to start on boot for whatever reason? Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.