我最近使用mdadm设置了我的第一个软件raid,并且在raid中添加了更多磁盘后,我无法将文件系统调整为raid的完整大小.我通过以下方式在/ dev / md0上创建了一个(~16TB)文件系统:
mkfs.ext4 -v -b 4096 -t huge -E stride=128,stripe-width=256 /dev/md0
然后我痛苦地等了几天,因为旧raid的所有数据都复制到了新的raid;我移动了磁盘并进行了突袭,最后我终于:
resize2fs -p /dev/md0
这通知我
resize2fs 1.42 (29-Nov-2011) resize2fs: /dev/md0: The combination of flex_bg and !resize_inode features is not supported by resize2fs
我对这两个功能究竟是什么或者为什么组合很麻烦都没有任何理解,所以在我更好的判断下我尝试添加resize_inode:
tune2fs -O +resize_inode /dev/md0
但我被击落了:
Setting filesystem feature 'resize_inode' not supported.
而且我没有勇气尝试删除flex_bg,因为我真的不想做任何可能使我的数据面临风险的事情.我正在使用3.5.1内核运行Ubuntu 12.04:
Linux critter 3.5.1-030501-generic #201208091310 SMP Thu Aug 9 17:11:48 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
我用v1.42.5(最新的可用版本)再次测试resize2fs无济于事.所以,要清楚,我的问题是:如何将这个ext4文件系统调整为raid的大小(最好不重新创建)?
编辑:这里有一些可能有用的文件系统信息.
tune2fs -l /dev/md0 tune2fs 1.42 (29-Nov-2011) Filesystem volume name: <none> Last mounted on: /media/Bigger Filesystem UUID: baecfa03-74c1-42ad-8e19-3b823f05f502 Filesystem magic number: 0xEF53 Filesystem revision #: 1 (dynamic) Filesystem features: has_journal ext_attr dir_index filetype extent 64bit 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: 274700288 Block count: 4395202560 Reserved block count: 219760128 Free blocks: 247712956 Free inodes: 274636266 First block: 0 Block size: 4096 Fragment size: 4096 Blocks per group: 32768 Fragments per group: 32768 Inodes per group: 2048 Inode blocks per group: 128 RAID stride: 128 RAID stripe width: 768 Flex block group size: 16 Filesystem created: Fri Aug 17 02:54:50 2012 Last mount time: Mon Aug 20 02:21:51 2012 Last write time: Mon Aug 20 02:25:07 2012 Mount count: 3 Maximum mount count: -1 Last checked: Fri Aug 17 02:54:50 2012 Check interval: 0 (<none>) Lifetime writes: 16 TB 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: b357ba49-60b1-4c55-837f-a70c8285a8f5 Journal backup: inode blocks
这可能对你有帮助 –
http://www.spinics.net/lists/linux-ext4/msg27511.html
在做任何事情之前进行备份,因为你正在做的事情看起来非常冒险.
见到这个 – https://ext4.wiki.kernel.org/index.php/Ext4_Howto
WARNING: It is NOT recommended to resize the inodes using resize2fs with e2fsprogs 1.41.0 or later,as this is known to corrupt some filesystems.
对于64位ext4文件系统,高达16TB似乎可行,但工具的状态似乎在不断变化.这是一个非常好的阅读 – http://blog.ronnyegner-consulting.de/2011/08/18/ext4-and-the-16-tb-limit-now-solved/