resize2fs後のLUKS / ext4マッピングされたドライブセクタ番号の不一致

resize2fs後のLUKS / ext4マッピングされたドライブセクタ番号の不一致

e2resizeを使用してluksコンテナ内でext4 fsを再パーティションした後、いくつかの奇妙な結果が出ました。

# e2fsck /dev/mapper/a 
e2fsck 1.44.1 (24-Mar-2018)
The filesystem size (according to the superblock) is 356487715 blocks
The physical size of the device is 356487205 blocks
Either the superblock or the partition table is likely to be corrupt!
Abort<y>? yes

# fdisk -l /dev/sdc
Disk /dev/sdc: 2.7 TiB, 3000558944256 bytes, 732558336 sectors
Units: sectors of 1 * 4096 = 4096 bytes
Sector size (logical/physical): 4096 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0xe520dd91

Device     Boot     Start       End   Sectors  Size Id Type
/dev/sdc1             256 356487972 356487717  1.3T 83 Linux


Disk /dev/mapper/a: 1.3 TiB, 1460171591680 bytes, 356487205 sectors
Units: sectors of 1 * 4096 = 4096 bytes
Sector size (logical/physical): 4096 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

ファイルシステムのサイズを再調整しても機能しません。

# e2fsck -f /dev/mapper/a 
e2fsck 1.44.1 (24-Mar-2018)
The filesystem size (according to the superblock) is 356487715 blocks
The physical size of the device is 356487205 blocks
Either the superblock or the partition table is likely to be corrupt!
Abort<y>? no
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/mapper/a: 145786/89128960 files (4.8% non-contiguous), 354794507/356487715 blocks

# resize2fs /dev/mapper/a 
resize2fs 1.44.1 (24-Mar-2018)
Resizing the filesystem on /dev/mapper/a to 356487205 (4k) blocks.
resize2fs: Attempt to read block from filesystem resulted in short read while trying to resize /dev/mapper/a
Please run 'e2fsck -fy /dev/mapper/a' to fix the filesystem
after the aborted resize operation.

どういうわけか、マップされたドライブのセクタ数がファイルシステムのセクタ数より少なくなりましたか?違いは少しだけ2MB(2MBがluksヘッダーの大きさだと思いますか?)

現状はfsをマウントできないことです。ただし、e2fsckを使用するとエラーは報告されません。

それでは、この長さはどこに設定されていますか?どういうわけか「正しい」値に変更できますか?

ベストアンサー1

おすすめ記事