在 Linux (Ubuntu-16.10) 中安装和设置后,我正在尝试更改 MSSQL Server RC1 2017 的默认数据目录。
我使用以下命令设置默认数据目录。然后重新启动 mssql 服务器。
sudo /opt/mssql/bin/mssql-conf set filelocation.defaultdatadir /mnt/var/opt/mssql/data/
systemctl restart mssql-server.service
在此之后我尝试创建一个简单的数据库“test”
sqlcmd -s localhost -U sa -P "someStrongPassword" -Q "CREATE DATABASE test"
返回错误如下:
MODIFY FILE encountered operating system error 31(A device attached to the system is not functioning.) while attempting to expand the physical file '/mnt/var/opt/mssql/data/test.mdf'. CREATE DATABASE failed. Some file names listed could not be created. Check related errors.
错误日志表明操作系统错误:
/mnt/var/opt/mssql/data/test.mdf: Operating system error 31(A device attached to the system is not functioning.) encountered.
我无法以任何方式挂载数据目录。 “/mnt”目录的权限也设置为 777。将默认数据目录更改为任何其他文件夹,效果非常好。这是 mssql 服务器的已知错误还是最近的错误?
最佳答案
是的,通过 NFS 和 SMB 使用远程存储存在一个问题,该问题出现在 CTP 2.1 中,但尚未在 RC1 中修复。请参阅发行说明:https://learn.microsoft.com/en-us/sql/linux/sql-server-linux-release-notes#a-idrc1-rc1-july-2017-a 唯一的解决方法是使用本地存储或 CTP 2.0。我们正在努力修复。发布 ETA 是 TBD ATM。
关于sql-server - 无法在 Linux 的 MSSQL RC1 服务器设置中挂载数据目录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45311508/