From: Alex Schuster <wonko@wonkology.org>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] recovery from /var corruption?
Date: Fri, 26 Feb 2010 10:46:23 +0100 [thread overview]
Message-ID: <201002261046.24994.wonko@wonkology.org> (raw)
In-Reply-To: <5bdc1c8b1002251933s6a250b99v607c97e09f41d4fe@mail.gmail.com>
Mark Knecht writes:
> Do I just watch the logs looking for problems? I have no way of
> knowing right now whether this was a disk problem that's going to come
> back, a 1 time deal due to power, or something else entirely.
>
> As these cheap machines that don't use RAID what's the right way to
> go? emerge -e @world and then wait for the next event? Do nothing and
> wait?
Emerge smartmontools, then:
smartctl -h /dev/sda # get overview of what the drive thinks about itself
smartctl -t short /dev/sda # start short self test
Wait
smartctl -l selftest /dev/sda # see results
smartctl -t long /dev/sda # start long self test
Wait a lot longer
smartctl -l selftest /dev/sda # see results
You can continue working in the meanwhile, there will be no performance
impact. You will see something like this in the log:
=== START OF READ SMART DATA SECTION ===
SMART Self-test log structure revision number 1
Num Test_Description Status Remaining LifeTime(hours)
LBA_of_first_error
# 1 Short offline Completed without error 00% 2275 -
# 2 Extended offline Completed without error 00% 2270 -
# 3 Extended offline Completed without error 00% 1799 -
# 4 Extended offline Completed without error 00% 197 -
# 5 Extended offline Completed without error 00% 26 -
I you have a '-' in the right column, the disk has found no errors. If
there is a number, than it's the position of the first error.
There's also badblocks, this will check every block and output the bad
ones: badblocks -sv /dev/sda
badblocks -svn /dev/sda will do a read-write test. In case of a bad block,
the drive should exchange it with a spare one. Maybe this happens already
in read-only mode, I am not sure.
Also watch for errors in syslog or via dmesg, there should be some when
bad blocks are being accessed.
Wonko
next prev parent reply other threads:[~2010-02-26 10:03 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-26 3:33 [gentoo-user] recovery from /var corruption? Mark Knecht
2010-02-26 9:09 ` Neil Bothwick
2010-02-26 9:46 ` Alex Schuster [this message]
2010-02-26 15:17 ` Mark Knecht
2010-02-26 16:01 ` Alex Schuster
2010-02-26 16:53 ` Mark Knecht
2010-02-26 17:27 ` Alex Schuster
2010-02-26 17:51 ` Mark Knecht
2010-02-26 17:59 ` Volker Armin Hemmann
2010-02-26 18:19 ` Paul Hartman
2010-02-26 18:26 ` Mark Knecht
2010-02-26 18:37 ` Volker Armin Hemmann
2010-02-26 18:48 ` Mark Knecht
2010-02-26 11:47 ` daid kahl
2010-02-26 17:38 ` daid kahl
2010-02-26 18:57 ` Mark Knecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201002261046.24994.wonko@wonkology.org \
--to=wonko@wonkology.org \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox