Reply
Byte
Yelnoc4
Posts: 8
Registered: ‎04-12-2012
0
Accepted Solution

SQL server says the st9750420 sector size is 3072 and can't access data files

[ Edited ]

I replaced an older Momentous drive with this 750gb drive and SQL Server doesn't like it. Originally I restored to the new drive via backup, but It doesn't matter if I do a fresh install of SQL server on the drive; same problem. I'm running W7 on a Dell M6500 laptop and this is the second drive in the box.

 

The "5178" error is:

 

Cannot use file ...\mastlog.ldf' because it was originally formatted with sector size 4096 and is now on a volume with sector size 3072. Move the file to a volume with a sector size that is the same as or smaller than the original sector size.

 

Another utility "IsAdvancedFormat" also reports  a physical sector size of 3072, most report the logical 512 or 4096.

 

Any ideas? Does this drive indeed have a physical sector size of 3072?

Yottabyte
fzabkar
Posts: 4,647
Registered: ‎01-27-2009
0

Re: SQL server says the st9750420 sector size is 3072 and can't access data files

Try running SeaTools for Windows on the drive. Afterwards there should be a 512-byte *.ATA file, where the asterisk will be the drive's serial number. This file will contain the ATA Identify Device data which will include things such as physical sector size. If you upload this file, one of us will analyse it for you.

Byte
Yelnoc4
Posts: 8
Registered: ‎04-12-2012
0

Re: SQL server says the st9750420 sector size is 3072 and can't access data files

I think this is what you are looking for (attached).

Yottabyte
fzabkar
Posts: 4,647
Registered: ‎01-27-2009
0

Re: SQL server says the st9750420 sector size is 3072 and can't access data files

I have tabulated your Identify Device data here:
http://www.users.on.net/~fzabkar/HDD/5WS4BRQW.TXT

The meaning of each word is explained in section 7.16 of the following document:

Working Draft AT Attachment 8 - ATA/ATAPI Command Set (ATA8-ACS):
http://www.t13.org/documents/UploadedDocuments/docs2008/D1699r6a-ATA8-ACS.pdf

Word #106 reports the physical sector size and logical sector size. In your case the logical sector size is 512 bytes, and the physical sector size is 8 times (= 2^3) the logical size, ie 4096 bytes.

Are you perhaps confusing sector size with cluster size? The latter is an OS concept.

Byte
Yelnoc4
Posts: 8
Registered: ‎04-12-2012
0

Re: SQL server says the st9750420 sector size is 3072 and can't access data files

[ Edited ]

Thanks for your help.

 

The cluster size as reported by chkdsk  is 4K. fsutil fsinfo ntfsinfo e: also reports "bytes per sector: 4096".

 

