mdadm에 잘못된 배열 크기가 표시되어 확장할 수 없습니다.

mdadm에 잘못된 배열 크기가 표시되어 확장할 수 없습니다.

RAID1 어레이를 생성하기 위해 2개의 파티션을 사용했습니다.

둘 다 967131168 섹터, 각각 512바이트입니다.

따라서 RAID 배열 크기는 483564544여야 합니다.

하지만 다음과 같이 표시됩니다.

     Array Size : 483433472 (461.04 GiB 495.04 GB)
  Used Dev Size : 483433472 (461.04 GiB 495.04 GB)

배열 크기를 늘리면 다음과 같이 표시됩니다.

root@GalensSynology:~# mdadm --grow /dev/md2 --size=max
mdadm: component size of /dev/md2 unchanged at 483433472K

배열 크기를 강제로 조정하려고 하는데 오류가 발생합니다.

root@GalensSynology:~# mdadm --grow /dev/md2 --size=483564544
mdadm: Cannot set device size for /dev/md2: No space left on device

RAID 배열 정보:

root@GalensSynology:~# mdadm --query --detail /dev/md2
/dev/md2:
        Version : 1.2
  Creation Time : Thu Sep 26 14:46:34 2019
     Raid Level : raid1
     Array Size : 483433472 (461.04 GiB 495.04 GB)
  Used Dev Size : 483433472 (461.04 GiB 495.04 GB)
   Raid Devices : 2
  Total Devices : 2
    Persistence : Superblock is persistent

  Intent Bitmap : Internal

    Update Time : Thu Aug 11 21:49:15 2022
          State : active 
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0

           Name : GalensSynology:2  (local to host GalensSynology)
           UUID : ce0e9aff:a0d43a65:acbf6b7f:d9786045
         Events : 1217

    Number   Major   Minor   RaidDevice State
       0       8       51        0      active sync   /dev/sdd3
       1       8       19        1      active sync   /dev/sdb3

디스크 파티션 정보:

root@GalensSynology:~# fdisk -l /dev/sdb
Disk /dev/sdb: 465.8 GiB, 500107862016 bytes, 976773168 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
Disklabel type: dos
Disk identifier: 0xbc7bdaae

Device     Boot   Start       End   Sectors   Size Id Type
/dev/sdb1          2048   4982527   4980480   2.4G fd Linux raid autodetect
/dev/sdb2       4982528   9176831   4194304     2G fd Linux raid autodetect
/dev/sdb3       9437184 976568351 967131168 461.2G fd Linux raid autodetect
root@GalensSynology:~# fdisk -l /dev/sdd
Disk /dev/sdd: 465.8 GiB, 500107862016 bytes, 976773168 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
Disklabel type: dos
Disk identifier: 0x5f55e8f4

Device     Boot   Start       End   Sectors   Size Id Type
/dev/sdd1          2048   4982527   4980480   2.4G fd Linux raid autodetect
/dev/sdd2       4982528   9176831   4194304     2G fd Linux raid autodetect
/dev/sdd3       9437184 976568351 967131168 461.2G fd Linux raid autodetect

그러나 다른 RAID 어레이는 동일한 장치에서 잘 작동합니다.

root@GalensSynology:~# mdadm --query --detail /dev/md5
/dev/md5:
        Version : 1.2
  Creation Time : Thu Aug 11 21:17:31 2022
     Raid Level : raid1
     Array Size : 483564544 (461.16 GiB 495.17 GB)
  Used Dev Size : 483564544 (461.16 GiB 495.17 GB)
   Raid Devices : 1
  Total Devices : 1
    Persistence : Superblock is persistent

    Update Time : Thu Aug 11 21:20:33 2022
          State : clean 
 Active Devices : 1
Working Devices : 1
 Failed Devices : 0
  Spare Devices : 0

           Name : GalensSynology:5  (local to host GalensSynology)
           UUID : 90e5ba00:0ac44575:d3356c1a:4949e120
         Events : 1

    Number   Major   Minor   RaidDevice State
       0       8       35        0      active sync   /dev/sdc3

