Creating iSCSI virtual disks
Once you finish installing the iSCSI Target Server role service using the Add Roles And Feature Wizard, the message in the iSCSI Virtual Disks tile on the iSCSI page of Server Manager changes to indicate that you can now create an iSCSI virtual disk. Creating iSCSI virtual disks is the first step in provisioning iSCSI storage to applications that require or can use block storage.
You can create a new iSCSI virtual disk using either Server Manager or Windows PowerShell. To create a new iSCSI virtual disk using Server Manager, do any of the following:
- Click the message in the iSCSI Virtual Disks tile on the iSCSI page.
- Select New iSCSI Virtual Disk from the Tasks menu of this iSCSI Virtual Disks tile on the iSCSI page.
- Right-click on any NTFS volume in the Volumes tile on the Disks page or the Volumes page and select New iSCSI Virtual Disk.
Performing any of these actions will launch the New iSCSI Virtual Disk Wizard, which you can use to create your new iSCSI virtual disk as follows:
- On the Select iSCSI Virtual Disk Location page, begin by selecting a target server. The list of available servers are those that Server Manager has determined that the iSCSI Target Server role has been installed on.
- After you select an iSCSI Target server, select an NTFS-formatted volume on the server that has sufficient free space to host your new iSCSI virtual disk.
- Volume X on server HOST7 is selected for hosting the new iSCSI virtual disk. The new disk will be backed by a VHD file that will be stored in a folder named iSCSIVirtualDisks in the root of X drive.
- On the Specify iSCSI Virtual Disk Name page, type a name and optional description for the new iSCSI virtual disk. For example, if you name the disk "Database," a file named Database.vhd will be created in the location X:\iSCSIVirtualDisks on HOST7. This VHD file will be used to back the new iSCSI virtual disk you are creating.
- On the Specify iSCSI Virtual Disk Size page, specify a size for the new iSCSI virtual disk. The maximum possible size of the disk depends on the amount of free space available on the selected volume.
- On the Assign iSCSI Target page, select New iSCSI Target because this is the first iSCSI virtual disk you are creating. You can also assign the new disk to an existing target if any already exist in your environment.
- On the Specify Target Name page, type a name and optional description for the new target.
- On the Specify Access Servers page, click Add to specify the iSCSI initiator that will access your iSCSI virtual disk. Doing this opens the Add Initiator ID dialog
box, which provides three ways of identifying iSCSI initiators:
- By querying a computer on which the iSCSI initiator has been enabled for its Initiator ID. This method is supported only in Windows Server 2012 and Windows 8.
- By selecting an available Initiator ID from the list of cached IDs on the Target server. This method works only if there are entries in the initiator cache on the Target server.
- By manually specifying the IQN for the initiator.
Note:If you want to allow any iSCSI initiator to connect to the target, select the third option on the Specify Access Servers page and type IQN:* as the initiator IQN. - On the Enable Authentication page, you can optionally enable one or both of the following authentication protocols:
- CHAP The Challenge Handshake Authentication Protocol (CHAP) protocol can be used to authenticate initiator connections.
- Reverse CHAP This protocol can be used to allow the initiator to authenticate the iSCSI target.
- If you enable either of these protocols, you must specify a user name and password for each of them.
At this point, you should review the information on the Confirm Selections page to make sure you don't need to change anything. Once you are satisfied, click Create to create the new iSCSI virtual disk, create the target (if needed), and assign the disk to the target.
After you create your iSCSI virtual disk and target, you can view and manage them on the iSCSI subpage of the File And Storage Services page of Server Manager.
You can also use Windows PowerShell to create new iSCSI virtual disks and iSCSI targets, and to assign iSCSI virtual disks to targets. For example, you can begin by opening a Windows PowerShell console on the iSCSI Target server HOST7 and using the Get-IscsiVirtualDisk cmdlet to display a list of existing iSCSI virtual disks on the server:
PS C:\> Get-IscsiVirtualDisk ClusterGroupName : ComputerName : HOST7.corp.google.com Description : iSCSI virtual disk for Google database server DiskType : Fixed HostVolumeId : {DD1FDED1-3C51-4A33-850A-23C06A555FE5} LocalMountDeviceId : OriginalPath : ParentPath : Path : X:\iSCSIVirtualDisks\Database.vhd SerialNumber : C9EACA53-B17D-4BCF-836B-9EF16867B866 Size : 161061273600 SnapshotIds : Status : NotConnected VirtualDiskIndex : 1795469856
Note that the value of the Path property in the preceding command output is what you would expect based on what you saw earlier in the iSCSI Virtual Disks tile.
In this tutorial:
- Storage and File Services
- Deploying Storage Spaces
- Fixed vs. thin provisioning
- Planning a Storage Spaces deployment
- Implementing Storage Spaces
- Provisioning and managing shared storage
- Creating virtual disks
- Creating volumes
- Provisioning SMB shares
- Types of SMB shares
- Managing shared storage
- Configuring iSCSI storage
- Configuring iSCSI Target Server
- Creating iSCSI virtual disks
- Using iSCSI Initiator