There is something about this drive that has the IsAdvancedFormat utility (http://deployment.xtremeconsulting.com/category/troubleshooting/) and Sql Server fooled.Both think the physical sector size is 3072.

 

Also of note: fsutil shows "bytes per physical sector as <no supported>". Could this be part of the problem?

Yottabyte
fzabkar
Posts: 4,647
Registered: ‎01-27-2009
0

Re: SQL server says the st9750420 sector size is 3072 and can't access data files

The author of IsAdvancedFormat supplies a link to his source code here:
http://deployment.xtremeconsulting.com/category/uncategorized/
http://cid-5407b03614346a99.office.live.com/self.aspx/Blog/IsAdvancedFormat.zip

Unfortunately I haven't been able to download it. :-(

Instead I've used a hex editor to dump Dell's DellAFDT.exe:
http://downloads.dell.com/FOLDER96706M/4/DELL_ADVANCED-FORMAT-HDD-DET_A00_R306204.exe

I notice that it contains references to Identify Data Words 106, 117, 118, and 209, so it appears that the utility is examining the same Identify Device words that were of interest to us.

FWIW, a WD user reports that one of his AF drives is also "showing 3072 bytes per physical sector":
http://community.wdc.com/t5/Desktop/WD15EADS-00P8B0-Really-slow-Or-am-I-just-crazy/m-p/49249#M2439

In his case the drive is in a RAID0. Is it possible that your BIOS is set to RAID mode? I know that this is possible in some laptops, even when you have a single drive. If this is indeed your setup, then it could be that the RAID controller is obscuring the drive's real Identify Device data. This could also explain why fsutil appears to be misreporting the drive's parameters.

Byte
Yelnoc4
Posts: 8
Registered: ‎04-12-2012
0

Re: SQL server says the st9750420 sector size is 3072 and can't access data files

[ Edited ]

Thanks again for your help. This is becoming a multi-day headache.

 

I've attached the code to IsAdvancedFormat (if it helps).

 

My BIOS is not set to RAID. I was hoping that might be a reason for the problem.

 

Dell has a firmware updated available. Interestingly, Seagate does not. http://www.dell.com/support/drivers/us/en/19/DriverDetails/DriverFileFormats?DriverId=1M4YX&FileId=2...

 

I'm not going to apply Dell's update unless I can find a better reason to do so. Dell says the purpose for the update is to "Improve the read compatibility"

 

This seems to be a rare problem. Someone had the same problem as me a day earlier on Expert Exchange, but nothing has come of it over there: http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SQL_Server_2008/Q_27673356.html

 

Well... I just loaded Intel's Rapid Storage Technology console and it reports a physical sector size of 4092..

 

 

Yottabyte
fzabkar
Posts: 4,647
Registered: ‎01-27-2009
0

Re: SQL server says the st9750420 sector size is 3072 and can't access data files

I'm not programmer, but ISTM that the Advanced Format data are retrieved via the STORAGE_ACCESS_ALIGNMENT_DESCRIPTOR in response to an IOCTL_STORAGE_QUERY_PROPERTY request by the storage driver. FWIW, I found the following information on Microsoft's web site. I don't know what you could make of it, except perhaps to try a driver update, or switch to a different SATA controller setting in your BIOS. You might also like to use Regedit to examine your drive(s) in your registry.

IOCTL_STORAGE_QUERY_PROPERTY control code:
http://msdn.microsoft.com/en-us/library/windows/hardware/ff560590(v=vs.85).aspx

"Returns properties of a storage device or adapter. The request indicates the kind of information to retrieve, such as inquiry data for a device or capabilities and limitations of an adapter."

"Only Plug and Play drivers can issue IOCTL_STORAGE_QUERY_PROPERTY requests. Legacy drivers should use IOCTL_SCSI_GET_INQUIRY_DATA and IOCTL_SCSI_GET_CAPABILITIES to get inquiry and capabilities data."

STORAGE_ACCESS_ALIGNMENT_DESCRIPTOR structure:
http://msdn.microsoft.com/en-us/library/windows/hardware/ff566344(v=vs.85).aspx

The STORAGE_ACCESS_ALIGNMENT_DESCRIPTOR structure is used in conjunction with the IOCTL_STORAGE_QUERY_PROPERTY request to retrieve the storage access alignment descriptor data for a device.

Syntax
typedef struct _STORAGE_ACCESS_ALIGNMENT_DESCRIPTOR {
  ULONG Version;
  ULONG Size;
  ULONG BytesPerCacheLine;
  ULONG BytesOffsetForCacheAlignment;
  ULONG BytesPerLogicalSector;
  ULONG BytesPerPhysicalSector;
  ULONG BytesOffsetForSectorAlignment;
} STORAGE_ACCESS_ALIGNMENT_DESCRIPTOR, *PSTORAGE_ACCESS_ALIGNMENT_DESCRIPTOR;


Byte
Yelnoc4
Posts: 8
Registered: ‎04-12-2012
0

Re: SQL server says the st9750420 sector size is 3072 and can't access data files

[ Edited ]

I believe the problem is solved, although I don't know what did it. Thanks again for your help.

 

For future readers:

 

After taking a day off, I noticed today that a utility that had been showing 3072 as the sector size suddenly reported 4096. Seeing that something had changed with the disk, I tried to attach data files residing on the “bad” 3072 disk to my named instance of SQL server that I added for troubleshooting. And…. IT WORKED! No longer was SQL server complaining of a 3072 physical sector size any time it “touched” the disk.

 

My next step was to try to return back my “normal” operating environment. I still had the problem with my original default instance looking for data files it could not access. So, I completely uninstalled everything labeled “SQL Server 2012” and re-installed a default instance, with the instance files pointed at the former “3072” drive. And, IT WORKED! There were permission issues to work out, but it worked.

 

So, what changed with my disk issues? Good question. The last thing I did in troubleshooting was to install Intel’s “Rapid Storage Technology” app. Prior to that, from an Intel chipset web page, I asked for a scan of my system for new drivers. It said that there was nothing chipset-related to update. There was also nothing from Seagate to update. I went ahead and installed the Intel app even though supposedly it’s really only useful for managing RAID arrays, swapping drives, etc.

 

So, I can only assume that it was a driver issue related to reporting 3072 as the sector size. Note that some utilities reported 4096 all along. Only the “IsAdvancedFormat” app and SqlServer seemed to think the physical sector size was 3072. I also must not have rebooted enough times to get something to take after the Intel app install.

 

Note that along the way I found items of interest, such as http://support.microsoft.com/kb/982018 but my system was already up to date.

Visitor
nsleigh
Posts: 1
Registered: ‎07-30-2012
0

Re: SQL server says the st9750420 sector size is 3072 and can't access data files

I had extactly the same issue with an ST2000DM001, installing  Intel’s “Rapid Storage Technology” application fixed it. So it looks like there is a driver issue.