e2fsck로 손상된 파일시스템 자동복구하기
작성자 정보
- 관리자 작성
- 작성일
컨텐츠 정보
- 2,295 조회
- 0 추천
- 목록
본문
e2fsck로 손상된 파일시스템 자동복구하기
실제로 오류가 있는 파일시스템을 e2fsck로 파일시스템을 점검하고 복구하려고 하면 여러 가지 질문에 yes 도는 no라는 답을 해야 합니다.
때로는 실제로 복구하는 과정에서 동일한 질문들이 수백 수천 번, 수없이 발생하는 경우도 흔하게 있습니다.
다음 예를 보십시요.
[root@su249 /]# e2fsck -b 98304 /dev/hdc2 dumpe2fs 1.41.3 (12-Oct-2008) Superblock has an invalid ext3 journal (inode 8). Clear<y>? yes
*** ext3 journal has been deleted - filesystem is now ext2 only ***
/backup was not cleanly unmounted, check forced. Pass 1: Checking inodes, blocks, and sizes Special (device/socket/fifo) inode 2154683 has non-zero size. Fix<y>? yes ySpecial (device/socket/fifo) inode 2170688 has non-zero size. Fix<y>? yes Special (device/socket/fifo) inode 2170723 has non-zero size. Fix<y>? yes Special (device/socket/fifo) inode 2170846 has non-zero size. Fix<y>? yes Special (device/socket/fifo) inode 2171154 has non-zero size. Fix<y>? yes Special (device/socket/fifo) inode 2171178 has non-zero size. Fix<y>? … 이하생략 |
위의 예와 같이 수없이 반복되는 yes 또는 no라는 답을 해주어야 합니다.
실제로 필자는 이 yes라는 답을 3시간 동안 꼬박 했던 적도 있습니다.
이제 이런 질문에 우리는 -y옵션이나 -p옵션을 사용하는 지혜가 필요할 것입니다.
먼저, -p옵션에 대한 설명입니다.
즉, -p옵션을 지정하면 이런 질문자체를 하지 않고 e2fsck프로그램이 모든 것을 알아서 자동복구(Automatically repair)를 하게 됩니다.
다음 예를 보십시요.
[root@su249 /]# e2fsck -b 98304 -p /dev/hdc2 /backup: Superblock has an invalid ext3 journal (inode 8). CLEARED. *** ext3 journal has been deleted - filesystem is now ext2 only ***
/backup was not cleanly unmounted, check forced. /backup: Special (device/socket/fifo) inode 2171178 has non-zero size. FIXED. /backup: Special (device/socket/fifo) inode 2171218 has non-zero size. FIXED. /backup: Special (device/socket/fifo) inode 2171442 has non-zero size. FIXED. /backup: Special (device/socket/fifo) inode 2171603 has non-zero size. FIXED. /backup: Special (device/socket/fifo) inode 2171878 has non-zero size. FIXED. /backup: Special (device/socket/fifo) inode 2172037 has non-zero size. FIXED. /backup: Special (device/socket/fifo) inode 2172186 has non-zero size. FIXED. |
위의 예를 보면 -p옵션을 사용하였기 때문에 “자동복구모드(Automatically repair)”로 진행한 예입니다.
모든 질문에 e2fsck프로그램이 알아서 자동응답을 하고 진행을 하게 됩니다.
관련자료
-
이전
-
다음