Skip to content

storage: run commands before unmounting and after mounting disk

This is related to #1681 (closed). Samba (smbd) needs to be restarted before unmounting a disk (if a share is enabled on that disk) to disconnect all Samba users. Otherwise DeviceBusy exception is thrown.

Also, after mounting a disk, if a share was enabled previously on that disk then samba restart is required to re-enable this share.