CentOS4.4에서 포맷한 디스크가 FC2(FedoraCore2)에서 fsck.ext3가 안되는 경우가 발생한다.


아래와 같은 메세지와 함께 진행이 안된다.



[root@test-local root]# fsck.ext3 /dev/sda1
e2fsck 1.35 (28-Feb-2004)
fsck.ext3: Filesystem has unsupported feature(s) (/dev/sda1)
e2fsck: Get a newer version of e2fsck!



이유는 e2fsprogs 버젼이 달라서 파일시스템 생성시 파라미터 값이 다르고 낮은 버젼에서 지원을 못해서 그렇다.


FC2 : e2fsprogs-1.35-7.1


CentOS4.4 : e2fsprogs-1.35-12.4.EL4


 


tune2fs -l /dev/sda1으로 보면 아래와 같다.


FC2 : Filesystem features:      has_journal dir_index filetype needs_recovery sparse_super


CentOS4.4 : Filesystem features:      has_journal ext_attr resize_inode dir_index filetype sparse_super large_file    (ext_attr 파라미터는 OS 설치시 포맷에선 옵션이 들어가나 mkfs.ext3 으로 포맷시엔 옵션이 안 들어감)



문제는 아래 파라미터를 FC2에 깔린 e2fsprogs-1.35-7.1에서 지원을 못해서 fsck로 파일시스템 체크를 진행 불가.


그러므로 시스템이 비정상적으로 종료됐을때 부팅시 파일시스템체크를 못해 복구모드로 부팅이 되어버림.


해결방법은 3가지가 있다.



첫번째. FC2서버상에서 데이터를 백업받고 mkfs.ext3로 다시 포맷한다.(무식하지만 데이터가 적을땐 가장 편한방법)


두번째. CentOS4.4 시스템으로 HDD를 옮긴 후 tune2fs로 2가지 파라미터를 뺀다.(umount 상태에서)


           빼기 : debugfs -w /dev/sda1 -R "features ^resize_inode"


           추가 : debugfs -w /dev/sda1 -R "features resize_inode" –> ^ 에 따라 빼기 또는 추가


세번째. resize_inode  –>> 이 파라미터를 FC2 서버에서 아래 원문(답변)과 같이 해결을 한다.(umount 상태에서)


           먼저 resize_inode 파라미터가 지원되는 FC2에 맞는 e2fsprogs를 설치하고, 리부팅한다.


           debugfs -w /dev/sda1 -R "features ^resize_inode"


           debugfs -w /dev/sda1 -R "features ^resize_inode ^ext_attr"  –> 두가지 파라미터를 뺄때



아래 글엔 ext_attr 도 문제가 된다고 나와 있지만 ext_attr 파라미터는 FC2의 e2fsprogs에서 지원이 되는 파라미터라고 하지만 확인한 바는 아니니 만약 resize_inode 파라미터를 제거해도 문제가 해결이 안되면 ext_attr도 제거해 볼 것.



* 아래 원문 참조.



질문 :::


From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3)
Gecko/20041020

Description of problem:
Can't use ghost on FC3 partition.

I know bug #138866 and bug #138419 but it's not a partition table
problem. Seems to be a problem with new ext3 features (online resize).

Ghost crash when i try to "logical" dump a FC3 partition (ok with
"physical" dump).

1st test
– booting from FC2 CD in rescue mode
– saving the partition (tar cf …)
– mke2fs -j -L /boot /dev/hda2
– restoring the partition (tar xf …)
– ghost works well

2nd test
– booting from FC3 CD in rescue mode
– mke2fs -j -L /boot /dev/hda2
– restoring the partition
– ghost crash

3rd test
– booting from FC3 CD in rescue mode
– mke2fs -j -L /boot -O ^resize_inode /dev/hda2
– restoring the partition
– ghost crash

Ok, it's probably a "ghost" problem (and symantec says "fedora" is not
supported) but i'm searching for a "simple" workaround (at install time)

Cordialy

Version-Release number of selected component (if applicable):
e2fsprogs-1.35-11.2

How reproducible:
Always

Steps to Reproduce:
1. install FC3
2. try to ghost a partition
3.
   

Actual Results:  ghost crash

Expected Results:  success

Additional info: 

답변 :::


Here's the procedure to remove resize_inode and ext_attr features
from filesystems on an FC3 installation. Everything must be done from
the root account.

Step 1

If you installed FC3 with SELinux enabled, which is the default, it
you must disabled. Log on the system and edit /etc/selinux/config.
Replace SELINUX=enforced by SELINUX=disabled. If you don't disable
SELinux, the ext_attr will be set again on the root filesystem the
next time you boot and every file created or modified will have its
extended ACL entries set.

Step 2

Download e2fsprogs-1.36-rc5 from SourceForge. Click on the following
link:

    http://sourceforge.net/projects/e2fsprogs

Step 3

Untar, compile and install the new utilities:

   tar -zxf e2fsprogs-1.36-rc5.tar.gz
   cd e2fsprogs-1.36-rc5
   ./configure
   make
   make install

Step 4

Reboot the system in single-user mode:

   type reboot

   at the GRUB splash screen, press enter then press the 'a' and
   add the word single at the end of the command line (there's a space
   between quiet and single)

Step 5

Unmount all filesystems, including /, and remove both resize_inode
and ext_attr features. Run the following commands on all filesystems:

   debugfs -w /dev/XXXX -R "features ^resize_inode ^ext_attr"
   e2fsck -y -f /dev/XXXX

Example:

   /dev/sda1 is mounted on /boot
   /dev/sda2 is mounted on /
   /dev/sda5 is mounted on /home

   umount /boot
   umount /
   umount /home

   debugfs -w /dev/sda1 -R "features ^resize_inode ^ext_attr"
   debugfs -w /dev/sda2 -R "features ^resize_inode ^ext_attr"
   debugfs -w /dev/sda5 -R "features ^resize_inode ^ext_attr"

   e2fsck -y -f /dev/sda1
   e2fsck -y -f /dev/sda2
   e2fsck -y -f /dev/sda5

Running e2fsck on the root filesystem takes a while.

Step 6

Reboot the system.

During shutdown, you will get error messages telling you that the
root filesystem cannot be written. That's normal because the root
filesystem is still mounted read-only. It must remain mounted read-
only during shutdown.

During boot, you will get a message telling you that the system was
not properly shutdown and ask you if you want to verify the
filesystem integrity. You can skip this step. It didn't find anything
wrong on my system.

Your system is now ready to be Ghosted.

파일시스템 체크 fsck.ext3 가 안될 때

댓글 남기기

이메일은 공개되지 않습니다. 필수 입력창은 * 로 표시되어 있습니다