Re: e2fsck: HOWTO tutorial



On Tue, Jun 22, 2010 at 1:33 PM, Augustin <beginner2005@xxxxxxxxxxxxxx> wrote:

Hello,

I must learn to use e2fsck as I am having some I/O problems on some of
my external drives.
I checked all the existing documentation everywhere I could think of
(including the Debian official documentation and existing HOWTOs from
TLDP), but couldn't find anything that is detailed and explicit enough
for my taste.

I am left with some questions that I hope some of you will be able to
answer.

1st, is there a way to run e2fsck in a strictly non-destructive but
informative way, to check the health of a drive?
(question asked here: http://linux.overshoot.tv/ticket/112 ).

-c
This option causes e2fsck to use badblocks(8) program to do a
read-only scan of the device in order to find any bad blocks. If any
bad blocks are found, they are added to the bad block inode to
prevent them from being allocated to a file or directory. If this
option is specified twice, then the bad block scan will be done using
a non-destructive read-write test.

is this what you want?

combine it with "-n" and check the exit code to see if errors are found.

2nd, to the dreaded question:

# e2fsck -vfFC0 /dev/sdc1
e2fsck 1.41.9 (22-Aug-2009)
Pass 1: Checking inodes, blocks, and sizes
Error reading block 34308186 (Attempt to read block from filesystem
resulted in short read) while getting next inode from scan.  Ignore
error?

What are the consequences of answering either way?
As far as I can tell: answering yes will delete the inode, i.e. data
will be lost. Answering no will leave the bad block in place and the
problem will remain.


I have more questions on the topic but this should be a start.


All your answers will be used to compile hopefully the best available
tutorial on this important topic for a Linux system administrator.
This is barely more than a stub:
http://linux.overshoot.tv/wiki/hardware/e2fsck_file_system_check

Thanks for your help,

Augustin.


Tao
--
http://huangtao.me/
http://www.google.com/profiles/UniIsland


--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx
with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx
Archive: http://lists.debian.org/AANLkTikJJZ2GXtmqhO1KbJra9onOCarSRmuygSuywo31@xxxxxxxxxxxxxx



Relevant Pages

  • e2fsck: HOWTO tutorial
    ... I must learn to use e2fsck as I am having some I/O problems on some of ... my external drives. ... (including the Debian official documentation and existing HOWTOs from ...
    (Debian-User)
  • Re: [opensuse] ext3 about to die? I hope not...
    ... My original question was about finding a bad inode, ... the kernel to list a zillion messages to /var/log/messages. ... that I run e2fsck on the file system. ... Instead, run fsck. ...
    (SuSE)
  • Re: Squeeze Gnome Preferences >> Removable Drives and Media
    ... I started a run of e2fsck on one of my USB drives and got the following: ... Error reading block 119439482 while getting next inode from scan. ... I suppose that the unreadable inode might be one that is not in use. ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)
  • Re: [opensuse] ext3 about to die? I hope not...
    ... My original question was about finding a bad inode, ... the kernel to list a zillion messages to /var/log/messages. ... that I run e2fsck on the file system. ... Instead, run fsck. ...
    (SuSE)
  • Re: [patch 5/5] Disallow in-inode attributes for reserved inodes
    ... "fixed" optional data, ... i_extra_isize on that inode is large enough for that data to actually ... e2fsck with ea-in-inode support there isn't anything they can do to fix ... initialize the fixed fields) we can do the equivalent of what e2fsck will ...
    (Linux-Kernel)