Menu

#53 Unclean shutdown renders ext2 filesystems unusable

v0.64
closed
5
2012-10-28
2006-03-10
Quietlife2k
No

Procedure to re-create the error : have a mounted ext2
filesystem - copy data to it (I was using samba).
While the data is flowing - pull the power.

Tried to run fsck from the exec.php page to clean the
file system, the best I get is :

fsck: exec fsck_ext2 for /dev/ad2 in /sbin:/usr/sbin:
No such file or directory

NOTE : The UFS volumes seem to recover fine.

Discussion

  • David

    David - 2006-03-11

    Logged In: YES
    user_id=1466787

    I am not sure but I think you want to run e2fsck rather than
    fsck.
    If you can't get the included e2fsck to work from within
    freenas, I had great success bailing my freenas out of this
    very same jam by running a liveCD distro (damn small linux)
    and running e2fsck from it. (That was before he included
    e2fsck in freenas.)
    I do recall that I needed some command line switches to make
    it work properly. Look around the web for examples, assuming
    you are as new to this as I was.
    And yes, I saw no problems with UFS drive.

     
  • Olivier Cochard-Labbe

    Logged In: YES
    user_id=1370551

    1. fsck_ext2 is not included, I use e2fsck in place
    2. using /dev/ad2 device is not enough because 'ad2' is the
      whole physical disk.
      Try to use:
      /dev/ad2s1 (for partition 1) in the place
    3. Can you try this command from the exec.php page:
      /usr/local/sbin/e2fsck -f -p -y /dev/ad2s1

    and send me the result ?

     
  • Quietlife2k

    Quietlife2k - 2006-03-15

    Logged In: YES
    user_id=1472664

    Sorry I had already gone the live cd route and fixed it
    (needed the data).

    The point was not the fact that ext2 died, it was that ufs
    survived or was automagically fixed.

    Can ext2 filesystems be "automagically" fixed ?

     
  • Olivier Cochard-Labbe

    Logged In: YES
    user_id=1370551

    The FreeNAS process is:
    1. try to mount the disk
    2. If error (can't mount it), launch a fsck

     
  • Quietlife2k

    Quietlife2k - 2006-03-16

    Logged In: YES
    user_id=1472664

    Sorry for my incorrect identification of the error.

    In that case this is an error report to say that it can't be
    running the fsck properly on ext2 filesystems (as they
    continue to refuse to mount after several re-boots).

    Running fsck from a livecd fixed the errors and allowed the
    ext2 filesystems to be mounted (this was before you told me
    about e2fsck).

    (I'm not a bsd/php programmer so sorry for any idiot speak
    no harm intended)
    Are you by any chance running the same fsck routine against
    each filesystem to be mounted? If so could it be that the
    fsck you are using in the "startup" looks for fsck_ext2 when
    trying to fix an ext2 filesystem rather than the e2fsck you
    are using ?

    Thus failing to repair the ext2 filesystem ?

    Could e2fsck be sym linked to fsck_ext2 ? (If they are
    parameter compatible ?)

     
  • Olivier Cochard-Labbe

    Logged In: YES
    user_id=1370551
    Originator: NO

    Fixed in 0.68

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.