---
title: "Storage Spaces Mirroring: Cài đặt chi tiết từ đầu và kiểm tra hoạt động thực tế"
description: "Hướng dẫn cấu hình Storage Spaces Two-way Mirroring trên Windows Server VPS bằng PowerShell từ đầu và kiểm tra độ sẵn sàng, hiệu năng đọc ghi thực tế."
canonical: "https://thuecloud.vn/storage-spaces-mirroring-cai-dat-chi-tiet-tu-dau-va-kiem-tra-hoat-dong-thuc-te"
markdown_url: "https://thuecloud.vn/storage-spaces-mirroring-cai-dat-chi-tiet-tu-dau-va-kiem-tra-hoat-dong-thuc-te.md"
locale: "vi"
kind: "article"
published_at: "2026-11-22T16:18:35.896Z"
updated_at: "2026-11-22T16:18:32.801Z"
site: "ThueCloud.Vn"
estimated_tokens: 1870
---
# Storage Spaces Mirroring: Cài đặt chi tiết từ đầu và kiểm tra hoạt động thực tế

> Hướng dẫn cấu hình Storage Spaces Two-way Mirroring trên Windows Server VPS bằng PowerShell từ đầu và kiểm tra độ sẵn sàng, hiệu năng đọc ghi thực tế.

- Canonical HTML: https://thuecloud.vn/storage-spaces-mirroring-cai-dat-chi-tiet-tu-dau-va-kiem-tra-hoat-dong-thuc-te
- Markdown URL: https://thuecloud.vn/storage-spaces-mirroring-cai-dat-chi-tiet-tu-dau-va-kiem-tra-hoat-dong-thuc-te.md
- Organization: ThueCloud.Vn
- Support Email: support@thuecloud.vn
- Hotline: 03333 499 48
- Published: 2026-11-22
- Updated: 2026-11-22

## Mục lục

- Cài đặt Storage Spaces Two-way Mirror từ đầu bằng PowerShell
- Kiểm tra hoạt động thực tế và sức khỏe cụm đĩa
- Câu hỏi thường gặp (FAQ)
  - Tại sao tôi chạy Get-PhysicalDisk -CanPool $true lại không thấy ổ đĩa mới gắn?
  - Nên chọn ProvisioningType Fixed hay Thin cho Mirroring trên Windows Server?
  - Dung lượng sử dụng được của Two-way Mirroring tính như thế nào?

