我设置了 RAID 10,带有 4 个硬盘(4x 2TB),但 RAID 过程结束后,我只能看到 2TB 空间。请指教如何解决空间问题?
以下 df -h 的结果仅显示 2TB 硬盘,而不是 4 TB
[root@dc1 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/md125 1.9T 1.7T 208G 89% /
devtmpfs 16G 0 16G 0% /dev
tmpfs 16G 0 16G 0% /dev/shm
tmpfs 16G 1.6G 15G 11% /run
tmpfs 16G 0 16G 0% /sys/fs/cgroup
/dev/md126 468M 222M 247M 48% /boot
tmpfs 3.2G 0 3.2G 0% /run/user/0
以下是 lsblk 的结果
[root@dc1 ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 1.8T 0 disk
├─sda1 8:1 0 1.9G 0 part
│ └─md127 9:127 0 3.7G 0 raid10 [SWAP]
├─sda2 8:2 0 239M 0 part
│ └─md126 9:126 0 474M 0 raid10 /boot
└─sda3 8:3 0 930.6G 0 part
└─md125 9:125 0 1.8T 0 raid10 /
sdb 8:16 0 1.8T 0 disk
├─sdb1 8:17 0 1.9G 0 part
│ └─md127 9:127 0 3.7G 0 raid10 [SWAP]
├─sdb2 8:18 0 239M 0 part
│ └─md126 9:126 0 474M 0 raid10 /boot
└─sdb3 8:19 0 930.6G 0 part
└─md125 9:125 0 1.8T 0 raid10 /
sdc 8:32 0 1.8T 0 disk
├─sdc1 8:33 0 1.9G 0 part
│ └─md127 9:127 0 3.7G 0 raid10 [SWAP]
├─sdc2 8:34 0 239M 0 part
│ └─md126 9:126 0 474M 0 raid10 /boot
└─sdc3 8:35 0 930.6G 0 part
└─md125 9:125 0 1.8T 0 raid10 /
sdd 8:48 0 1.8T 0 disk
├─sdd1 8:49 0 1.9G 0 part
│ └─md127 9:127 0 3.7G 0 raid10 [SWAP]
├─sdd2 8:50 0 239M 0 part
│ └─md126 9:126 0 474M 0 raid10 /boot
└─sdd3 8:51 0 930.6G 0 part
└─md125 9:125 0 1.8T 0 raid10 /
以下是 fdisk -l 的结果
[root@dc1 ~]# fdisk -l
Disk /dev/sda: 2000.4 GB, 2000398934016 bytes, 3907029168 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 label type: dos
Disk identifier: 0x00086703
Device Boot Start End Blocks Id System
/dev/sda1 2048 3911679 1954816 fd Linux raid autodetect
/dev/sda2 * 3911680 4401151 244736 fd Linux raid autodetect
/dev/sda3 4401152 1955977215 975788032 fd Linux raid autodetect
Disk /dev/sdb: 2000.4 GB, 2000398934016 bytes, 3907029168 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 label type: dos
Disk identifier: 0x0006a08e
Device Boot Start End Blocks Id System
/dev/sdb1 2048 3911679 1954816 fd Linux raid autodetect
/dev/sdb2 * 3911680 4401151 244736 fd Linux raid autodetect
/dev/sdb3 4401152 1955977215 975788032 fd Linux raid autodetect
Disk /dev/md127: 3999 MB, 3999268864 bytes, 7811072 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 524288 bytes / 1048576 bytes
Disk /dev/md126: 497 MB, 497025024 bytes, 970752 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 524288 bytes / 1048576 bytes
Disk /dev/md125: 1998.1 GB, 1998143356928 bytes, 3902623744 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 524288 bytes / 1048576 bytes
Disk /dev/sdc: 2000.4 GB, 2000398934016 bytes, 3907029168 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 label type: dos
Disk identifier: 0x0008f346
Device Boot Start End Blocks Id System
/dev/sdc1 2048 3911679 1954816 fd Linux raid autodetect
/dev/sdc2 * 3911680 4401151 244736 fd Linux raid autodetect
/dev/sdc3 4401152 1955977215 975788032 fd Linux raid autodetect
Disk /dev/sdd: 2000.4 GB, 2000398934016 bytes, 3907029168 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 label type: dos
Disk identifier: 0x0007820d
Device Boot Start End Blocks Id System
/dev/sdd1 2048 3911679 1954816 fd Linux raid autodetect
/dev/sdd2 * 3911680 4401151 244736 fd Linux raid autodetect
/dev/sdd3 4401152 1955977215 975788032 fd Linux raid autodetect
非常感谢您的信息和建议。
答案1
在我看来(从 fdisk -l 输出来看)您在每个磁盘上仅为 sd3 分配了大约 1T(930.6G)的磁盘空间。
- 磁盘上扇区总数(第一行):3907029168 个扇区
- 每个磁盘上分配的最后一个扇区(最后一行,sda3):1955977215(扇区)
。
Disk /dev/sda: 2000.4 GB, 2000398934016 bytes, 3907029168 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 label type: dos
Disk identifier: 0x00086703
Device Boot Start End Blocks Id System
/dev/sda1 2048 3911679 1954816 fd Linux raid autodetect
/dev/sda2 * 3911680 4401151 244736 fd Linux raid autodetect
/dev/sda3 4401152 1955977215 975788032 fd Linux raid autodetect
如果您删除 RAID 阵列,扩展 sd3 以填充磁盘(也许使用 gparted?),然后重建 RAID 阵列,我希望您将看到完整大小。
我希望这有帮助。