소프트웨어 RAID가 너무 작습니다.

소프트웨어 RAID가 너무 작습니다.

5개의 4TB 드라이브를 사용하여 소프트웨어 RAID 6을 만들었습니다 mdadm --create /dev/md0 --chunk=256 --level=6 --raid-devices=5 /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1 /dev/sdf1. 이전에는 각 드라이브에 최대 크기의 파티션을 만들었습니다. "fdisk -l"은 다음 출력을 표시합니다. 그러나 전체 크기는 6TB에 불과합니다. Raid 6에는 2개의 패리티가 있으므로 12TB 정도가 되어야 하지 않나요?

Disk /dev/sda: 525.1 GB, 525112713216 bytes, 1025610768 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: gpt


#         Start          End    Size  Type            Name
 1     46139392     83888127     18G  Microsoft basic
 2      8390656     46139391     18G  Microsoft basic
 3     87033856   1025610734  447.6G  Linux LVM
 4     83888128     84936703    512M  BIOS boot parti
 5         2048      8390655      4G  Microsoft basic
 6     84936704     87033855      1G  Linux swap

Disk /dev/sdb: 4000.8 GB, 4000787030016 bytes, 7814037168 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: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1  4294967295  2147483647+  ee  GPT
Partition 1 does not start on physical sector boundary.

Disk /dev/sdc: 4000.8 GB, 4000787030016 bytes, 7814037168 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: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1  4294967295  2147483647+  ee  GPT
Partition 1 does not start on physical sector boundary.

Disk /dev/sde: 4000.8 GB, 4000787030016 bytes, 7814037168 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: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sde1               1  4294967295  2147483647+  ee  GPT
Partition 1 does not start on physical sector boundary.

Disk /dev/sdd: 4000.8 GB, 4000787030016 bytes, 7814037168 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: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1               1  4294967295  2147483647+  ee  GPT
Partition 1 does not start on physical sector boundary.

Disk /dev/sdf: 4000.8 GB, 4000787030016 bytes, 7814037168 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: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdf1               1  4294967295  2147483647+  ee  GPT
Partition 1 does not start on physical sector boundary.

Disk /dev/mapper/XSLocalEXT--b30a297a--410a--d586--640b--e10ac011aaf3-b30a297a--410a--d586--640b--e10ac011aaf3: 480.5 GB, 480537214976 bytes, 938549248 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

답변1

파티션이 전체 디스크보다 훨씬 작습니다.

/dev/sdc1               1  4294967295  2147483647+  ee  GPT

4294967295 섹터(7814037168 섹터)만 점유하며,2TiB보다 약간 작습니다.

RAID 어레이에서 전체 디스크를 사용할 계획이라면 파티셔닝에 대해 걱정하지 않고 전체 디스크만 사용하는 것이 좋습니다. 먼저, 슈퍼블록처럼 보이는 모든 것에 초점을 맞춥니다 md.

mdadm --zero-superblock /dev/sdb
mdadm --zero-superblock /dev/sdc
mdadm --zero-superblock /dev/sdd
mdadm --zero-superblock /dev/sde
mdadm --zero-superblock /dev/sdf

그런 다음 배열을 만듭니다.

mdadm --create /dev/md0 --chunk=256 --level=6 --raid-devices=5 /dev/sdb /dev/sdc /dev/sdd /dev/sde /dev/sdf

실패한 드라이브를 섹터 수가 약간 적은 드라이브로 교체하려면 여유 공간을 남겨두어야 할 수 있습니다. --size=크기 필요(점유할 디스크 공간의 양) 옵션을 사용하면 됩니다.사용)(킬로바이트),예를 들어귀하의 경우에는 약 3,907,018,300KiB입니다(드라이브의 총 공간은 3,907,018,584KiB이며, 그 중 128KiB는 RAID 슈퍼 블록용으로 예약되어야 합니다).

관련 정보