我正在尝试将 rootfs 分区的大小从 250Gb 调整为 1000Gb。
# sudo resize2fs /dev/sda1
resize2fs 1.42.9 (4-Feb-2014)
Filesystem at /dev/sda1 is mounted on /; on-line resizing required
old_desc_blocks = 15, new_desc_blocks = 59
resize2fs: Not enough reserved gdt blocks for resizing
磁盘:
# sudo fdisk -l
...
Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 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 identifier: 0xa7eaa73d
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 1953523215 976760584 83 Linux
文件系统:
# sudo tune2fs -l /dev/sda1
tune2fs 1.42.9 (4-Feb-2014)
Filesystem volume name: <none>
Last mounted on: /
Filesystem UUID: 276eeebb-6d0e-4ac9-98ac-ed5835989624
Filesystem magic number: 0xEF53
Filesystem revision #: 1 (dynamic)
Filesystem features: has_journal ext_attr resize_inode dir_index filetype needs_recovery extent flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize
Filesystem flags: signed_directory_hash
Default mount options: user_xattr acl
Filesystem state: clean
Errors behavior: Continue
Filesystem OS type: Linux
Inode count: 15299712
Block count: 61049600
Reserved block count: 2520034
Free blocks: 55776421
Free inodes: 14996879
First block: 0
Block size: 4096
Fragment size: 4096
Reserved GDT blocks: 41
Blocks per group: 32768
Fragments per group: 32768
Inodes per group: 8208
Inode blocks per group: 513
Flex block group size: 16
Filesystem created: Tue Sep 23 09:48:57 2014
Last mount time: Sun Apr 3 18:36:38 2016
Last write time: Sun Apr 3 18:36:38 2016
Mount count: 43
Maximum mount count: -1
Last checked: Tue Sep 23 09:48:57 2014
Check interval: 0 (<none>)
Lifetime writes: 17 GB
Reserved blocks uid: 0 (user root)
Reserved blocks gid: 0 (group root)
First inode: 11
Inode size: 256
Required extra isize: 28
Desired extra isize: 28
Journal inode: 8
Default directory hash: half_md4
Directory Hash Seed: f78f18f6-5aaf-4207-aa21-8ec89212504c
Journal backup: inode blocks
可用空间:
# sudo df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 230G 17G 204G 8% /
...
它在 32 位 ARM 设备上,我是否达到了某些限制?有可能克服吗?
答案1
根据一个Linux内核讨论邮件列表,这是一个错误resize2fs
(显然没有解决方法):
好的,根据您的描述,您从 8001057980416 字节的设备开始,然后将其增长到 22002909446144 字节。因此,我尝试使用位于 xfs 分区上的文件执行完全相同的操作(这样我就可以使其变得那么大):
和
鉴于我主要专注于使用在线调整大小来使 resize2fs 工作,这并不完全令我惊讶,但这绝对是 resize2fs 的一个需要修复的错误 --- 我们需要使离线调整大小工作,并且如果有与之相关的错误,我们只需让 resize2fs 拒绝进行离线调整大小即可。