0

I am trying to set up SQL Server on an Azure VM (that has an SSD) per the following articles:

Specifically, one of the recommendations says:

Avoid using Azure data disk caching options (caching policy = None).

I would like to do that for the temp disk. In order to do that, it seems I need to use the PowerShell cmdlet Set-AzureDataDisk. One of the parameters is the LUN of the disk. To get the LUN, it seems I need to use diskpart.

However, on my freshly-provisioned VM, diskpart shows that the temp drive and the system drive have the same LUN ID (#0). Here's what diskpart shows for the system disk:

 DISKPART> select disk 0

 Disk 0 is now the selected disk.

 DISKPART> detail disk

 Virtual HD ATA Device
 Disk ID: 8C35C300
 Type   : ATA
 Status : Online
 Path   : 0
 Target : 0
 LUN ID : 0
 Location Path : ACPI(_SB_)#ACPI(PCI0)#ACPI(IDE0)#ACPI(CHN0)#ATA(C00T00L00)
 Current Read-only State : No
 Read-only  : No
 Boot Disk  : Yes
 Pagefile Disk  : No
 Hibernation File Disk  : No
 Crashdump Disk  : No
 Clustered Disk  : No

And here is what it shows for the temp disk:

 DISKPART> select disk 1

 Disk 1 is now the selected disk.

 DISKPART> detail disk

 Virtual HD ATA Device
 Disk ID: F26B3A20
 Type   : ATA
 Status : Online
 Path   : 0
 Target : 1
 LUN ID : 0
 Location Path : ACPI(_SB_)#ACPI(PCI0)#ACPI(IDE0)#ACPI(CHN0)#ATA(C00T01L00)
 Current Read-only State : No
 Read-only  : No
 Boot Disk  : No
 Pagefile Disk  : Yes
 Hibernation File Disk  : No
 Crashdump Disk  : Yes
 Clustered Disk  : No

My questions are:

  1. Am I even going down the right path?
  2. Can I just set the cache policy for both the system and temp disks? What is the impact?
  3. If not, how do I get the temp disk to be on a different LUN?
2

They might have the same LUN ID (0) but they have different channel IDs (0 and 1), i.e.

C00T00L00

and

C00T01L00

This is perfectly acceptable, in fact even in say an FC/FCoE/iSCSI environment you can have the same LUN number so long as the full path is different.

1
  • So how do I set the cache policy on one but not the other? – anon Jul 21 '15 at 21:03
0

Am I even going down the right path? Can I just set the cache policy for both the system and temp disks? What is the impact? If not, how do I get the temp disk to be on a different LUN?

You can't set the caching policy of the system disk to none. All you can do is switch from read-only to read/write and vice-versa.

Cache on temp disk (D: volume) is disabled by default. You don't need to do anything.

For additional data disks tho, the ones you gonna be using for SQL Server Data, make sure to create it with cache disabled as well.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.