* [linux-lvm] Strange file system errors
@ 2004-01-14 6:36 Kai Weber
2004-01-14 18:22 ` Heinz Mauelshagen
0 siblings, 1 reply; 5+ messages in thread
From: Kai Weber @ 2004-01-14 6:36 UTC (permalink / raw)
To: linux-lvm
Hi,
if I have to reboot my system without a clean shutdown the recovered
filesystems are corrupt. Files which I edited recently and maybe not yet
written to the buffer are recovered with no or corrupt contents.
For example:
$ ls -l config
-rw------- 1 bond bond 19622 Jan 14 12:04 .config
$ stat config
File: `config'
Size: 19622 Blocks: 0 IO Block: 4096 regular file
Device: fe01h/65025d Inode: 20967432 Links: 1
Access: (0600/-rw-------) Uid: ( 1000/ bond) Gid: ( 1000/ bond)
Access: 2004-01-14 12:27:01.000000000 +0100
Modify: 2004-01-14 12:04:16.000000000 +0100
Change: 2004-01-14 12:04:16.000000000 +0100
$ cat config
$ less config
"config" may be a binary file. See it anyway?
^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@
[...]
$ strace -e write cat config
write(1, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 4096) = 4096
write(1, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 4096) = 4096
write(1, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 4096) = 4096
write(1, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 4096) = 4096
write(1, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 3238) = 3238
I can force this error by pressing the reset button with an open file in my
text editor. It seems to have nothing to do with the underlying file
system. I have XFS and ext3 partitions. I would like to know, if it is a
LVM problem.
Kernel 2.6.1
LVM version: 2.00.08 (2003-11-14)
Library version: 1.00.07-ioctl (2003-11-21)
Driver version: 4.0.0
--
Kai Weber
» kai.weber@glorybox.de
http://www.glorybox.de
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [linux-lvm] Strange file system errors
2004-01-14 6:36 [linux-lvm] Strange file system errors Kai Weber
@ 2004-01-14 18:22 ` Heinz Mauelshagen
2004-01-14 18:44 ` Kai Weber
0 siblings, 1 reply; 5+ messages in thread
From: Heinz Mauelshagen @ 2004-01-14 18:22 UTC (permalink / raw)
To: linux-lvm
On Wed, Jan 14, 2004 at 12:35:09PM +0100, Kai Weber wrote:
> Hi,
>
> if I have to reboot my system without a clean shutdown the recovered
> filesystems are corrupt. Files which I edited recently and maybe not yet
> written to the buffer are recovered with no or corrupt contents.
>
> For example:
>
> $ ls -l config
> -rw------- 1 bond bond 19622 Jan 14 12:04 .config
> $ stat config
> File: `config'
> Size: 19622 Blocks: 0 IO Block: 4096 regular file
> Device: fe01h/65025d Inode: 20967432 Links: 1
> Access: (0600/-rw-------) Uid: ( 1000/ bond) Gid: ( 1000/ bond)
> Access: 2004-01-14 12:27:01.000000000 +0100
> Modify: 2004-01-14 12:04:16.000000000 +0100
> Change: 2004-01-14 12:04:16.000000000 +0100
> $ cat config
> $ less config
> "config" may be a binary file. See it anyway?
> ^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@
> [...]
> $ strace -e write cat config
> write(1, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 4096) = 4096
> write(1, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 4096) = 4096
> write(1, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 4096) = 4096
> write(1, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 4096) = 4096
> write(1, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 3238) = 3238
>
> I can force this error by pressing the reset button with an open file in my
> text editor. It seems to have nothing to do with the underlying file
> system. I have XFS and ext3 partitions. I would like to know, if it is a
> LVM problem.
No.
>
> Kernel 2.6.1
> LVM version: 2.00.08 (2003-11-14)
> Library version: 1.00.07-ioctl (2003-11-21)
> Driver version: 4.0.0
>
> --
> Kai Weber
> » kai.weber@glorybox.de
> http://www.glorybox.de
>
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@sistina.com
> http://lists.sistina.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
--
Regards,
Heinz -- The LVM Guy --
*** Software bugs are stupid.
Nevertheless it needs not so stupid people to solve them ***
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Heinz Mauelshagen Sistina Software Inc.
Senior Consultant/Developer Am Sonnenhang 11
56242 Marienrachdorf
Germany
Mauelshagen@Sistina.com +49 2626 141200
FAX 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [linux-lvm] Strange file system errors
2004-01-14 18:22 ` Heinz Mauelshagen
@ 2004-01-14 18:44 ` Kai Weber
2004-01-14 19:17 ` Jord Tanner
0 siblings, 1 reply; 5+ messages in thread
From: Kai Weber @ 2004-01-14 18:44 UTC (permalink / raw)
To: linux-lvm
* Heinz Mauelshagen <mauelshagen@redhat.com>:
> > system. I have XFS and ext3 partitions. I would like to know, if it is a
> > LVM problem.
>
> No.
Strange! If I do the test on my /boot partition, which is no LVM
partition, the journal is recovered and the files are not corrupt.
Any suggestions (if it is no LVM problem) where I could ask about it?
Regards,
--
Kai Weber
» kai.weber@glorybox.de
http://www.glorybox.de
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [linux-lvm] Strange file system errors
2004-01-14 18:44 ` Kai Weber
@ 2004-01-14 19:17 ` Jord Tanner
2004-01-16 12:31 ` Kai Weber
0 siblings, 1 reply; 5+ messages in thread
From: Jord Tanner @ 2004-01-14 19:17 UTC (permalink / raw)
To: linux-lvm
Assuming you have IDE drives, it sounds like a write caching problem.
This problem is amplified with the large caches on newer drives. A
sudden power down causes the the data is the cache to be lost. The
kernel doesn't know this has occured, because the drive lies, and claims
that the cache has been flushed, resulting in file system _and_ journal
corruption.
Try the tests again with write caching off. You can do this with "hdparm
-W0 /dev/hdX"
Jord Tanner
On Wed, 2004-01-14 at 15:43, Kai Weber wrote:
> * Heinz Mauelshagen <mauelshagen@redhat.com>:
>
> > > system. I have XFS and ext3 partitions. I would like to know, if it is a
> > > LVM problem.
> >
> > No.
>
> Strange! If I do the test on my /boot partition, which is no LVM
> partition, the journal is recovered and the files are not corrupt.
>
> Any suggestions (if it is no LVM problem) where I could ask about it?
>
> Regards,
--
Jord Tanner <jord@indygecko.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [linux-lvm] Strange file system errors
2004-01-14 19:17 ` Jord Tanner
@ 2004-01-16 12:31 ` Kai Weber
0 siblings, 0 replies; 5+ messages in thread
From: Kai Weber @ 2004-01-16 12:31 UTC (permalink / raw)
To: linux-lvm
* Jord Tanner <jord@indygecko.com>:
> Try the tests again with write caching off. You can do this with "hdparm
> -W0 /dev/hdX"
Thanks for your help. Until today I can not force the filesystem
corruption with write caching off. Your tip seems to work. The downsize
of disabled write caching seems to be a slightly slower system when
writing large files to the disks.
OK. End Of Topic. and now to something completely different.
--
Kai Weber
» kai.weber@glorybox.de
http://www.glorybox.de
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2004-01-16 12:31 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-14 6:36 [linux-lvm] Strange file system errors Kai Weber
2004-01-14 18:22 ` Heinz Mauelshagen
2004-01-14 18:44 ` Kai Weber
2004-01-14 19:17 ` Jord Tanner
2004-01-16 12:31 ` Kai Weber
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.