Windows Server 2016 file operating system spanned volume mirror volume RAID5 volume ISCSI settings

Table of contents

brief description

foreword

illustrate

Text 1

Create a spanned volume

1.2 Create a mirrored volume

1.3 Create a RAID5 volume

2. Use the storage pool to create a disk with a mirror layout

3.ISCSI create volume


brief description

In each version of Windows Server system, there are 5 volume types: simple volume, spanned volume, striped volume, mirrored volume and raid5 volume

Simple volume: a contiguous space that must be created on the same disk;

Spanned volume: It consists of two or more disk storage spaces, and the disk space provided by each hard disk can be different;

Striped volume: It consists of two or more disk storage spaces, but the space size of each hard disk must be the same. When storing files, the system will disperse the data in the same amount of disk space located in each disk;

Mirrored volume: The composition is similar to that of a striped volume, except that the striped volume does not provide fault tolerance. A mirrored volume consists of disk spaces of the same size in two hard disks, and data is stored in one copy on each of the two hard disks.

RAID5 volume: At least 3 hard disks are required to create, and each hard disk must provide the same disk space. When using a RAID5 volume, the data will be scattered and written to each hard disk, and a parity data information will be created at the same time and saved on different hard disks.

foreword

Today, mainly through the following three experiments, I will show you how to use various volumes

  1. Create extended volumes, mirrored volumes, and RAID5 volumes respectively, and verify that when one of the hard disks fails, whether it can still be used normally, record and analyze the reasons;
  2. Create a disk with a Mirror layout through a storage pool, and verify that when one of the hard disks fails, whether it can still be used normally, record and analyze the reason;
  3. Create a volume through iSCSI and record the operation process.

illustrate

Before starting the experiment, let me explain three things

  1. The hard disks added in this experiment are all in SCSI format. Hard disks in this format can be added and removed without shutting down the virtual machine, which is very convenient. If there is an error message such as adding failure during the operation, restart the virtual machine to solve it.

 

  1. If this happens in the experiment

 

File not found: xxxxxxxx.vmdk

This file is required to start this virtual machine. If this file was moved, please provide its new location.

At this time, because the virtual machine cannot find the hard disk of the system, it reports an error, which means that the system cannot find the C drive. This problem is also easy to solve. Open the installation directory of the virtual machine, find the file with the suffix of vmdx, and find the file with the largest size. the one that must be

 

Click directly to browse the error, and then select this file to solve it

3. Create a snapshot before starting the experiment

Text 1

After finishing the preface, let's start the content of the text

    1. Create a spanned volume

At least two hard disks are required to create a spanned volume, and the two hard disks can be different in size. We add a 10G hard disk and a 5G hard disk.

 

After the addition is complete, enter the virtual machine, press win+r, enter diskmgmt.msc, and enter the disk management interface

 

You can see that two disks have been loaded

Connect two hard drives online

 

initialize disk

 

 

At this time, you can create a new spanned volume

 

 

add another hard drive

 

 

 

 

At this time, the system prompts the hard disk to be converted to a dynamic disk, click Yes

 

At this point, the new spanned volume is completed

 

 

At this time, we randomly write some data in the spanned volume

 

Open the virtual machine settings, take the 5G hard disk offline, and simulate the scene of disk damage

 

Then return to the virtual machine to view, and the E disk disappears

 

In Disk Manager, you can see that the spanned volume has expired

 

That is to say, in the spanned volume, if any hard disk is damaged, the data on the entire spanned volume will be directly lost, let alone be unusable.

1.2 Create a mirrored volume

Restore the virtual machine to the snapshot and return to the state before the last experiment

This time the simulation is a mirrored volume, so we add two 10G hard disks

 

Press and hold win+r and enter diskmgmt.msc to enter the disk management interface

After opening this time, the disk initialization is directly prompted, we directly click Yes

 

Right-click the disk volume and click New Mirrored Volume

 

Click Next in the pop-up window, and then add Disk 2

 

 

Click Next, then Finish

 

After returning to the disk management interface, the dialog box for converting dynamic disk pops up again, click Yes

 

After waiting for the formatting to complete, you can see that the newly created mirror volume is successful

 

 

We create a new txt file in the newly created mirror volume E volume and write data

 

Then remove a hard disk to simulate a disk failure

 

Open the disk manager and find that two hard drives are online and the other is lost

 

Open the resource manager and find that the data in the E volume is still there

 

then try to write data

 

It can still be used, but has lost its redundant effect. Next is the advanced mirror volume repair part.

Let's add a 10G hard disk again to simulate the repair of the mirrored volume

 

open disk manager

 

Observe the disk manager at this time

 

We will delete the mirror operation of the lost disk

 

