# cat /etc/redhat-release
CentOS release 5.6 (Final)
# uname -a
Linux 115-68-23-47 2.6.39.1 #1 SMP Thu Jun 9 09:05:06 KST 2011 x86_64 x86_64 x86_64 GNU/Linux
※ 주의사항
커널에서 EXT4 활성화되어 있어야 한다.
안되어있음 커널컴파일을 통해 활성화
# grep EXT4 .config
CONFIG_EXT4_FS=m
CONFIG_EXT4_FS_XATTR=y
CONFIG_EXT4_FS_POSIX_ACL=y
CONFIG_EXT4_FS_SECURITY=y
CONFIG_EXT4_DEBUG=y
필요한 툴 설치
# yum -y install e4fsprogs
마운트 정보확인
# mount
...............
...............
/dev/sdb1 on /STORAGE_DISK type ext3 (rw,nosuid,nodev,noatime)
변환하려는 마운트 다이바스 해제
# umount /dev/sdb1
파일시스템 설정값 변경
tune4fs : ext2 / ext3 / ext4 파일 시스템에서 조정 가능한 파일 시스템 매개 변수를 조정
# tune4fs -O extents,uninit_bg,dir_index /dev/sdb1
tune4fs 1.41.12 (17-May-2010)
Please run e4fsck on the filesystem.
※ 옵션설명
- extents (확장) : 비트맵 매핑 범위를 사용하는 파일시스템 사용가능
- uninit_bg : 디스크의 사용부분을 확인하여 파일시스템 검사시간 줄임
Allow the kernel to initialize bitmaps and inode tables and keep a high watermark for the unused inodes in a filesystem, to reduce e2fsck(8) time. This first e2fsck run after enabling this feature will take the full time, but subsequent e2fsck runs will take only a fraction of the original time, depending on how full the file system is. After setting or clearing
- dir_index : 큰디렉토리에 빠른 엑세서를 위해 b-trees 해쉬를 사용
Use hashed b-trees to speed up lookups in large directories.
파일시스템 검사
# e4fsck -fDC0 /dev/sdb1
e4fsck 1.41.12 (17-May-2010)
One or more block group descriptor checksums are invalid. Fix<y>? yes
Group descriptor 0 checksum is invalid. FIXED.
Group descriptor 1 checksum is invalid. FIXED.
Group descriptor 2 checksum is invalid. FIXED.
Group descriptor 3 checksum is invalid. FIXED.
Group descriptor 4 checksum is invalid. FIXED.
Group descriptor 5 checksum is invalid. FIXED.
............
............
Pass 1: Checking inodes, blocks, and sizes
STORAGE_DISK : |== - 5.1%
Error reading block 13762897 (Attempt to read block from filesystem resulted in short read) while getting next inode from scan. Ignore error<y>? yes
Force rewrite<y>? yes
Error reading block 19726652 (Attempt to read block from filesystem resulted in short read) while getting next inode from scan. Ignore error<y>? yes
Force rewrite<y>? yes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 3A: Optimizing directories
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/STORAGE_DISK: ***** FILE SYSTEM WAS MODIFIED *****
/STORAGE_DISK: 26/31260672 files (0.0% non-contiguous), 14444953/31258465 blocks
※ -a Mount all filesystems (of the given types) mentioned in fstab.