简体   繁体   English

无法在Linux中的MSSQL RC1服务器设置中挂载数据目录

[英]Unable to mount data directory in MSSQL RC1 server setup in linux

I'm trying to change the default data directory for MSSQL Server RC1 2017 after installation and setup in linux (Ubuntu-16.10). 在Linux(Ubuntu-16.10)中安装和设置后,我试图更改MSSQL Server RC1 2017的默认数据目录。

I used the following command to set the default data directory. 我使用以下命令来设置默认数据目录。 Then restarted the mssql server. 然后重新启动mssql服务器。

sudo /opt/mssql/bin/mssql-conf set filelocation.defaultdatadir /mnt/var/opt/mssql/data/

systemctl restart mssql-server.service

After this I tried to create a simple database "test" 在此之后,我尝试创建一个简单的数据库“测试”

sqlcmd -s localhost -U sa -P "someStrongPassword" -Q "CREATE DATABASE test" 

The error returned is as follows: 返回的错误如下:

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'. 尝试扩展物理文件“ /mnt/var/opt/mssql/data/test.mdf”时,“修改文件”遇到操作系统错误31(连接到系统的设备无法运行。)。 CREATE DATABASE failed. CREATE DATABASE失败。 Some file names listed could not be created. 列出的某些文件名无法创建。 Check related errors. 检查相关错误。

The error log indicates an OS error: 错误日志指示操作系统错误:

/mnt/var/opt/mssql/data/test.mdf: Operating system error 31(A device attached to the system is not functioning.) encountered. /mnt/var/opt/mssql/data/test.mdf:遇到操作系统错误31(连接到系统的设备无法运行。)。

I cannot mount the data directory by any means. 我无法以任何方式挂载数据目录。 The permissions to "/mnt" directory are set to 777 too. “ / mnt”目录的权限也设置为777。 Changing the default data directory to any other folder, works perfectly fine. 将默认数据目录更改为任何其他文件夹,效果很好。 Is this a known or recent bug with mssql server? 这是mssql服务器的已知错误或最新错误吗?

Yes, there is an issue with using remote storage through NFS and SMB that came up in CTP 2.1 and was not yet fixed in RC1. 是的,CTP 2.1中出现了通过NFS和SMB使用远程存储的问题,而RC1中尚未解决。 See release notes: https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-release-notes#a-idrc1-rc1-july-2017-a The only workarounds are to use local storage or CTP 2.0. 请参阅发行说明: https : //docs.microsoft.com/zh-cn/sql/linux/sql-server-linux-release-notes#a-idrc1-rc1-july-2017-a唯一的解决方法是使用本地存储或CTP 2.0。 We are working on a fix. 我们正在努力解决。 Release ETA is TBD ATM. 发行版ETA是TBD ATM。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM