tune2fs -i0 -c0 -r30960 -O dir_index /dev/hda?



-> root를 위한 예약 공간을 약 260mb 정도 할당


    순수 사용자 data만 들어갈 경우 -r20480 밑으로 해도 되며, root을 위한 예약공간을 전혀 안두려면


    -r30960 대신 -m0 으로 대치(파일시스템 형성시 기본은 5% 임)

Linux df command output shows that the sum of total used disk space and total available free disk space is not equal to or tally with total size of file system or partition.



Linux df command output - The sum of Used column and Avail column is not tally with or equal to Size column.


File system Reserved Block Count is supposed to reduce Linux file system defragmentation, to allow root user login for maintenance or to allow Linux system logging facility to function properly in case file system running low of free disk space.


How to reduce Linux ext2 /ext3 file system Reserved Block Count?


File system utility tune2fs can be used to tune Linux ext2 / ext3 file system parameters, such as adjusting file system reserved block count, frequency of file system force-check based, maximal time between two file system checks, behavior of the kernel code when errors are detected, overriding the default ext3 journal parameters, etc.


tune2fs -l /dev/hda
      or
dumpe2fs -h /dev/vg0/lvol1


 


could be used to inspect a file system superblock information. Take note on these fields of both tune2fs and dumpe2fs command output:


Reserved block count: 3399024
Free blocks: 4997248
Free inodes: 42473835
First block: 0
Block size: 4096


The block size is measured in byte unit. In this case, it’s 4,096 byte or 4KB. So, the Reserved Block Count: 3399024 is equal to 13,922,402,304 byte or roughly equivalent to 14GB.



Now, if execute the command


 


tune2fs -m 0 /dev/vg0/lvol1


will set the percentage of file system reserved block count to 0% for /dev/vg0/lvol1 file system (the first column of df command output).


It’s OK to totally disable file system reserved block count, if the file system is not used by root user account or storing system log and system/program temp files (e.g. /var and /tmp).  For example, file system dedicated to host database table files, Samba shares, movie or music files, etc, are safe to disable file system reserved block count.


So, if you’re running a Linux machine with 320GB SATA hard disk that storing tones of movie and mp3 files, and haven’t tune the file system reserved block count, you may tune it now to claim back as much as 16GB of free disk space!



출처 : http://www.walkernews.net/2007/02/28/tune2fs-increase-linux-free-disk-space/

tune2fs를 활용한 ext3 파일시스템 최적화

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다