Raid
RAID 會被意外配置兩次嗎?
我從 Hetzner 租了一台伺服器,它有 2 個 8TB 磁碟。我相信它們被列為 RAID 1(儘管再也找不到任何東西來證實這一點),我認為這會給我 16 TB 的可用空間作為 RAID 1。然後我執行了這個腳本,它設置了 RAID 和邏輯卷。
然而,最終結果是一個約 8TB 的(邏輯)磁碟。可能是 RAID 1 鏡像被執行了兩次?如果是這樣,我將如何證實這個假設?
這裡是
lsblk
:lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS sda 8:0 0 7.3T 0 disk ├─sda1 8:1 0 1M 0 part └─sda2 8:2 0 7.3T 0 part └─md127 9:127 0 7.3T 0 raid1 └─vg0-root0 254:0 0 6.9T 0 lvm /nix/store / sdb 8:16 0 7.3T 0 disk ├─sdb1 8:17 0 1M 0 part └─sdb2 8:18 0 7.3T 0 part └─md127 9:127 0 7.3T 0 raid1 └─vg0-root0 254:0 0 6.9T 0 lvm /nix/store /
fdisk -l
:fdisk -l Disk /dev/sdb: 7.28 TiB, 8001563222016 bytes, 15628053168 sectors Disk model: HGST HUH721008AL Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disklabel type: gpt Disk identifier: 0D66DC9A-41E1-44B0-AF57-EDF422A7B4C4 Device Start End Sectors Size Type /dev/sdb1 2048 4095 2048 1M BIOS boot /dev/sdb2 4096 15628052479 15628048384 7.3T Linux filesystem Disk /dev/sda: 7.28 TiB, 8001563222016 bytes, 15628053168 sectors Disk model: HGST HUH721008AL Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disklabel type: gpt Disk identifier: 1FE75135-DDF0-4DF7-B79D-4890D594D12A Device Start End Sectors Size Type /dev/sda1 2048 4095 2048 1M BIOS boot /dev/sda2 4096 15628052479 15628048384 7.3T Linux filesystem Disk /dev/md127: 7.28 TiB, 8001425506304 bytes, 15627784192 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk /dev/mapper/vg0-root0: 6.91 TiB, 7601349722112 bytes, 14846386176 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes
df -h
:df -h Filesystem Size Used Available Use% Mounted on devtmpfs 6.3G 4.0K 6.3G 0% /dev tmpfs 62.9G 16.0K 62.9G 0% /dev/shm tmpfs 31.4G 6.1M 31.4G 0% /run tmpfs 62.9G 456.0K 62.9G 0% /run/wrappers /dev/disk/by-uuid/fa8731e9-00e6-44fa-aa0f-f86ce2a1ca03 6.9T 1.6T 5.0T 24% / /dev/disk/by-uuid/fa8731e9-00e6-44fa-aa0f-f86ce2a1ca03 6.9T 1.6T 5.0T 24% /nix/store tmpfs 12.6G 12.0K 12.6G 0% /run/user/0 tmpfs 12.6G 0 12.6G 0% /run/user/1005
Raid 1 = 鏡像所以 8TB 可用空間和 2 個 8TB 驅動器。您想要的是 Raid Level 0,即條帶化,為您提供兩個驅動器的 16TB 作為一個邏輯設備。