게시물 1,376건
   
ext3 --> ext4 파일시스템 변환
글쓴이 : 최고관리자 날짜 : 2014-10-06 (월) 11:31 조회 : 13557
글주소 :
                                
※ 파일시스템에 따른 성능향상 관련 자료
ext4 파일시스템이  ext3 파일시스템과 비교해 읽기와 쓰기 속도 모두 개선



ext2 / ext3 / ext4 파일시스템뱔 특징 참고 


데이타 Read / Write 속도 개선에 따른 스토리지 디바이스쪽 파일시스템 변환

# 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

 ※ 옵션설명 
- f      Force checking even if the file system seems clean.
- D     Optimize  directories  in  filesystem
- C     파일시스템 검사 모니터링
- 0      No errors


# /etc/fstab 수정
LABEL=/STORAGE_DISK      /STORAGE_DISK            ext4    defaults,noatime,nodev,nosuid        1 2

# mount -a
 ※  -a     Mount all filesystems (of the given types) mentioned in fstab.

# mount 
...............
...............
/dev/sdb1 on /STORAGE_DISK type ext4 (rw,nosuid,nodev,noatime)


이름 패스워드
비밀글 (체크하면 글쓴이만 내용을 확인할 수 있습니다.)
왼쪽의 글자를 입력하세요.
   

 



 
사이트명 : 모지리네 | 대표 : 이경현 | 개인커뮤니티 : 랭키닷컴 운영체제(OS) | 경기도 성남시 분당구 | 전자우편 : mojily골뱅이chonnom.com Copyright ⓒ www.chonnom.com www.kyunghyun.net www.mojily.net. All rights reserved.