From: Helge Hafting <helge.hafting@aitel.hist.no>
To: Molle Bestefich <molle.bestefich@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: ext3 corruption
Date: Mon, 25 Sep 2006 14:27:24 +0200 [thread overview]
Message-ID: <4517CB2C.7020807@aitel.hist.no> (raw)
In-Reply-To: <62b0912f0609240156p21caf564qc20b82b2ee4d8f43@mail.gmail.com>
Molle Bestefich wrote:
> I wrote:
>> I have a ~1TB filesystem that failed to mount today, the message is:
>>
>> EXT3-fs error (device loop0): ext3_check_descriptors: Block bitmap for
>> group 2338 not in group (block 1607003381)!
>> EXT3-fs: group descriptors corrupted !
>>
>> Yesterday it worked flawlessly.
>
> Helge Hafting wrote:
>> > And voila, that difficult task of assessing in which order to do
>> > things is out of the hands of distros like Red Hat, and into the
>> > hands of those people who actually make the binaries.
>>
>> Not so easy. You do not want to shut down md devices because
>> samba is using them. Someone else may run samba on a single
>> harddisk and also have some md-devices that they take down
>> and bring up a lot. So having samba generally depend on md doesn't
>> work. Your setup need it, others may have different needs.
>
> I've looked hard at things and just found that maybe it's not the init
> order that's to blame..
>
> It seems that unmounting the filesystem fails with a "device busy" error.
> I'm not sure why there's still open files on the device, but perhaps a
> remote user is copying a file or some such (likely).
That is solvable by shutting down remote operations first.
So stop samba (or nfs or whatever) before attempting to umount.
> Anyway, the system is shutting down, so it should just forcefully
> unmount the device, but it doesn't.
> The halt script tries "umount" three times, which all fail with:
> "device is busy".
> It then actually tries "umount -f" three times, which all fail with
> "Device or resource busy"
> At which point the halt script turns off the machine and the
> filesystem is ruined.
>
> How to fix forceful unmount so it works?
I don't know, other than researching what filesystems support
forced umount and use one of those. Complain to the vendor or maintainer
of your particular filesystem.
However, you can usually find out why some file is open. Try
umount yourself, when it doesn't work, use "lsof" to see
what file is open. Then figure out who or what is keeping it open.
To debug a shutdown problem, consider putting "lsof >> logfile"
in your shutdown script.
Not a solution but a workaround: Run "sync" before shutdown.
(Stick it in some script.)
Now, all data in filesystem caches will be written to disk before power
is lost.
This isn't perfect, but filesystem damage is greatly minimized and
often avoided completely. Useful while waiting for a better solution.
The real solution is to set things up so unforced umount works.
This is normally possible to do.
Helge Hafting
next prev parent reply other threads:[~2006-09-25 12:30 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-13 20:32 ext3 corruption Molle Bestefich
2006-08-08 23:47 ` Molle Bestefich
2006-08-09 1:33 ` Sergio Monteiro Basto
2006-08-09 10:36 ` Molle Bestefich
2006-08-09 11:33 ` linux-os (Dick Johnson)
2006-08-09 15:22 ` Molle Bestefich
2006-08-09 15:38 ` Michael Loftis
2006-08-09 18:28 ` Molle Bestefich
2006-08-09 18:41 ` Mws
2006-08-09 20:17 ` Duane Griffin
2006-08-09 20:47 ` Molle Bestefich
[not found] ` <e9e943910608091527t3b88da7eo837f6adc1e1e6f98@mail.gmail.com>
2006-08-09 23:09 ` Molle Bestefich
2006-08-10 0:08 ` Duane Griffin
2006-08-10 21:00 ` Molle Bestefich
2006-08-12 16:38 ` Theodore Tso
2006-08-12 17:24 ` Molle Bestefich
2006-08-12 21:47 ` Theodore Tso
2006-08-13 19:21 ` Molle Bestefich
2006-08-14 3:23 ` Kyle Moffett
2006-08-14 15:34 ` Theodore Tso
2006-08-14 17:21 ` Molle Bestefich
2006-08-10 3:06 ` Jim Crilly
2006-08-10 9:48 ` Molle Bestefich
2006-08-10 11:41 ` linux-os (Dick Johnson)
2006-08-10 12:21 ` Molle Bestefich
2006-08-10 12:19 ` Helge Hafting
2006-08-10 13:00 ` Molle Bestefich
2006-08-10 14:40 ` gmu 2k6
2006-09-24 8:56 ` Molle Bestefich
2006-09-25 12:27 ` Helge Hafting [this message]
2006-10-02 2:40 ` Molle Bestefich
2006-10-02 3:24 ` Gene Heskett
2006-10-02 6:50 ` Kyle Moffett
2006-08-10 16:10 ` John Stoffel
2006-08-10 19:10 ` Molle Bestefich
2006-08-11 8:06 ` Helge Hafting
2006-08-11 13:26 ` Horst H. von Brand
2006-08-12 8:54 ` Molle Bestefich
2006-08-12 10:31 ` Molle Bestefich
2006-08-17 1:27 ` Horst H. von Brand
2006-08-17 13:46 ` Molle Bestefich
2006-08-10 8:32 ` Bernd Petrovitsch
2006-08-10 7:44 ` Denis Vlasenko
[not found] <Pine.LNX.4.33.0207121337500.8654-100000@coffee.psychology.mcmaster.ca>
2002-07-12 19:05 ` Alec Smith
2002-07-12 20:11 ` Andrew Morton
-- strict thread matches above, loose matches on Subject: below --
2002-07-12 15:32 Alec Smith
2002-07-12 15:52 ` Russell King
2002-07-12 19:51 ` Andrew Morton
2002-07-12 16:02 ` Alan Cox
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=4517CB2C.7020807@aitel.hist.no \
--to=helge.hafting@aitel.hist.no \
--cc=linux-kernel@vger.kernel.org \
--cc=molle.bestefich@gmail.com \
/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