From: Ron Johnson on
On 06/22/2010 12:33 AM, Augustin 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 ).
>

The *drive*? No. e2fsck checks the filesystem data structures that
have been written onto the drive.

You need SMART to check the drive.

>
> 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?

I don't know. First question, though, is: are you doing this on a
mounted filesystem? If so, You're Doing It Wrong.

Boot from a Live CD (I like Sidux) and run the e2fsck that comes on
the CD. The errors might just go away...

> 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.
>

--
Seek truth from facts.


--
To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
Archive: http://lists.debian.org/4C206594.7080401(a)cox.net
From: Ron Johnson on
On 06/22/2010 03:17 AM, Augustin wrote:
> On Tuesday 22 June 2010 15:26:12 Ron Johnson wrote:
>> The *drive*? No. e2fsck checks the filesystem data structures
>> that have been written onto the drive.
>
> Yes, sorry. I did mean the partition, not the drive.
>
>> You need SMART to check the drive.
>
> Yes, I haven't had time to install smartmontools, but I'll do it as
> soon as I've fully understood and documented how to use e2fsck.
>

Hah!

>
>> I don't know. First question, though, is: are you doing this on a
>> mounted filesystem? If so, You're Doing It Wrong.
>
> No, it's unmounted. I'm checking an external device.
> As to checking mounted devices, the man page is very confusing:
> See: http://linux.overshoot.tv/ticket/112
>

Yeah, I read that, but I think you're over-analyzing. Just never
fsck a mounted fs.

>> Boot from a Live CD (I like Sidux) and run the e2fsck that comes on
>> the CD. The errors might just go away...
>
> no :-/
>

Hmmm, that doesn't sound good. Have you googled? Was the fs
cleanly unmounted?

--
Seek truth from facts.


--
To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
Archive: http://lists.debian.org/4C207676.6090702(a)cox.net
From: Jochen Schulz on
Augustin:
> On Tuesday 22 June 2010 15:26:12 Ron Johnson wrote:
>> The *drive*? No. e2fsck checks the filesystem data structures
>> that have been written onto the drive.
>
> Yes, sorry. I did mean the partition, not the drive.

No, you didn't mean the partition, you meant the filesystem. ;-) The
usage of these terms is usually very lax, but after you realize that you
can create filesystems not only on partitions, but in other files, raw
storage devices (/dev/sdX) or logical volumes, the terms become quite
distinctive.

> No, it's unmounted. I'm checking an external device.
> As to checking mounted devices, the man page is very confusing:
> See: http://linux.overshoot.tv/ticket/112

I don't agree. It says:

- Don't fsck mounted filesystems.
- When run with -n, the fsck is read-only.
- Don't run fsck -n on mounted filesystems.

Maybe the paragraphs could be restructured a little, but I think all
these points come acrosse quite clearly.

BTW, what's the purpose of that site? Why are these bugs not reported
upstream? It looks like you are the sole user of that site.

> Is there a way to run e2fsck in a strictly non-desctructive,
> informative mode only?

From the manpage:

-n Open the filesystem read-only, and assume an answer of `no' to
all questions. Allows e2fsck to be used non-interactively.
This option may not be specified at the same time as the -p or
-y options.

What's unclear about it?

J.
--
Nothing is as I planned it.
[Agree] [Disagree]
<http://www.slowlydownward.com/NODATA/data_enter2.html>
From: Huang, Tao on
On Tue, Jun 22, 2010 at 1:33 PM, Augustin <beginner2005(a)masquilier.org> 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(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
Archive: http://lists.debian.org/AANLkTikJJZ2GXtmqhO1KbJra9onOCarSRmuygSuywo31(a)mail.gmail.com
From: Mark Allums on
On 6/22/2010 3:47 AM, Jochen Schulz wrote:
>
> What's unclear about it?


The manpage doesn't say: Okay, when this happens, run this. When that
happens, run that. (That's what he wants. And, I admit, what I want,
sometimes.)




--
To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
Archive: http://lists.debian.org/4C207BCD.5020808(a)allums.com