CentOS 6以下版本 支持Ext4

CentOS默认是不支持Ext4.所以你需要处理一下才行。

使用环境使用的是CentOS5.8 内核是  2.6.18-238.19.1.el5

其实CentOS 5.8 里面是有 ext4 模块的,只是没加载,所以我们先把模块加入系统

# cd /lib/modules/2.6.18-238.19.1.el5/kernel/fs/ext4   //ext4模块就在此目录下

# [root@linux ext4]# ls

ext4.ko

找到模块后使用modprobe 命令添加

# modprobe ext4    //注意:这里只能写模块名,不能写成 ext4.ko

# lsmod |grep ext4  //添加完后使用lsmod 查看

ext4                  285409  0

jbd2                   47744  1 ext4

crc16                   1027  1 ext4

[root@linux ext4]# yum install e4fsprogs     //最后使用yum 安装一下 e4fsprogs

[root@linux ext4]# mkfs.ext4 /dev/sdc    //最后创建一个分区来使用ext4 创建文件系统

mke4fs 1.41.12 (17-May-2010)
/dev/sdi is entire device, not just one partition!
Proceed anyway? (y,n) y
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
61014016 inodes, 244056064 blocks
12202803 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
7448 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
        4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
        102400000, 214990848
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 31 mounts or
180 days, whichever comes first.  Use tune4fs -c or -i to override.
[root@linux ext4]#mount /dev/sdc /hadoop1 

看不清,换一张