Is NTFS a journalized filesystem?

Electrode

Diamond Member
May 4, 2001
6,063
2
81
A few weeks ago, I was watching a rerun of The Screen Savers, and at the end of the show, Leo Laporte (whom I don't think always knows what he's talking about) mentioned that "NTFS doesn't require chkdsk after a bad shutdown because it's a journalazed filesystem."

That was the first I'd ever heard of it. Is NTFS really journalized? If so, is it the same kind of journal that ext3 and reiserfs use, or is it something totally different?
 

Abzstrak

Platinum Member
Mar 11, 2000
2,450
0
0
the mft actually consists of a relational database that is the journal... you can find lotsa good info on technet, its good reading...

its one of the few things that MS has gotten right... of course, if memory serves, its a rip off of hpfs

 

Grommet5

Banned
Feb 6, 2002
230
0
0
I also disagree with ripoff of HPFS. There quite a few major differences between NTFS and HPFS, but then lots of Linux zealots always ready to scream ms ripoffs everything.
rolleye.gif
 

manly

Lifer
Jan 25, 2000
13,086
3,850
136
Please, you're wrong if you're knocking Linux zealots.

M$ has a long track record of buying/stealing/embracing & extending others intellectual property. Today, they develop more software in-house than they ever have before, but they've never been a particularly innovative company.

As far as NTFS, it might be journaled, but for those who consider it an advanced filesystem, why does it require constant, regular defragmentation?

Any of the Unix filesystems don't suffer from the same problem.
 

Derango

Diamond Member
Jan 1, 2002
3,113
1
0


<< Any of the Unix filesystems don't suffer from the same problem. >>



Actually...if you use an ext2/3 system long enough, it will fragment, espicaly if you use it heavily (and I mean REALLY heavily). The FS would have to be in use for around 2 years of people constantly deleting and adding new files for it to fragment, and it gets worse if the partition is almost full. Someone has actualy made a defragmentation program for the ext2/3 filesystem, but there's really no need to use it under normal circumstances.
 

manly

Lifer
Jan 25, 2000
13,086
3,850
136
Derango,

Right, I didn't mean to sound so 100% literal with my statement. But as you pointed out, the work load to fragment ext2 is orders of magnitude different from the work load that fragments NTFS.

The only time I heard of it being a problem was for hundreds of users running a Unix mail spool on a server.
 

rahvin

Elite Member
Oct 10, 1999
8,475
1
0


<< I also disagree with ripoff of HPFS. There quite a few major differences between NTFS and HPFS, but then lots of Linux zealots always ready to scream ms ripoffs everything. >>



MS wrote/designed HPFS for IBM. In fact you may not be aware the MS wrote OS/2 under contract for IBM. If you don't think they borrowed the R/D they did for IBM for NT, well your nuts.
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0


<< I also disagree with ripoff of HPFS. There quite a few major differences between NTFS and HPFS, but then lots of Linux zealots always ready to scream ms ripoffs everything.
rolleye.gif
>>



Im not a linux zealot, and my reason for thinking NTFS is a more up to date version of HPFS is the fact they use the same Hex Code *shrug*
 

NogginBoink

Diamond Member
Feb 17, 2002
5,322
0
0
Yes, NTFS is a journaled filesystem.

This does not mean chkdsk is not needed.

There are criteria under which chkdsk will never need to run. As long as:

a) write order is preserved
b) sectors are not corrupted
c) writes are not torn
d) only one OS accesses the disk at a time,

then chkdsk will never need to be run on a volume. However, not all hardware/device drivers obey these rules. For instance, write order is not guaranteed in the IDE specs, as I understand things. I don't know what exactly torn writes are. (Maybe it means that the OS asks for an atomic write operation that the hardware or driver segments into more than one operation.) If chkdsk runs, one of those four rules is being violated.

This information comes from a very, very reliable source.
 

Electrode

Diamond Member
May 4, 2001
6,063
2
81
A journalized filesystem has a record (or journal) of things that are about to be written, or have just been written. If the filesystem is not cleanly unmounted (for example, if you hit the reset switch or lose power) the OS will check this journal, and redo everythign in the journal to ensure that no data is lost.
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0


<< A journalized filesystem has a record (or journal) of things that are about to be written, or have just been written. If the filesystem is not cleanly unmounted (for example, if you hit the reset switch or lose power) the OS will check this journal, and redo everythign in the journal to ensure that no data is lost. >>



I dont think journaling ensures data integrity, only file system integrity. I believe ext3fs *CAN*, but the speed hit is pretty harsh.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
I dont think journaling ensures data integrity, only file system integrity. I believe ext3fs *CAN*, but the speed hit is pretty harsh.

That's right, the filesystem driver will replay the log for anything it can (usually only metadata changes like filesize, owner, rights, etc) and will undo any real data operations. Meaning if you hit reset in the middle of writing a file, the file will either be empty or completely gone. This makes sure the filesystem is in a consistent state without the need for a lengthly fsck.

ext3 can use full data journaling, and it's not as slow as you'd think, in some cases it's even faster because of the way the rights are ordered, but it's still not something you want to run day to day.