一台文件存储服务器单目录下子目录已经突破31998数限制,造成无法继续创建子目录,服务器系统环境为CentOS5.4 内核版本为2.6.18。解决方案只能是升级到ext4文件系统,首先到https://ext4.wiki.kernel.org/index.php/Ext4_Howto查了一下资料,文中的第一句便是“Ext4 was released as a functionally complete and stable filesystem in Linux 2.6.28”。难道只能升级内核一条路了吗?当然不是:)呵呵,下面总结本人实施/www分区从ext3升级至ext4步骤供大家参考。
一、升级前状态
[root@USER-SERVER ~]# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda2 20315844 2342008 16925196 13% /
/dev/sda5 129863460 192192 122968152 1% /www
/dev/sda1 194442 17798 166605 10% /boot
tmpfs 1029680 0 1029680 0% /dev/shm
无任何信息返回,说明/dev/sda5的ext4特征没有激活
[root@USER-SERVER ~]# tune2fs -l /dev/sda5 | grep extent
[root@USER-SERVER ~]#
一、升级前状态
引用
[root@USER-SERVER ~]# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda2 20315844 2342008 16925196 13% /
/dev/sda5 129863460 192192 122968152 1% /www
/dev/sda1 194442 17798 166605 10% /boot
tmpfs 1029680 0 1029680 0% /dev/shm
无任何信息返回,说明/dev/sda5的ext4特征没有激活
引用
[root@USER-SERVER ~]# tune2fs -l /dev/sda5 | grep extent
[root@USER-SERVER ~]#