All of lore.kernel.org
 help / color / mirror / Atom feed
* nvram to protect fs during power loss?
@ 2004-12-30 23:40 Spam
  2004-12-31  9:41 ` Hendrik Visage
  0 siblings, 1 reply; 9+ messages in thread
From: Spam @ 2004-12-30 23:40 UTC (permalink / raw)
  To: reiserfs-list


  There have been some discussions about recovery abilities during
  power loss if write cache is enabled. Some recovery tool I saw once
  used NVRAM to store progress info so that if you had a power loss it
  would be able to resume.

  Perhaps it would be possible for Reiser4 to store some info, like
  time indexes etc in NVRAMwhen it send sync commands to the disk.
  This way it might be possible to avoid corruptions by simply
  verifying (fsck) the data stored after that time index etc?

  I have no idea how often NVRAM can be written to before it goes bad.
  Is there a limit?

  ~S
  


-- 


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

* Re: nvram to protect fs during power loss?
  2004-12-30 23:40 nvram to protect fs during power loss? Spam
@ 2004-12-31  9:41 ` Hendrik Visage
  2004-12-31 12:45   ` Spam
  0 siblings, 1 reply; 9+ messages in thread
From: Hendrik Visage @ 2004-12-31  9:41 UTC (permalink / raw)
  To: Spam; +Cc: reiserfs-list

On Fri, Dec 31, 2004 at 12:40:08AM +0100, Spam wrote:
> 
>   There have been some discussions about recovery abilities during
>   power loss if write cache is enabled. Some recovery tool I saw once
>   used NVRAM to store progress info so that if you had a power loss it
>   would be able to resume.

Typically specialized hardware, typically used for NFS (which is stateless) doing
"caching" of the writes to enhance performance.

>   Perhaps it would be possible for Reiser4 to store some info, like
>   time indexes etc in NVRAMwhen it send sync commands to the disk.
>   This way it might be possible to avoid corruptions by simply
>   verifying (fsck) the data stored after that time index etc?

The way the journals/logs does??


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

* Re: nvram to protect fs during power loss?
  2004-12-31  9:41 ` Hendrik Visage
@ 2004-12-31 12:45   ` Spam
  2004-12-31 16:46     ` Hendrik Visage
  0 siblings, 1 reply; 9+ messages in thread
From: Spam @ 2004-12-31 12:45 UTC (permalink / raw)
  To: reiserfs-list


  Yes, I know that good hardware already do use battery backups and
  similar. But I was talking about normal consumer hardware; desktops,
  laptops, etc.

  I do not know how the internals of reiser4 works, but one of the
  problems said to be that it cannot be certain about the order and
  integrity of the data if a power failure occur. But if reiser4
  stored some kind of index number, key etc, on regular intervals then
  that could certainly help in recovering the filesystem to a working
  state.

  As it is now you can end up with a severely broken filesystem that
  doesn't even mount if you have a power failure. IMO a filesystem
  should do its best to protect the data on it. I thought that perhaps
  using NVRAM could aid in the recovery after the powerloss, instead
  of tossing a user "bad error, use --build-sb to fix" during next
  boot.

  ~S

  

> On Fri, Dec 31, 2004 at 12:40:08AM +0100, Spam wrote:
>> 
>>   There have been some discussions about recovery abilities during
>>   power loss if write cache is enabled. Some recovery tool I saw once
>>   used NVRAM to store progress info so that if you had a power loss it
>>   would be able to resume.

> Typically specialized hardware, typically used for NFS (which is stateless) doing
> "caching" of the writes to enhance performance.

>>   Perhaps it would be possible for Reiser4 to store some info, like
>>   time indexes etc in NVRAMwhen it send sync commands to the disk.
>>   This way it might be possible to avoid corruptions by simply
>>   verifying (fsck) the data stored after that time index etc?

> The way the journals/logs does??
´

-- 


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

* Re: nvram to protect fs during power loss?
  2004-12-31 12:45   ` Spam
@ 2004-12-31 16:46     ` Hendrik Visage
  2004-12-31 16:51       ` Nick Vahalik
  0 siblings, 1 reply; 9+ messages in thread
From: Hendrik Visage @ 2004-12-31 16:46 UTC (permalink / raw)
  To: Spam; +Cc: reiserfs-list

On Fri, Dec 31, 2004 at 01:45:32PM +0100, Spam wrote:
> 
>   Yes, I know that good hardware already do use battery backups and
>   similar. But I was talking about normal consumer hardware; desktops,
>   laptops, etc.

Okay, if you want to use the NVRAM on a desktop, it's waaaaayyyyyy too little
to even consider. You'll need NVRAM (battery backed up etc.) in the
order of Megabytes to make it of any use Spam.

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

* Re: nvram to protect fs during power loss?
  2004-12-31 16:46     ` Hendrik Visage
@ 2004-12-31 16:51       ` Nick Vahalik
  2004-12-31 17:28         ` Spam
  2004-12-31 18:13         ` Chris Dukes
  0 siblings, 2 replies; 9+ messages in thread
From: Nick Vahalik @ 2004-12-31 16:51 UTC (permalink / raw)
  To: Spam, reiserfs-list

Why not just purchase a UPS and place it on your system?  Seems like
it be a lot cheaper.  That way the system can safely shut down in case
of a power outage?

On Fri, 31 Dec 2004 18:46:20 +0200, Hendrik Visage
<hvisage@envisage.co.za> wrote:
> On Fri, Dec 31, 2004 at 01:45:32PM +0100, Spam wrote:
> >
> >   Yes, I know that good hardware already do use battery backups and
> >   similar. But I was talking about normal consumer hardware; desktops,
> >   laptops, etc.
> 
> Okay, if you want to use the NVRAM on a desktop, it's waaaaayyyyyy too little
> to even consider. You'll need NVRAM (battery backed up etc.) in the
> order of Megabytes to make it of any use Spam.
> 


-- 
Nick Vahalik
CCNA, Linux Specialist

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

* Re: nvram to protect fs during power loss?
  2004-12-31 16:51       ` Nick Vahalik
@ 2004-12-31 17:28         ` Spam
  2004-12-31 17:33           ` Hendrik Visage
  2004-12-31 18:13         ` Chris Dukes
  1 sibling, 1 reply; 9+ messages in thread
From: Spam @ 2004-12-31 17:28 UTC (permalink / raw)
  To: reiserfs-list



> Why not just purchase a UPS and place it on your system?  Seems like
> it be a lot cheaper.  That way the system can safely shut down in case
> of a power outage?

  How can buying additional hardware be cheaper? Do you expect most
  users, including Laptop users, to use UPS?


> On Fri, 31 Dec 2004 18:46:20 +0200, Hendrik Visage
> <hvisage@envisage.co.za> wrote:
>> On Fri, Dec 31, 2004 at 01:45:32PM +0100, Spam wrote:
>> >
>> >   Yes, I know that good hardware already do use battery backups and
>> >   similar. But I was talking about normal consumer hardware; desktops,
>> >   laptops, etc.
>> 
>> Okay, if you want to use the NVRAM on a desktop, it's waaaaayyyyyy too little
>> to even consider. You'll need NVRAM (battery backed up etc.) in the
>> order of Megabytes to make it of any use Spam.
>> 

  I thought NVRAM already was battery backed up or was as flash?

  In any case. It was said on this mailing list that because of the
  write cache we do not know if the journal was written before the
  actual data.

  With a simple pointer we can know the latest journal entry that was
  surely saved before the power loss (you can update the NVRAM when
  you tell the disk to sync etc). When you reboot the the fsck tools
  can scan all the journal entries that occurred after to verify that
  the data is on disk or not. This must be much faster than doing a
  full scan of the entire filesystem? How can disk require several
  megabytes? I am not talking about storing the journals in the NVRAM.

  ~S
  
-- 


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

* Re: nvram to protect fs during power loss?
  2004-12-31 17:28         ` Spam
@ 2004-12-31 17:33           ` Hendrik Visage
  0 siblings, 0 replies; 9+ messages in thread
From: Hendrik Visage @ 2004-12-31 17:33 UTC (permalink / raw)
  To: Spam; +Cc: reiserfs-list

On Fri, Dec 31, 2004 at 06:28:49PM +0100, Spam wrote:
>   How can buying additional hardware be cheaper? Do you expect most
>   users, including Laptop users, to use UPS?

Almost all laptop users already have UPS.. it's called their batteries!!!

> >> Okay, if you want to use the NVRAM on a desktop, it's waaaaayyyyyy too little
> >> to even consider. You'll need NVRAM (battery backed up etc.) in the
> >> order of Megabytes to make it of any use Spam.
> 
>   I thought NVRAM already was battery backed up or was as flash?\

YEs, but those few bytes (not even kilobytes) is one too small to do anything
usefull for a cache/journal/whatever related to a filesystem, and also
way too slow to access.

>   With a simple pointer we can know the latest journal entry that was
>   surely saved before the power loss (you can update the NVRAM when
>   you tell the disk to sync etc). When you reboot the the fsck tools
>   can scan all the journal entries that occurred after to verify that
>   the data is on disk or not. This must be much faster than doing a
>   full scan of the entire filesystem? How can disk require several
>   megabytes? I am not talking about storing the journals in the NVRAM.

I believe the reiserfs team would appreciate the code if you could
prove it usefull ;-)

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

* Re: nvram to protect fs during power loss?
  2004-12-31 16:51       ` Nick Vahalik
  2004-12-31 17:28         ` Spam
@ 2004-12-31 18:13         ` Chris Dukes
  2004-12-31 19:02           ` Hendrik Visage
  1 sibling, 1 reply; 9+ messages in thread
From: Chris Dukes @ 2004-12-31 18:13 UTC (permalink / raw)
  To: Nick Vahalik; +Cc: Spam, reiserfs-list

On Fri, Dec 31, 2004 at 10:51:09AM -0600, Nick Vahalik wrote:
> Why not just purchase a UPS and place it on your system?  Seems like
> it be a lot cheaper.  That way the system can safely shut down in case
> of a power outage?

One would think that, then one discovers the magic of
broken UPSes.
I remember one installation where it was a mix of
machines on site power and machines on unmaintained UPSes.

There was a higher incident of power related down time on the systems
on UPSes because the UPSes hadn't had batteries replaced after
they'd been discharged too far, nor had the dust bunnies blown
out periodically.

Unfortunately UPSes and NVRAM fail to address what tends to be
the core problem.  Morons in the Machine Room.
-- 
Chris Dukes
Warning: Do not use the reflow toaster oven to prepare foods after
it has been used for solder paste reflow. 
http://www.stencilsunlimited.com/stencil_article_page5.htm

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

* Re: nvram to protect fs during power loss?
  2004-12-31 18:13         ` Chris Dukes
@ 2004-12-31 19:02           ` Hendrik Visage
  0 siblings, 0 replies; 9+ messages in thread
From: Hendrik Visage @ 2004-12-31 19:02 UTC (permalink / raw)
  To: Nick Vahalik, Spam, reiserfs-list

On Fri, Dec 31, 2004 at 06:13:22PM +0000, Chris Dukes wrote:
> 
> Unfortunately UPSes and NVRAM fail to address what tends to be
> the core problem.  Morons in the Machine Room.

:)
like I had to be called out @02:00 Dec 24th 2000... site down...that
was *after* the brand spanking new generators and UPSes (with new batteries!!!)
have been installed for the Y2k stuff... turned out the power fed to the 
UPSes from the generators was going via faulty trip switches...



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

end of thread, other threads:[~2004-12-31 19:02 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-12-30 23:40 nvram to protect fs during power loss? Spam
2004-12-31  9:41 ` Hendrik Visage
2004-12-31 12:45   ` Spam
2004-12-31 16:46     ` Hendrik Visage
2004-12-31 16:51       ` Nick Vahalik
2004-12-31 17:28         ` Spam
2004-12-31 17:33           ` Hendrik Visage
2004-12-31 18:13         ` Chris Dukes
2004-12-31 19:02           ` Hendrik Visage

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.