public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
* resilience against power loss
@ 2014-07-22 16:34 vicentiu.neagoe
  2014-07-28  8:48 ` Lukáš Czerner
  0 siblings, 1 reply; 3+ messages in thread
From: vicentiu.neagoe @ 2014-07-22 16:34 UTC (permalink / raw)
  To: linux-ext4

Hello,

I'm trying to configure ext4 to prevent data corruption in case of a 
power loss.

I test by doing a cold reset right after writing to a file.
I tried the nodelalloc option, but the file still becomes corrupted 
with trailing garbage.

Using ext3, I either get the old version of the file, or the new 
version, and there is no corruption.

Does nodelalloc not guarantee data integrity?

Are there any other options that provide complete resilience against 
power loss?

thanks

Vicentiu

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: resilience against power loss
  2014-07-22 16:34 resilience against power loss vicentiu.neagoe
@ 2014-07-28  8:48 ` Lukáš Czerner
  2014-07-28 15:23   ` Vicentiu Neagoe
  0 siblings, 1 reply; 3+ messages in thread
From: Lukáš Czerner @ 2014-07-28  8:48 UTC (permalink / raw)
  To: vicentiu.neagoe; +Cc: linux-ext4

On Tue, 22 Jul 2014, vicentiu.neagoe@ni.com wrote:

> Date: Tue, 22 Jul 2014 19:34:10 +0300
> From: vicentiu.neagoe@ni.com
> To: linux-ext4@vger.kernel.org
> Subject: resilience against power loss
> 
> Hello,
> 
> I'm trying to configure ext4 to prevent data corruption in case of a 
> power loss.
> 
> I test by doing a cold reset right after writing to a file.
> I tried the nodelalloc option, but the file still becomes corrupted 
> with trailing garbage.
> 
> Using ext3, I either get the old version of the file, or the new 
> version, and there is no corruption.
> 
> Does nodelalloc not guarantee data integrity?
> 
> Are there any other options that provide complete resilience against 
> power loss?

Well, that would be fsync. It'll make sure that your data actually reach
disk and that the disk actually write it from the cache to platters.

-Lukas

> 
> thanks
> 
> Vicentiu
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: resilience against power loss
  2014-07-28  8:48 ` Lukáš Czerner
@ 2014-07-28 15:23   ` Vicentiu Neagoe
  0 siblings, 0 replies; 3+ messages in thread
From: Vicentiu Neagoe @ 2014-07-28 15:23 UTC (permalink / raw)
  To: linux-ext4

On 28 Jul 2014 at 10:48, Lukás Czerner wrote:

> On Tue, 22 Jul 2014, vicentiu.neagoe@ni.com wrote:
> 
> > Date: Tue, 22 Jul 2014 19:34:10 +0300
> > From: vicentiu.neagoe@ni.com
> > To: linux-ext4@vger.kernel.org
> > Subject: resilience against power loss
> > 
> > Hello,
> > 
> > I'm trying to configure ext4 to prevent data corruption in case of a 
> > power loss.
> > 
> > I test by doing a cold reset right after writing to a file.
> > I tried the nodelalloc option, but the file still becomes corrupted 
> > with trailing garbage.
> > 
> > Using ext3, I either get the old version of the file, or the new 
> > version, and there is no corruption.
> > 
> > Does nodelalloc not guarantee data integrity?
> > 
> > Are there any other options that provide complete resilience against 
> > power loss?
> 
> Well, that would be fsync. It'll make sure that your data actually reach
> disk and that the disk actually write it from the cache to platters.

I don't have control over how the applications were written, yet I 
need the system to not corrupt or lose data in case of a power loss.

I have the partition mounted with the sync option but the issue still 
reproduces.
Are there no options on ext4 to provide the same data integrity as 
data=ordered on ext3? I also tested with Btrfs and there is no data 
corruption on a power loss.

Vicentiu

> -Lukas
> 
> > 
> > thanks
> > 
> > Vicentiu
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> > 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-07-28 15:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-22 16:34 resilience against power loss vicentiu.neagoe
2014-07-28  8:48 ` Lukáš Czerner
2014-07-28 15:23   ` Vicentiu Neagoe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox