Error creating database on new storage in SQL Server 2008 R2 Failover Cluster

by Craig Efrein   Last Updated June 19, 2015 11:02 AM

Via the Failover Cluster Manager, I recently added a new disk to an existing SQL Server 2008 R2 Cluster, running on Windows Server 2012 R2.

When attempting to create a database on this new storage, I get the following error:

Msg 5123, Level 16, State 1, Line 1
CREATE FILE encountered operating system error 5(failed to retrieve text for this error. Reason: 15105) while attempting to open or create the physical file 'J:\DATA\mydatabase.mdf'.
Msg 1802, Level 16, State 4, Line 1
CREATE DATABASE failed. Some file names listed could not be created. Check related errors.
  1. I can manually add a file to J:\data

  2. The new storage can be moved between nodes without any errors

  3. The SQL Server Service Account has full control over the entire J:\ drive

  4. The SQL Server Service Account has full control over the J:\DATA Here is a layout of the drive, you will notice that DATA is a seperate volume mounted inside J:\

enter image description here

Can someone please help me figure out why I am getting this error?

Update

From James, if I add a subdirectory to data, then the create database command works

CREATE DATABASE [MCO_DB] ON  PRIMARY 
( NAME = N'MYDATABASE_DB', FILENAME = N'J:\DATA\MYDATABASE\MYDATABASE_DB.mdf' , SIZE = 3072KB , FILEGROWTH = 1024KB )
 LOG ON 
( NAME = N'MYDATABASE_DB_log', FILENAME = N'J:\TRN\MYDATABASE_DB_1.ldf' , SIZE = 1024KB , FILEGROWTH = 10%)
GO


Answers 2


Operating system error 5 is a simple Access is denied you can always check those errors in the command prompt net helpmsg 5.

Now Volume mount points are sometimes a bother. In Windows server 2000 the calcs.exe had an error and could not set the permissions on the underlying drive and the only way to do it was to mount the volume using a drive letter, set permissions on the root folder and then create a mountpoint.

Later versions of windows should be able set the permissions on the mountpoint by using the /M switch so that

cacls j:\data /g DOMAIN\ACCOUNT:f /M /E

Will grant the domain\account full permissions on the root of the drive mounted at j:\data, I still haven't leard to do this with icacls.exe and a comment how to do so will be well appriciated.

As you have found out creating a subfolder on the mount point makes it possible for you to create an accesslist for that folder but there still seem to be issues with setting permissions on the root folder of the drive using the GUI.

Usually I dont bother with the calcs command and if I need to set permissions on the root I'll add a driveletter, set the permissions using the GUI and then remove the drive letter.

Spörri
Spörri
June 17, 2015 11:29 AM

There was a problem with the System Volume Information Folder which is a hidden folder at the root of this volume.

enter image description here

On other volumes on the same machine, this protected volume was accessible after being made visible in Folder Options

enter image description here

I could not however access the System Volume Information folder of the DATA directory that I was attempting to create databases in.

Steps taken to resolve by our Windows Admin

  1. A new Drive letter T: was created

  2. The contents of the J: drive was copied into it

  3. The J: Drive was destroyed and the T: drive was changed to the J: drive in Windows.

After which, I was able to create databases normally.

Thanks to @jamesanderson for sending me on the right path.

Craig Efrein
Craig Efrein
June 19, 2015 08:24 AM

Related Questions



Error 823 and no connection

Updated March 01, 2016 04:02 AM


Adding SPARSE made table much bigger

Updated August 23, 2018 10:06 AM