및 디스크 정보:

root@GalensSynology:~# fdisk -l /dev/sdc
Disk /dev/sdc: 465.8 GiB, 500107862016 bytes, 976773168 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
Disklabel type: dos
Disk identifier: 0xd0050b12

Device     Boot   Start       End   Sectors   Size Id Type
/dev/sdc1          2048   4982527   4980480   2.4G fd Linux raid autodetect
/dev/sdc2       4982528   9176831   4194304     2G fd Linux raid autodetect
/dev/sdc3       9437184 976568351 967131168 461.2G fd Linux raid autodetect

감사합니다 프로스트슈츠.

예, 데이터 오프셋이 다릅니다.

root@GalensSynology:/volume2/homes/galenzhao# mdadm --examine /dev/sdb3
/dev/sdb3:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x0
     Array UUID : ce0e9aff:a0d43a65:acbf6b7f:d9786045
           Name : GalensSynology:2  (local to host GalensSynology)
  Creation Time : Thu Sep 26 14:46:34 2019
     Raid Level : raid1
   Raid Devices : 2

 Avail Dev Size : 966866976 (461.04 GiB 495.04 GB)
     Array Size : 483433472 (461.04 GiB 495.04 GB)
  Used Dev Size : 966866944 (461.04 GiB 495.04 GB)
    Data Offset : 264192 sectors
   Super Offset : 8 sectors
   Unused Space : before=264112 sectors, after=32 sectors
          State : clean
    Device UUID : 4d219454:64cd59fa:8e469f08:992bdf59

    Update Time : Thu Aug 11 22:58:13 2022
  Bad Block Log : 512 entries available at offset 16 sectors
       Checksum : 38317e71 - correct
         Events : 1220


   Device Role : Active device 1
   Array State : AA ('A' == active, '.' == missing, 'R' == replacing)
root@GalensSynology:/volume2/homes/galenzhao# mdadm --examine /dev/sdd3
/dev/sdd3:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x0
     Array UUID : ce0e9aff:a0d43a65:acbf6b7f:d9786045
           Name : GalensSynology:2  (local to host GalensSynology)
  Creation Time : Thu Sep 26 14:46:34 2019
     Raid Level : raid1
   Raid Devices : 2

 Avail Dev Size : 966866976 (461.04 GiB 495.04 GB)
     Array Size : 483433472 (461.04 GiB 495.04 GB)
  Used Dev Size : 966866944 (461.04 GiB 495.04 GB)
    Data Offset : 264192 sectors
   Super Offset : 8 sectors
   Unused Space : before=264112 sectors, after=32 sectors
          State : clean
    Device UUID : 5fc2ee9a:1ea9ba1c:bc415760:777f9c01

    Update Time : Thu Aug 11 22:58:51 2022
  Bad Block Log : 512 entries available at offset 16 sectors
       Checksum : a0624a6d - correct
         Events : 1220


   Device Role : Active device 0
   Array State : AA ('A' == active, '.' == missing, 'R' == replacing)
root@GalensSynology:/volume2/homes/galenzhao# mdadm --examine /dev/sdc3
/dev/sdc3:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x0
     Array UUID : 90e5ba00:0ac44575:d3356c1a:4949e120
           Name : GalensSynology:5  (local to host GalensSynology)
  Creation Time : Thu Aug 11 21:17:31 2022
     Raid Level : raid1
   Raid Devices : 1

 Avail Dev Size : 967129120 (461.16 GiB 495.17 GB)
     Array Size : 483564544 (461.16 GiB 495.17 GB)
  Used Dev Size : 967129088 (461.16 GiB 495.17 GB)
    Data Offset : 2048 sectors
   Super Offset : 8 sectors
   Unused Space : before=1968 sectors, after=32 sectors
          State : clean
    Device UUID : 72b8d726:e6002116:fc1a33af:5332d72a

    Update Time : Thu Aug 11 21:20:33 2022
       Checksum : 2dd6b7e2 - correct
         Events : 1


   Device Role : Active device 0
   Array State : A ('A' == active, '.' == missing, 'R' == replacing)

관련 정보