Exercise 5: Configuring Storage
Overview
In this exercise, we will walk through the configuration of disk volumes and storage pools by using the File Services Server Role component in Server Manager and PowerShell. We will also walk through the process of creating iSCSI targets and disks for use with Windows Failover Clustering.
Time Estimate
30 minutes
Task 1: Configuring a New Volume
In this task, you will configure a new storage volume using the New Volume Wizard.
1. Open your browser and navigate to http://portal.azure.com
2. Enter the Microsoft account associated with your Microsoft Azure subscription.
3. Navigate to ‘Virtual Machines’ in the left hand pane and locate the virtual machine (vm) called CLUVM1.
4. Ensure that the vm is running, if not click ‘Start’.
5. When the virtual machine is in a running state, click Connect.
6. Open the file in the pop-up window in your browser and click Open to open the RDP connection file and connect.
7. Enter the credentials ‘demouser‘ and ‘Demo@pass123 to connect.
8. After logged on as the user, the Server Manager console should open automatically. If not, start it manually.
9. From Server Manager, select File & Storage Services
10.
From File and Storage Services, select Disks.
11.
See the different disks that are present in this server.
12.
From the Volume section in the portal, click the To create a volume, start the New Volume Wizard. (If a volume already exists, right-click in the volume pane and click New Volume)
13.
This starts the New Volume wizard.
14.
In the “Before you begin” step, press Next.
15.
In the Select the server and disk, select Disk 2. Then click Next.
16.
Read the appearing message and click OK to continue.
17.
In the Specify the size of the volume, accept the maximum size of 1,023 GB. Press Next to continue.
18.
In the Assign to a drive letter or folder, select Drive letter and give it a letter (F is selected as first next available one). Press Create to continue.
19.
In the Select file system settings, enter a name for the Volume label, for example data and press Next to continue.
20.
Wait for the volume to be created successfully.
In this task, you configured a new storage volume using the New Volume Wizard.
Task 2: Configuring a new iSCSI Target Volume
In this task, you will create a new iSCSI Target Volume by using Server Manager and the iSCSI Virtual Disk Wizard.
1. On CLUVM1, from Server Manager, select File and Storage Services.
2. From File and Storage Services, select iSCSI.
3. From the iSCSI Virtual Disks section, click the To create an iSCSI Virtual Disk, start the New iSCSI Virtual Disk Wizard
4. From the Select
iSCSI virtual disk location, select the F: drive you created earlier.
5. Press Next to continue to the iSCSI Virtual Disk Name step.
6. Provide a descriptive name, for example iscsi-disk. Press Next to continue.
7. In the Specify iSCSI virtual disk size, enter a size of 500GB. Press Next to continue.
8. In the Assign iSCSI Target step, select New iSCSI target, and press Next to continue.
9. Provide a name in the Specify target name step. Press Next to continue. This brings you to the select a method to identify the initiator step. Here, select Enter a value for the selected type, and select IP Address from the type box. Enter the local IP address of the CLUVM1 vm (10.0.0.5).
10.
Press Next to continue.
11.
For this exercise, skip the enable authentication step, and press Next to continue.
12.
Confirm the creation in the summary step, by pressing the Create button. Wait for the iSCSI Volume to be created successfully.
13.
Close the New iSCSI Virtual Disk Wizard.
14.
Close the Server Manager.
In this task, you learned how to create a new iSCSI Target Volume by using Server Manager and the iSCSI Virtual Disk Wizard.
Task 3: Configuring a new Disk Volume using PowerShell
In this task, you will learn how to create a new disk volume using PowerShell.
1. Login to CLUVM2 using the following credentials:
– user name: demouser
– password: Demo@pass123
2. Start Windows PowerShell as administrator
3. Type the following cmdlet to get a list of all current disks in the server:
get-disk
4. Similar to the exercise on CLUVM1, select disk 2, by running the following cmdlet:
get-disk -number 2
5. Once the disk is selected, we will “pipe” specific cmdlets one after the other, to get the disk and volume created. The full cmdlet looks like this:
get-disk -number 2 | initialize-disk -PartitionStyle GPT -PassThru | New-Partition -UseMaximumSize -AssignDriveLetter | Format-Volume -FileSystem NTFS -NewFileSystemLabel “data”-confirm:$false
get-disk -number 2
= Selecting the disk to be used
initialize-disk -PartitionStyle GPT -PassThru
= Create the disk as GPT; PassThru means to continue with the next part after the | sign
New-Partition -UseMaximumSize -AssignDriveLetter
= Create a new partition on the disk, allocating the maximum size (1023Gb in this setup), and automatically assign a drive letter (system will take the next available one, which is F in this setup)
Format-Volume -FileSystem NTFS -NewFileSystemLabel “data”-confirm:$false
= Format the volume using NTFS filesystem, allocate the label “data” to the volume and don’t prompt for any further confirmations to execute this cmdlet.
In this task, you learned how to create a new disk volume using PowerShell.
Task 4: Configuring a new iSCSI Disk using PowerShell
In this exercise, you will use Windows PowerShell to create and configure a new iSCSI Disk Target.
1. Assuming you are still logged on to CLUVM2, and Windows PowerShell is still open from the previous exercise. If not, log on to CLUVM2 using demouser and Demo@pass123 as credentials, and start Windows PowerShell as administrator.
2. Run the following cmdlet to create a new iSCSI Disk Target:
New-iSCSIVirtualDisk -Path “F:\iscsiVirtualDisks\iscsi-disk.vhdx” -Size 500GB -Computer CLUVM2
3. Once executed, the result will be displayed once the iSCSI Disk is created successfully.
4. Close Windows PowerShell.
In this exercise, you leveraged Windows PowerShell to create and configure a new iSCSI Disk Target.
Summary
In this exercise, you configured and created disk volumes and iSCSI Disk Targets on Windows Server 2016 machines. On your first server we used the Server Manager GUI, but on your second server you leveraged Windows PowerShell to accomplish the same tasks.