delete lost

 

The disk manager after deletion is like this, we right-click the E volume and select Add Mirror

 

Select Disk 2 we just added

 

Wait for the disk synchronization to complete. At this time, we can also see that the E volume has returned to the mirror volume

 

After the repair is complete, go to view the file just now

 

The data is still there, and the repair of the mirrored volume is successful

1.3 Create a RAID5 volume

The principle of RAID5 redundancy is the parity data check. If you are a student who is just getting started, it will be very difficult to learn. You can operate the steps first. After you are proficient in the steps, it will be much easier to understand later.

The first step is to restore the snapshot and return the virtual machine to the initial state without adding a hard disk

This time I made a RAID5 volume, adding three 10G hard drives

 

After booting, enter the disk manager, connect and initialize the three hard disks

 

Right click and select New RAID5

 

Choose to add three hard drives, click Next, and select the default for all subsequent operations until complete

 

Wait for initialization to complete

 

RAID5 adds three 10G hard disks, and the actual capacity is 20G. Intuitively, there is 10G space for data redundancy.

 

data input

 

This time offline a disk in Disk Manager to simulate a disk corruption

 

 

The test can still write data after offline

 

After offline, add a 10G SCSI hard disk

 

Bring the newly added disk online, initialize it

 

Turn to RAID5 above, right click and select repair

 

select disk 4

 

 

Wait for the resync to complete

 

repair completed

 

The data is still there

 

2. Use the storage pool to create a disk with a mirror layout

This experiment is similar to the mirrored volume above, but here it can be understood as a mirrored disk.

Restoring a virtual machine to a snapshot

Add two 10G sisi hard drives

Open the server management, open the file and storage service-volume-disk in turn, and first connect the two hard disks

 

Then open the storage pool and create a new storage pool

 

Enter the name you like, and select the default operation for the rest

Select the two hard drives that were just brought online

 

 

 

Right-click the newly created storage pool and select New Virtual Disk

 

 

random name

 

 

choose mirror

 

 

random size

 

 

Created

 

 

At this time, only a new virtual disk has been created, and no new volume has been created. It can be used only after the new volume is created.

Right click on the newly created virtual disk

 

 

The size of the volume can be adjusted manually, but at this time the upper limit is 7.97G

 

 

 

 

At this point, the new volume is successfully created, and we can see the volume in the resource manager

 

store some data in this volume

 

Open the virtual machine settings and remove a hard disk

 

At this time, in the test storage pool, you can see that a hard disk has reported an error.

 

But in the resource manager, the data we just stored is still

 

It is also possible to write data

 

Analysis: Use mirror to lay out virtual disks, virtualize two physical disks into one virtual disk, and write data to the two disks during work. When one of the disks fails, the other disk has mirrored data, thus achieving data redundancy.

If one hard disk is lost, the other hard disk can continue to work, but this is no different from ordinary disks, because there is only one hard disk, and data mirroring cannot be done, and the redundant function is lost.

3.ISCSI create volume

ISCSI is often used in large-scale server scenarios. For example, there is a dedicated server for storage. Through the setting of ISCSI, other servers can load the disk of the ISCSI server to the local through the network and use it as a local disk.

There is no need to restore the mirror here, we just use the above volume to do iscsi

Install the iscsi service in Server Manager\File and Storage Services\iSCSI

 

 

After the installation is complete, in the task - new iscsi virtual disk

 

Select E drive

 

random name

 

random size

 

choose next

 

random name

 This IP address means which IP address is allowed to connect to the iSCSI virtual disk. Here, another IP address in the same network segment is selected. When the verification is performed, the client's IP address is set to this

 

 

 

For the convenience of verification, authentication is not enabled here, and the next step is directly

  

 

 

 

Go back to the iscsi manager and you can see the newly created iscsi server

 

Now we start to do the verification step, open another virtual machine in the same network mode

First set the IP and test whether it can communicate with the iscsi server

(During the experiment, at the beginning, the ping gateway was ok, but the ping server was not. After closing the firewall, it was ok. If the ping gateway is ok, there is basically no problem with the network settings. You can also do it without turning off the firewall.)

 

Open Server Manager - Tools - iscsi Initiator

 

 

Fill in the IP of the iscsi server and connect

 

Prompt that the connection is successful

 

 

At this point, you can see the iscsi virtual hard disk in Server Manager\File and Storage Services\Volumes\Disks

 

right click online

 

 

At this time, go to the iscsi server and find that the newly created test virtual disk is connected

 

At this point, we can create a new volume on the client computer and use this virtual disk normally like a local disk

 

       

 

So far, iscsi creates a new volume successfully

Guess you like

Origin blog.csdn.net/qq_24032225/article/details/129721381