我从 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
答案1
Raid 1 = 镜像,因此 8TB 可用空间带有 2 个 8TB 驱动器。您需要的是 Raid Level 0,即条带化,将两个驱动器的 16TB 作为一个逻辑设备提供给您。