Find the answer to your Linux question:
Results 1 to 9 of 9
Hi Im new to linux so please be nice I have run e2fsck -v -n -f /dev/sdd1 and I get a lot of info on the screen, such as Problem ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jul 2011
    Posts
    5

    When to run e2fsck


    Hi

    Im new to linux so please be nice


    I have run e2fsck -v -n -f /dev/sdd1
    and I get a lot of info on the screen, such as
    Problem in HTREE directory inode X; block #x has bad min hash

    At the end I get something that looks like a report:

    X inodes used (0.39%)
    X non-contiguos files (30.2%)
    and so on....

    This is an external hard drive (formatted ext4, I think) which is a backup drive for my Synology NAS.
    I have now connected this to my windows computer and Im running Knoppix.

    Q: When I run e2fsck -v -n -f and see the result, what should I look for that would trigger me to run e2fsck -v -f -y ?
    Q: Is it ok to do it my way, using Knoppix etc?

    Br,

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,539
    The -v argument is for verbose output, hence all the stuff about inodes, non-continguous files, etc. Usually, running fsck without arguments is best since you will only see error conditions (usually).
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Just Joined!
    Join Date
    Jul 2011
    Posts
    5
    Ok, thank you. But what about my questions?

  4. #4
    Administrator jayd512's Avatar
    Join Date
    Feb 2008
    Location
    Kentucky
    Posts
    5,023
    Hello.

    Q1. I would say that if you see a bunch of errors in the output of e2fsck -v -n -f, that would be a good time to run e2fsck -v -f -y
    Q2. Any LiveCD will do nicely. That way, you can run your filesystem check while nothing is mounted.
    Jay

    New users, read this first.
    New Member FAQ
    Registered Linux User #463940
    I do not respond to private messages asking for Linux help. Please keep it on the public boards.

  5. #5
    Just Joined!
    Join Date
    Jul 2011
    Posts
    5
    Ok, jayd

    Thank you for your response.
    First time I ran e2fsck.... It said something about
    "warning: mounted".

    So I guess I should right click on the drive in the File manager and choose Unmount?

    Thanks again

    Edit: Oh, by the way. Rubberman says that I can ignore -v when I run this. Should I just run "e2fsck" without -v -f -y ?

  6. #6
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,539
    The -y option is basically a "answer 'yes' to all yes/no questions".
    The -f option forces checking of the file system, even if it is flagged as "clean".

    You need to boot with a CD/DVD/USB live/recovery device so that the root file system will not be mounted in order to run fsck. Alternatively, you might be able to remount the / file system as read-only, but I generally don't recommend that for recovery purposes.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  7. #7
    Just Joined!
    Join Date
    Jul 2011
    Posts
    5
    Hi

    "You need to boot with a CD/DVD/USB live/recovery device so that the root file system will not be mounted in order to run fsck"
    I do run a Knoppix cd. But in File Manager I select the hard drive and right click -> Unmount. That doesnt look like your description.

    "Alternatively, you might be able to remount the / file system as read-only"
    I donīt understand this one =)

    What I did (before reading your post):
    1. Right click -> Unmount (As desribed above)
    2. e2fsck -v -n -f (And wrote down some of the errors)
    3. e2fsck -v -f -y
    4. e2fsck -v -n -f (All errors gone now)
    5. Mount

    Everything seems ok.

    Thanks

  8. #8
    Administrator jayd512's Avatar
    Join Date
    Feb 2008
    Location
    Kentucky
    Posts
    5,023
    Hi Smurf.
    I do run a Knoppix cd. But in File Manager I select the hard drive and right click -> Unmount. That doesnt look like your description.
    That's Knoppix for you
    It auto mounts all drives when it starts up. So you're doing it right.
    Jay

    New users, read this first.
    New Member FAQ
    Registered Linux User #463940
    I do not respond to private messages asking for Linux help. Please keep it on the public boards.

  9. #9
    Just Joined!
    Join Date
    Jul 2011
    Posts
    5
    Ok, sounds great. I saw that a folder lost+found was created.
    I tried to see what it contains but I got permission denied. But if I look at it using the file browser in my synologys web interface, the folder is empty.
    So I think we are good now.

    Thank you for helping med out. Im a little bit wiser now =)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •