- 论坛徽章:
- 0
|
如何在ext3下格式化8T以上的分区?
一,如何查看一个文件系统的块大小?
首先解释什么是block?
ext2和ext3的最小单位是一个个的 data block,
block的大小会影响到格式化分区的大小,
下面我们查看一个已格式化的分区的块大小:
[root@dev ~]# tune2fs -l /dev/mapper/VolGroup00-LogVol00
tune2fs 1.39 (29-May-2006)
Filesystem volume name:
Last mounted on:
Filesystem UUID: 44a1d3f0-f6f3-40d5-ba78-6afced33c52a
Filesystem magic number: 0xEF53
Filesystem revision #: 1 (dynamic)
Filesystem features: has_journal ext_attr resize_inode dir_index filetype needs_recovery sparse_super large_file
Default mount options: user_xattr acl
Filesystem state: clean
Errors behavior: Continue
Filesystem OS type: Linux
Inode count: 35127296
Block count: 35102720
Reserved block count: 1755136
Free blocks: 33231853
Free inodes: 35082960
First block: 0
Block size: 4096 //在这里,可以看到这个分区的块大小是 4K,就是4096字节
Fragment size: 4096
Reserved GDT blocks: 1015
Blocks per group: 32768
Fragments per group: 32768
Inodes per group: 32768
Inode blocks per group: 1024
Filesystem created: Sat May 24 01:30:10 2008
Last mount time: Tue Dec 30 09:53:29 2008
Last write time: Tue Dec 30 09:53:29 2008
Mount count: 11
Maximum mount count: -1
Last checked: Sat May 24 01:30:10 2008
Check interval: 0 ()
Reserved blocks uid: 0 (user root)
Reserved blocks gid: 0 (group root)
First inode: 11
Inode size: 128
Journal inode: 8
First orphan inode: 17999140
Default directory hash: tea
Directory Hash Seed: 20d9ea13-5017-4f1c-a6e4-5aace255e2b9
Journal backup: inode blocks
二,分区的块大小与分区大小的关系:
Filesystem File Size Limit Filesystem Size Limit
ext2/ext3 with 1 KiB blocksize 16448 MiB (~ 16 GiB) 2048 GiB (= 2 TiB)
ext2/3 with 2 KiB blocksize 256 GiB 8192 GiB (= 8 TiB)
ext2/3 with 4 KiB blocksize 2048 GiB (= 2 TiB) 8192 GiB (= 8 TiB)
ext2/3 with 8 KiB blocksize (Systems with 8 KiB pages like Alpha only) 65568 GiB (~ 64 TiB) 32768 GiB (= 32 TiB)
可见正常情况下,如果我们的blocksize是4K,则我们的分区最大可以达到8T.
注意:如果我们在i386的系统中强行指定blocksize为8k,则格式化完成分区加载会报错。所以应该采用默认的4096 blocksize
三,如何用ext3格式化超过8T大小的分区?
rhel 5.0以后的版本可以支持ext3文件系统最大到16T,
注意:如果采用正常的命令进行格式化是不行的,系统会报错误
如下:
mkfs.ext3 /dev/sda1
会报错说已经超出了8T大小的限制
此时请注意添加参数: mkfs.ext3 -F /dev/sda1
-F参数的含义:
Force mke2fs to run, even if the specified device is not a block special device, or appears to be mounted
它会强制mke2fs运行,不管指定的设备是否块设备或着是已挂载的设备
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/82938/showart_1817749.html |
|