SQL Server on Linux, an unmount error is output to the screen upon reboot In SQL Server on Linux (Ubuntu 16.04 + SQL Server 2017 RC2), the database is arranged on a different disk from the OS.
(I mounted /dev/sdb1 on /datadir.)

When restarting or Shutdown, the following message will be displayed at restart.

[FAILED] Failed unmouting /datadir

When restarting, I think that unmounting is done before the SQL Server process ends, but what kind of setting should be done to solve this problem?

Is there a setting like changing the order so that unmout is executed after SQL Server service termination or not unmounting the added disk when restarting?
The systemd unit file for the SQL server should be locally extended by a dependency on the /datadir this will make sure the start is done after the mount and the unmount waits for the stop. The most generic option to do this would be

RequiresMountsFor=/datadir


I think it automatically depend on the installation path of the scripts already.

Note that you do not need to modify the systemd unit files in the library directory but you can amend them in the /etc/systemd/system/&lt;sqlserver&gt;.service