Khi gắn thêm nhiều ổ đĩa dữ liệu vào máy chủ Windows trên [VPS Việt Nam](https://thuecloud.vn/vps-viet-nam) để lưu trữ database kế toán hoặc file quan trọng, Storage Spaces (chế độ Two-way Mirror) cung cấp khả năng dự phòng tương đương RAID 1 bằng phần mềm gốc của Microsoft. Bài viết hướng dẫn từng bước thiết lập bằng PowerShell và kiểm tra trạng thái thực tế.

> **Tóm tắt nhanh (TL;DR):**
> - Cần tối thiểu 2 ổ đĩa vật lý/ảo chưa khởi tạo phân vùng (`CanPool = True`) để tạo Storage Pool Two-way Mirror.
> - Sử dụng PowerShell (`New-StoragePool`, `New-VirtualDisk`) giúp kiểm soát chính xác `ResiliencySettingName` và kích thước cấp phát.
> - Luôn kiểm tra `OperationalStatus` và thử nghiệm đọc/ghi sau khi định dạng NTFS/ReFS.
> - *Cập nhật: 11/2026*

## Cài đặt Storage Spaces Two-way Mirror từ đầu bằng PowerShell

Mở PowerShell với quyền Administrator và kiểm tra danh sách ổ đĩa đủ điều kiện đưa vào Pool:

```powershell
Get-PhysicalDisk -CanPool $true | Select-Object FriendlyName, MediaType, Size, OperationalStatus
```

Tiếp theo, gom các ổ đĩa đó vào một Storage Pool mang tên `DataPool`, tạo ổ đĩa ảo `MirrorDisk` dùng cơ chế `Mirror` (Two-way Mirror) và định dạng ổ `E:`:

```powershell
$disks = Get-PhysicalDisk -CanPool $true
New-StoragePool -FriendlyName "DataPool" -StorageSubsystemFriendlyName "Windows Storage*" -PhysicalDisks $disks

New-VirtualDisk -StoragePoolFriendlyName "DataPool" -FriendlyName "MirrorDisk" `
    -ResiliencySettingName "Mirror" -NumberOfDataCopies 2 -UseMaximumSize -ProvisioningType Fixed

Get-VirtualDisk -FriendlyName "MirrorDisk" | Get-Disk | Initialize-Disk -PartitionStyle GPT -PassThru |
    New-Partition -AssignDriveLetter -UseMaximumSize |
    Format-Volume -FileSystem NTFS -NewFileSystemLabel "MirrorData" -Confirm:$false
```

## Kiểm tra hoạt động thực tế và sức khỏe cụm đĩa

Sau khi tạo xong ổ đĩa mới, hãy chạy kiểm tra trạng thái pool, virtual disk và tốc độ đọc/ghi cơ bản:

```powershell
Get-StoragePool -FriendlyName "DataPool" | Select-Object FriendlyName, HealthStatus, OperationalStatus
Get-VirtualDisk -FriendlyName "MirrorDisk" | Select-Object FriendlyName, ResiliencySettingName, HealthStatus, Size
winsat disk -drive E
```

| Thành phần kiểm tra | Trạng thái đạt chuẩn | Ý nghĩa vận hành |
| :--- | :--- | :--- |
| `StoragePool.HealthStatus` | `Healthy` | Tất cả ổ đĩa trong pool đang hoạt động bình thường |
| `VirtualDisk.OperationalStatus` | `OK` | Ổ đĩa ảo sẵn sàng phục vụ đọc/ghi dữ liệu |
| `ResiliencySettingName` | `Mirror` (`NumberOfDataCopies: 2`) | Dữ liệu được nhân bản đồng thời lên 2 ổ đĩa |
| `ProvisioningType` | `Fixed` | Cấp phát dung lượng cố định, tránh phân mảnh và treo đĩa khi đầy |

Nếu bạn đang triển khai đồng bộ các dịch vụ khác trên cụm máy chủ, hãy xem thêm [cài đặt Presidio Custom VN Recognizer](https://thuecloud.vn/presidio-custom-vn-recognizer-cai-dat-chi-tiet-tu-dau-va-kiem-tra-hoat-dong-thuc-te), [bảo mật Cloud-Init Network Config v2](https://thuecloud.vn/cloud-init-network-config-v2-tang-cuong-bao-mat-phan-quyen-va-thiet-lap-giam-sat-canh-bao) và [tinh chỉnh PHP-FPM Slowlog Profiler](https://thuecloud.vn/php-fpm-slowlog-profiler-tinh-chinh-tham-so-hieu-nang-va-gioi-han-tai-nguyen-production).

**Lưu trữ dữ liệu an toàn trên Windows VPS NVMe tại ThueCloud.Vn:**
Cụm KVM Enterprise NVMe tại `vn-hn` hỗ trợ gắn thêm ổ đĩa mở rộng linh hoạt, VAT `0%`, SLA `99,9%`, hoàn tiền `07 ngày`. Xem [câu hỏi thường gặp](https://thuecloud.vn/faq) và [bảng giá](https://thuecloud.vn/pricing): **VPS VN 1** từ `45.000đ` (`60.000đ`), **VPS VN 2** `78.000đ` (`90.000đ`), **VPS VN 3** `139.000đ` (`170.000đ`).

## Câu hỏi thường gặp (FAQ)

### Tại sao tôi chạy Get-PhysicalDisk -CanPool $true lại không thấy ổ đĩa mới gắn?
Ổ đĩa chỉ có `CanPool = True` khi nó ở trạng thái Raw (chưa được Initialize hoặc chưa tạo phân vùng nào). Nếu bạn đã lỡ format ổ đĩa đó, hãy vào Disk Management xóa toàn bộ volume trên đĩa đó trước.

### Nên chọn ProvisioningType Fixed hay Thin cho Mirroring trên Windows Server?
Nên chọn `Fixed` cho môi trường production. `Thin` dễ dẫn đến tình trạng ổ đĩa ảo báo còn trống nhưng dung lượng vật lý trong Pool đã cạn, gây lỗi treo toàn bộ Virtual Disk.

### Dung lượng sử dụng được của Two-way Mirroring tính như thế nào?
Với 2 ổ đĩa 100GB chạy Two-way Mirror, dữ liệu được ghi giống hệt nhau trên cả 2 ổ nên dung lượng sử dụng thực tế sẽ là 100GB (tỷ lệ hiệu dụng 50%).

## References / Sources

- https://learn.microsoft.com/en-us/windows-server/storage/storage-spaces/deploy-standalone-storage-spaces
- https://learn.microsoft.com/en-us/powershell/module/storage/new-virtualdisk

---

## Navigation & Machine-Readable Endpoints

- [Site Summary (llms.txt)](https://thuecloud.vn/llms.txt)
- [Full Technical Reference (llms-full.txt)](https://thuecloud.vn/llms-full.txt)
- [Pricing Catalog (Markdown)](https://thuecloud.vn/pricing.md)
- [Blog & Technical Guides (Markdown)](https://thuecloud.vn/blog.md)
- [XML Sitemap](https://thuecloud.vn/sitemap.xml)
