달력

032010  이전 다음

  •  
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  •  
  •  
  •  

베드블럭? 난 fsck로 피해간다...

[1] IT 관련/2. Linux 2009/01/11 21:54
크리에이티브 커먼즈 라이선스
Creative Commons License

요즘들어 점점 하드 디스크들이 베드섹터를 가지고 늘어나는 것 같습니다.
많은 분들이 에러에 대비하여 준비하고 있다고는 하지만, 아래와 같은 명령어로
피해 가시는 분들은 많이 계시지 않는듯 하여 글을 올립니다.

배드블럭 체크
[사용법] badblock -sv [filesystem]

[root@localhost root]# badblocks -sv /dev/sda2
Checking for bad blocks in read-only mode
From block 0 to 6144862
Checking for bad blocks (read-only test): 614486080/  6144862
6144861
done                        
Pass completed, 2 bad blocks found.

배드블럭 마크
[사용법]fsck.ext3 -cvf [filesystem] <-- ext3 filesystem의 경우
: 배드블럭에 내용이 추가되는 것을 방지한다.

[root@localhost root]# fsck.ext3 -cvf /dev/sda2
e2fsck 1.32 (09-Nov-2002)
/: recovering journal
Checking for bad blocks (read-only test): done                        
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information

/: ***** FILE SYSTEM WAS MODIFIED *****
/: ***** REBOOT LINUX *****

 86973 inodes used (11%)
   597 non-contiguous inodes (0.7%)
       # of inodes with ind/dind/tind blocks: 3786/32/0
 568599 blocks used (37%)
     0 bad blocks
     0 large files

 61329 regular files
   4213 directories
   2522 character device files
 15884 block device files
     14 fifos
   4160 links
   3000 symbolic links (3000 fast symbolic links)
     2 sockets
--------
 91124 files

만일 badblocks이 한 bad block이 이미 사용되었음을 알린다면, e2fsck는 그 블럭을 다른 곳에 옮기려고 시도한다. 만일 그 블럭이 불안정한 정도가 아니라 완전히 파괴되었다면, 파일의 내용도 파괴될 것이다.

[출처 : http://phpleader.net/bbs/view.php?&bbs_id=php_07&page=8&doc_num=60 ]
Posted by Huns [Jaehun]