试图将现有逻辑卷扩展到大于16TiB的大小并调整其上的ext3文件系统的大小时,遇到了以下错误消息:
[root@yunweixia.com ]# resize2fs /dev/testvg/testlv resize2fs 1.43.8 (1-Jan-2018) resize2fs: New size too large to be expressed in 32 bits
此时,通过lvdisplay查看逻辑卷大小显示为17TB。
[root@yunweixia.com ]# lvdisplay -m /dev/testvg/testlv --- Logical volume --- LV Path /dev/testvg/testlv LV Name testlv VG Name testvg LV UUID qzUm4T-hZLy-TMF1-YkgN-YMPs-puB7-YcrboX LV Write Access read/write LV Creation host, time yunweixia.com, 2023-02-03 07:12:55 +0000 LV Status available # open 1 LV Size 17.00 TiB Current LE 4456448 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 1024 Block device 254:0 --- Segments --- Logical extents 0 to 4456447: Type striped Stripes 2 Stripe size 64.00 KiB Stripe 0: Physical volume /dev/nvme3n1 Physical extents 0 to 2228223 Stripe 1: Physical volume /dev/nvme4n1 Physical extents 0 to 2228223
解决方案
将文件系统的大小调整为16 TiB(16777216 MB),这是ext3文件系统支持的最大大小。
[root@yunweixia.com ]# resize2fs /dev/testvg/testlv 16777216M resize2fs 1.43.8 (1-Jan-2018) Filesystem at /dev/mapper/testvg-testlv is mounted on /mnt; online resizing required old_desc_blocks = 896, new_desc_blocks = 1024 The filesystem on /dev/mapper/testvg-testlv is now 4294967295 (4k) blocks long. [root@yunweixia.com ]# df -h /mnt Filesystem Size Used Avail Use% Mounted on /dev/mapper/testvg-testlv 16T 1.1M 16T 1% /mnt
此问题的根本原因是实际逻辑卷大小略高于linux操作系统ext3文件系统支持的最大值。
原创文章,作者:运维侠,如若转载,请注明出处:https://www.yunweixia.com/solutions/linux-resize2fs-32bit-limit-exceeded-error-solution.html