Re: the file writing consistency About Windows' NTFS

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Tim (Tim_at_NoSpam)
Date: 02/16/04


Date: Mon, 16 Feb 2004 21:58:06 +1300

Hi,
>From the book "Inside the Windows NT File System" MS Press:

"NTFS uses the transaction processing moidel to implement its file system
recovery feature. If a program initiates an I/O operation that alters the
structure of the NTFS file system - changes directory structure, extends a
file, allocates space for a new file, and so on - NTFS treats the operation
as an atomic transaction. It guarantees that the transaction is either
completed or, if the system fails while executing the transaction, rolled
back. ....."

the book goes on for around 100 pages detailing how this works, along with
how fault tolerance and compression is implemented.

You do not need to do anything with an NTFS formatted disc for all this to
operate. The only provision I would place on this is that if you are using a
caching raid controller, ensure that it is Windows HCL certified, or it is
on a UPS or has Write caching turned off since the unwritten contents of the
controller cache memory are unknown to Windows - this is a problem only on
"some" caching RAID controllers and hopefully no longer occurs with recent
models. Modern IDE RAID controllers are usually not caching controllers,
although the better ones are.

There has been one NTFS related bug I recall recently where on extremely
fast systems if a very substantial numer of changes occur in rapid
succession, the log file (journal) can overflow. There is a patch for this.

If you wish to recover a file you have deleted, then please look for an
UnDelete utility. Nesting does not occur - if the log file runs out of space
you will get a Windows error message "Log File Full" - again, extremely
rare. During an orderly shutdown the log on the disc volumes are
checkpointed and the discs marked 'clean'. In the event of a failure, then
system 'replays' the contents of the log to since the last checkpoint to
ensure that all transactions are applied correctly.

Note: NTFS does not guarantee the integrity of user data - it can't, but it
does guarantee the integrity of its own structure although there is
provision in the design of the file store for this future capacity.

If you are having trouble with NTFS or are curious then perhaps flick over
to one of the Microsoft newsgroups and post a specific query there. More
information is at http://msdn.microsoft.com or http://support.microsoft.com

HTH
- Tim

"X.H.Qiu" <qiuxh@sz.cathay.jp> wrote in message
news:eB2eWbG9DHA.1804@TK2MSFTNGP12.phx.gbl...
> Hello!
>
> NTFS is transaction log file system. For becoming a recoverable file
system,
> it use the following ways:
> 1.to use cash buffer.
> 2.In order to recover those files which are destoried, use transaction log
> file to record those operations on files.
>
> But about above, I have a question as follows:
> How to make transaction log files recoverable after they being destoried?
> Use another transaction log files? if this is true, nesting will occured,
> won't it?
>
> look forward to your answers!
>
> thanks
>
> with the best wish!
>
> X.H.Qiu
>
>



Relevant Pages

  • Re: Transaction logs
    ... In Simple mode the transaction log will automatically truncate when it gets ... That means that the space in the log file of any transactions ... long as there are no open transactions in the way. ... >> Andrew J. Kelly SQL MVP ...
    (microsoft.public.sqlserver.setup)
  • Re: Slow performance after restarting
    ... Detach/Rename/Re-attach gets me a much smaller transaction ... log (these are all dev boxes, yes), but doesn't seem to affect the behavior. ... > log file is this size or what you do for backups. ... >> DBCC SHRINKDATABASE and DBCC SHRINKFILE don't seem to affect the ...
    (microsoft.public.sqlserver.programming)
  • Re: Shrink the log file
    ... Until there have been enough transactions to fill up a virtual log file, ... > I have a database with 1.5GB log file.After the transaction backup, ... tried to perform the SHRINKFILE command but I got an error message as below: ...
    (microsoft.public.sqlserver.server)
  • Re: Investigating what makes my log file grow and grow and grow
    ... When you get a value for DBCC Opentran Oldest non-distributed LSN it means ... There is a problem with your log reader. ... > 2)Backup transaction log ... > Yet the log file doesn't shrink. ...
    (microsoft.public.sqlserver.replication)
  • Re: vbscript to leverage transactions (and rollbacks) in Vista file system?
    ... That means theoretically you can start a transaction scope, ... Vista Transactional NTFS with Detours", by Tamer Safwat Aziz, ... coded in any language supporting api calls, ... "interoperability" capability to wrap ...
    (microsoft.public.scripting.vbscript)