* [gentoo-user] How do I show list of bad blocks on a disk?
@ 2011-03-06 17:07 Nikos Chantziaras
2011-03-06 17:25 ` Alex Schuster
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Nikos Chantziaras @ 2011-03-06 17:07 UTC (permalink / raw
To: gentoo-user
Before leaving home, I started an fsck.ext4 on a filesystem (500GB) that
resides on a disk that I suspect is damaged:
fsck.ext4 -c -c -f /dev/sdb1
When I came back 10 hours later, it was still checking. After 2 hours
more (so it took 12 hours total) it finally finished. The output was:
e2fsck 1.41.14 (22-Dec-2010)
Checking for bad blocks (non-destructive read-write test)
Testing with random pattern: done
Extra: Updating bad block inode.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
Extra: ***** FILE SYSTEM WAS MODIFIED *****
Extra: 11/30531584 files (0.0% non-contiguous),
1966902/122096638 blocks
I'm not sure how to read this. Were there any bad blocks or not? Is
there a way to query the filesystem for the now known bad blocks? (The
"Updating bad block inode." message suggests that such a list is stored
directly inside the filesystem.)
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-user] How do I show list of bad blocks on a disk?
2011-03-06 17:07 [gentoo-user] How do I show list of bad blocks on a disk? Nikos Chantziaras
@ 2011-03-06 17:25 ` Alex Schuster
2011-03-06 17:51 ` [gentoo-user] " Nikos Chantziaras
2011-03-06 18:14 ` [gentoo-user] " Florian Philipp
` (2 subsequent siblings)
3 siblings, 1 reply; 8+ messages in thread
From: Alex Schuster @ 2011-03-06 17:25 UTC (permalink / raw
To: gentoo-user
Nikos Chantziaras writes:
> Before leaving home, I started an fsck.ext4 on a filesystem (500GB) that
> resides on a disk that I suspect is damaged:
>
> fsck.ext4 -c -c -f /dev/sdb1
>
> When I came back 10 hours later, it was still checking. After 2 hours
> more (so it took 12 hours total) it finally finished. The output was
Anything about erros in dmesg or syslog?
> e2fsck 1.41.14 (22-Dec-2010)
> Checking for bad blocks (non-destructive read-write test)
> Testing with random pattern: done
> Extra: Updating bad block inode.
> Pass 1: Checking inodes, blocks, and sizes
> Pass 2: Checking directory structure
> Pass 3: Checking directory connectivity
> Pass 4: Checking reference counts
> Pass 5: Checking group summary information
>
> Extra: ***** FILE SYSTEM WAS MODIFIED *****
> Extra: 11/30531584 files (0.0% non-contiguous),
> 1966902/122096638 blocks
>
> I'm not sure how to read this. Were there any bad blocks or not? Is
> there a way to query the filesystem for the now known bad blocks? (The
> "Updating bad block inode." message suggests that such a list is stored
> directly inside the filesystem.)
dumpe2fs -b /dev/sdb1 probably also works for ext4.
bablocks /dev/sdb2 will do a read-only check of the whole partiton for
bad blocks. Use option -n for a non-destructive write mode.
I qalso like to add options -s and -v to see the progress. I redirect
the output into a file then, because output of progress and bad blocks
will overlap: badblocks -sv /dev/sdb1 > sdb1.bad
See man badblocks for more information.
Wonko
^ permalink raw reply [flat|nested] 8+ messages in thread
* [gentoo-user] Re: How do I show list of bad blocks on a disk?
2011-03-06 17:25 ` Alex Schuster
@ 2011-03-06 17:51 ` Nikos Chantziaras
0 siblings, 0 replies; 8+ messages in thread
From: Nikos Chantziaras @ 2011-03-06 17:51 UTC (permalink / raw
To: gentoo-user
On 03/06/2011 07:25 PM, Alex Schuster wrote:
> Nikos Chantziaras writes:
>
>> Before leaving home, I started an fsck.ext4 on a filesystem (500GB) that
>> resides on a disk that I suspect is damaged:
>>
>> fsck.ext4 -c -c -f /dev/sdb1
>>
>> When I came back 10 hours later, it was still checking. After 2 hours
>> more (so it took 12 hours total) it finally finished. The output was
>
> Anything about erros in dmesg or syslog?
Nope. All clean.
>> [...]
>> Were there any bad blocks or not? Is
>> there a way to query the filesystem for the now known bad blocks? (The
>> "Updating bad block inode." message suggests that such a list is stored
>> directly inside the filesystem.)
>
> dumpe2fs -b /dev/sdb1 probably also works for ext4.
Thanks. I just tried and it prints nothing. I guess that means no bad
blocks were found.
(Rant: Don't you just love programs that instead of explicitly telling
you that all is OK, they just stay silent, leaving you wondering whether
they actually work at all? Argh...)
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-user] How do I show list of bad blocks on a disk?
2011-03-06 17:07 [gentoo-user] How do I show list of bad blocks on a disk? Nikos Chantziaras
2011-03-06 17:25 ` Alex Schuster
@ 2011-03-06 18:14 ` Florian Philipp
2011-03-06 18:44 ` [gentoo-user] " Francesco Talamona
2011-03-07 2:39 ` james
2011-03-07 6:25 ` [gentoo-user] " Thanasis
3 siblings, 1 reply; 8+ messages in thread
From: Florian Philipp @ 2011-03-06 18:14 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1322 bytes --]
Am 06.03.2011 18:07, schrieb Nikos Chantziaras:
> Before leaving home, I started an fsck.ext4 on a filesystem (500GB) that
> resides on a disk that I suspect is damaged:
>
> fsck.ext4 -c -c -f /dev/sdb1
>
> When I came back 10 hours later, it was still checking. After 2 hours
> more (so it took 12 hours total) it finally finished. The output was:
>
> e2fsck 1.41.14 (22-Dec-2010)
> Checking for bad blocks (non-destructive read-write test)
> Testing with random pattern: done
> Extra: Updating bad block inode.
> Pass 1: Checking inodes, blocks, and sizes
> Pass 2: Checking directory structure
> Pass 3: Checking directory connectivity
> Pass 4: Checking reference counts
> Pass 5: Checking group summary information
>
> Extra: ***** FILE SYSTEM WAS MODIFIED *****
> Extra: 11/30531584 files (0.0% non-contiguous),
> 1966902/122096638 blocks
>
> I'm not sure how to read this. Were there any bad blocks or not? Is
> there a way to query the filesystem for the now known bad blocks? (The
> "Updating bad block inode." message suggests that such a list is stored
> directly inside the filesystem.)
>
>
When there is nothing else reported, there was no error. "FILE SYSTEM
WAS MODIFIED" usually just means that a directory "lost+found" was created.
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* [gentoo-user] Re: How do I show list of bad blocks on a disk?
2011-03-06 18:14 ` [gentoo-user] " Florian Philipp
@ 2011-03-06 18:44 ` Francesco Talamona
0 siblings, 0 replies; 8+ messages in thread
From: Francesco Talamona @ 2011-03-06 18:44 UTC (permalink / raw
To: gentoo-user
On Sunday 06 March 2011, Florian Philipp wrote:
> Am 06.03.2011 18:07, schrieb Nikos Chantziaras:
> > Before leaving home, I started an fsck.ext4 on a filesystem (500GB)
> > that
> >
> > resides on a disk that I suspect is damaged:
> > fsck.ext4 -c -c -f /dev/sdb1
> >
> > When I came back 10 hours later, it was still checking. After 2
> > hours
> >
> > more (so it took 12 hours total) it finally finished. The output was:
> > e2fsck 1.41.14 (22-Dec-2010)
> > Checking for bad blocks (non-destructive read-write test)
> > Testing with random pattern: done
> > Extra: Updating bad block inode.
> > Pass 1: Checking inodes, blocks, and sizes
> > Pass 2: Checking directory structure
> > Pass 3: Checking directory connectivity
> > Pass 4: Checking reference counts
> > Pass 5: Checking group summary information
> >
> > Extra: ***** FILE SYSTEM WAS MODIFIED *****
> > Extra: 11/30531584 files (0.0% non-contiguous),
> > 1966902/122096638 blocks
> >
> > I'm not sure how to read this. Were there any bad blocks or not?
> > Is there a way to query the filesystem for the now known bad
> > blocks? (The "Updating bad block inode." message suggests that
> > such a list is stored directly inside the filesystem.)
>
> When there is nothing else reported, there was no error. "FILE SYSTEM
> WAS MODIFIED" usually just means that a directory "lost+found" was
> created.
That would be interactive, and it would show up in the console output:
fsck from util-linux-ng 2.18
e2fsck 1.41.12 (17-May-2010)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
/lost+found not found. Create<y>? yes
Pass 3A: Optimizing directories
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/mapper/sda5: ***** FILE SYSTEM WAS MODIFIED *****
/dev/mapper/sda5: 177646/4481024 files (6.7% non-contiguous),
10916521/17920370 blocks
Anyway I don't worry about the fact that the filesystem was modified, as
long as the program doesn't ask for user intervention. As you can see in
my case there was a directory optimization.
Fsck took a very long time because of "-c" option (you are not taking
advantage of the fact that the disk is almost empty), and you specified
it twice, so "the bad block scan will be done using a non-destructive
read-write test." as stated in the man page, so in the end, nothing to
worry about WRT filesystem.
You should also check SMART status.
Bye
Francesco
--
Linux Version 2.6.37-gentoo-r1, Compiled #4 SMP PREEMPT Sat Mar 5
16:45:57 CET 2011
Two 2.8GHz AMD Athlon 64 Processors, 4GB RAM, 11255 Bogomips Total
aemaeth
^ permalink raw reply [flat|nested] 8+ messages in thread
* [gentoo-user] Re: How do I show list of bad blocks on a disk?
2011-03-06 17:07 [gentoo-user] How do I show list of bad blocks on a disk? Nikos Chantziaras
2011-03-06 17:25 ` Alex Schuster
2011-03-06 18:14 ` [gentoo-user] " Florian Philipp
@ 2011-03-07 2:39 ` james
2011-03-07 6:25 ` [gentoo-user] " Thanasis
3 siblings, 0 replies; 8+ messages in thread
From: james @ 2011-03-07 2:39 UTC (permalink / raw
To: gentoo-user
Nikos Chantziaras <realnc <at> arcor.de> writes:
> Before leaving home, I started an fsck.ext4 on a filesystem (500GB) that
> resides on a disk that I suspect is damaged:
smartmontools may be of interest to you....
http://smartmontools.sourceforge.net/badblockhowto.html
hth,
James
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-user] How do I show list of bad blocks on a disk?
2011-03-06 17:07 [gentoo-user] How do I show list of bad blocks on a disk? Nikos Chantziaras
` (2 preceding siblings ...)
2011-03-07 2:39 ` james
@ 2011-03-07 6:25 ` Thanasis
2011-03-07 6:45 ` Dale
3 siblings, 1 reply; 8+ messages in thread
From: Thanasis @ 2011-03-07 6:25 UTC (permalink / raw
To: gentoo-user; +Cc: Nikos Chantziaras
on 03/06/2011 07:07 PM Nikos Chantziaras wrote the following:
> Before leaving home, I started an fsck.ext4 on a filesystem (500GB)
> that resides on a disk that I suspect is damaged:
>
> fsck.ext4 -c -c -f /dev/sdb1
>
You can check the SMART (Self-Monitoring, Analysis, and Reporting
Technology) data, which is built-in in all hard drives today, and allows
you to see the status or overall “health” of a hard drive.
( smartctl -a /dev/sdb )
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gentoo-user] How do I show list of bad blocks on a disk?
2011-03-07 6:25 ` [gentoo-user] " Thanasis
@ 2011-03-07 6:45 ` Dale
0 siblings, 0 replies; 8+ messages in thread
From: Dale @ 2011-03-07 6:45 UTC (permalink / raw
To: gentoo-user
Thanasis wrote:
> on 03/06/2011 07:07 PM Nikos Chantziaras wrote the following:
>
>> Before leaving home, I started an fsck.ext4 on a filesystem (500GB)
>> that resides on a disk that I suspect is damaged:
>>
>> fsck.ext4 -c -c -f /dev/sdb1
>>
>>
> You can check the SMART (Self-Monitoring, Analysis, and Reporting
> Technology) data, which is built-in in all hard drives today, and allows
> you to see the status or overall “health” of a hard drive.
>
> ( smartctl -a /dev/sdb )
>
>
You can also tell it to run a selftest too. Example commands to look into:
smartctl -t long /dev/<your drive here>
and for the results, usually a good while later:
smartctl -l selftest /dev/<your drive here>
If you think heat may be a issue, try this:
smartctl -a /dev/<your drive here> | grep Temp
With all this, you should be able to find out if you are good to go or
got a drive going bad.
Dale
:-) :-)
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2011-03-07 6:46 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-06 17:07 [gentoo-user] How do I show list of bad blocks on a disk? Nikos Chantziaras
2011-03-06 17:25 ` Alex Schuster
2011-03-06 17:51 ` [gentoo-user] " Nikos Chantziaras
2011-03-06 18:14 ` [gentoo-user] " Florian Philipp
2011-03-06 18:44 ` [gentoo-user] " Francesco Talamona
2011-03-07 2:39 ` james
2011-03-07 6:25 ` [gentoo-user] " Thanasis
2011-03-07 6:45 ` Dale
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox