This Question is Possibly Answered

1 "correct" answer available (10 pts) 2 "helpful" answers available (5 pts)
163 Views 7 Replies Last post: Nov 2, 2009 8:28 AM by radek.kubka RSS
aborzenkov Enthusiast 29 posts since
Apr 8, 2008
Currently Being Moderated

Oct 29, 2009 11:53 PM

Does snapshot represent crash-consistent image?

There are two considerations.

 

1) write ordering

 

Consider application that must ensure that B is always written only after A (any application that is using journalling, like file system or database). In case of NetApp both A and B actually end up being in (NV)RAM and are flushed to disk only some time later. Is it guaranteed that if block A came in before block B, next CP will either include A or A and B, but never B without A?

 

2) write splitting

 

Consider application that writes in blocks of size > 4K and relies on the fact that either full block or none is written (any database with block size > 4K). Let's say it is block of 64K which is passed to NetApp as single IO. Is it guaranteed that during CP either full 64K or nothing is included?

 

This is not dependent on protocol in use actually.

 

Thank you!

alapati NetApp Employee Enthusiast 16 posts since
Aug 22, 2008
Currently Being Moderated
Oct 30, 2009 5:53 AM in response to: aborzenkov
Re: Does snapshot represent crash-consistent image?

Hi,

 

In short the answer is yes. Take Oracle as an example. Oracle does dependent writes, meaning Oracle will not ack write B unless it received an ack from write A. Therefore the snapshot you create will be one three possibilities: a) A and B are present; 2. A is present but not B, 3) Both A and B are not present.

 

If your database is spread across multiple volumes or controllers, you can use NetApp Data ONTAP CG APIs (cg-start and cg-commit) to achieve a crash consistent image. Hope this helps.

 

Srinath

radek.kubka Virtuoso 389 posts since
Jul 31, 2008
Currently Being Moderated
Nov 2, 2009 3:57 AM in response to: aborzenkov
Re: Does snapshot represent crash-consistent image?

Bear in mind NVRAM is not a write cache - it is a journal.

 

This is pretty old, but still good reading about how NVRAM works:

http://www.netapp.com/us/library/technical-reports/wp-3001.html

 

Page 10 says:

Using NVRAM to store a log of uncommitted requests is very different from using NVRAM as a disk cache, as some UNIX products do [Lyon89]. When NVRAM is used at the disk layer, it may contain data that is critical to file system consistency. If the NVRAM fails, the file system may become inconsistent in ways that fsck cannot correct.
WAFL uses NVRAM as a file system journal, not as a cache of disk blocks that need be changed on the drives. As such, WAFL use of NVRAM space is extremely efficient. For example, a request for a file system to create a file can be described in just a few hundred bytes of information, where as the actual operation of creating a file on disks might involve changing a dozen blocks of information or more. Because WAFL uses NVRAM as a journal of operations that need to be performed on the drives, rather than the result of the operations themselves, thousands of operations can be journaled in a typical storage appliance NVRAM log.

 

Hope it helps.

 

Regards,
Radek

radek.kubka Virtuoso 389 posts since
Jul 31, 2008
Currently Being Moderated
Nov 2, 2009 7:29 AM in response to: aborzenkov
Re: Does snapshot represent crash-consistent image?

This particular bit I believe is very relevant to your question:

Because WAFL uses NVRAM as a journal of operations that need to be performed on the drives, rather than the result of the operations themselves, thousands of operations can be journaled in a typical storage appliance NVRAM log.


radek.kubka Virtuoso 389 posts since
Jul 31, 2008
Currently Being Moderated
Nov 2, 2009 8:29 AM in response to: aborzenkov
Re: Does snapshot represent crash-consistent image?

When snapshot is taken, new CP is always created.

 

You may play with it by scheduling a snapshot & then issuing following command:

sysstat –x 1

 

Look for "S" in "CP ty" column.

 

Regards,
Radek

More Like This

  • Retrieving data ...

Bookmarked By (0)