Setting up your Block Storage for VPC data volume for use (Windows)
If you want to use your IBM® Cloud Block Storage for Virtual Private Cloud volume as a file system, you need to partition the volume, format it, and then mount it as a file system. You can perform this operation after you created a Block Storage for VPC volume and attached it to an instance.
Follow this procedure to use your Block Storage volume on a Windows® system.
Setting up your volume for use with the Disk Management utility
-
Log in to your Windows instance by using Remote Desktop. For more information, see Connecting to Windows instances.
-
Start the Disk Management utility. On the taskbar, open the menu by right-clicking the Windows logo, and choose Disk Management.
In Windows Server 2008, choose Start > Administrative Tools > Computer Management > Disk Management.
-
The Disk Management window shows the attached storage volume as an unknown, offline disk. Bring the volume online by right-clicking the Block Storage for VPC volume. Choose Online.
-
If the disk is not initialized, you must initialize it before you can use it. If the disk is already initialized, skip to the next step.
If you're mounting a volume that already has data on it, do not reformat the volume as that deletes the existing data. For example, if you restored the volume from a snapshot, the volume contains the data from the snapshot. Do not initialize the volume or you lose the data that you restored.
- Right-click the disk, and choose Initialize Disk.
- In the Initialize Disk dialog box, select a partition style, and choose OK.
-
Right-click the disk, and choose New Simple Volume.
-
In the New Simple Volume Wizard, choose Next.
-
If you want to change the default maximum value, specify the size in MB in the Simple volume size field, and then choose Next.
-
Specify a preferred drive letter, if necessary, and then choose Next.
-
Specify a Volume Label and adjust the default settings as necessary, and then choose Next.
-
Review your settings, and then choose Finish to apply the modifications and close the New Simple Volume wizard.
Setting up your volume for use with Windows PowerShell
- Log in to your Windows instance by using Remote Desktop. For more information, see Connecting to Windows instances.
- On the taskbar, open the Start menu, and choose Windows PowerShell.
- Use the following commands.
Stop-Service -Name ShellHWDetection
Get-Disk | Where PartitionStyle -eq 'raw' | Initialize-Disk -PartitionStyle MBR -PassThru | New-Partition -AssignDriveLetter -UseMaximumSize | Format-Volume -FileSystem NTFS -NewFileSystemLabel "Volume Label" -Confirm:$false
Start-Service -Name ShellHWDetection
The script performs the following actions.
- Stops the ShellHWDetection service.
- Lists the disks where the partition style is raw.
- Creates a partition that spans the maximum size that the disk and partition type can support.
- Assigns an available drive letter.
- Formats the file system as NTFS with the specified file system label.
- Starts the ShellHWDetection service again.