Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

cb911

macrumors 601
Original poster
Mar 12, 2002
4,134
4
BrisVegas, Australia
some weird stuff just happened with Finder, although i did have a heap of windows open, as well as alot of apps... :p

but then everything just jammed up, so i had to force restart. then i went into single user mode and tried to do fsck. it said i couldn't because i had journaling enabled. but i could have sworn that when i installed Panther i didn't enable journaling.

anyway, i forced fsck (fsck -f) and it found that some permissions were off. it also said that a file size was incorrect. it said that file temp338458 was 0, should be 78. and it couldn't repair permissions. so i thought oh well, then just rebooted normally.

when i repaired permissions with Disk Utility it only had 2 incorrect permissions, nothing like it said when i ran fsck -f. what going on with that?

so i want to be able to run fsck. is there any way i can disable journaling?

does anyone know if you can disable journaling from single user mode?
 
Just go to Disk Utility, select your drive, go to the File menu, and click "Disable Journaling".
 
I'm not sure I would disable journaling without knowing the implications. Does it just delete the journals or is there something more significant?

Also, with the inconsistencies in forcing fsck, which most likely hasn't been enhanced to understand journaling, can you trust its information? I'd be inclined to run Disk Utility from the Panther installation CD.
 
yes if fsck is disabled for journaling, there's a reason, probably that it just doesn't work right. so i'd not be circumventing that with flags, apple doesn't do stuff just for the hell of it...

pnw
 
so i could do some damage if i disable journaling now? that doesn't sound too good...

but something's definitely happening with my PB. i'm 99.99% certain that i didn't enable journaling when i installed Panther...

i just read up about journaling again... it said that it's good if you've got folders with lots of files in them. i've got a few folders with about 4-5000 pics in them. would journaling speed up browsing them with 'show icon preview' turned on?

should have looked up KnowledgeBase earlier... i just found this document that details disabling journaling. it doesn't say that it will harm the system in any way. they would have mentioned something about it being harmful, right?

i also found this document that has the topic: "There are a few errors that fsck reports that you can safely ignore when using journaling." that might explain some of the strange fsck behavior.

so if you're not supposed to run fsck, how do you maintain a journaled volume? just by using disk utility?

also, that first KB article says you can disable journaling via Terminal with the following command:

sudo /usr/sbin/diskutil disableJournal /

what exactly would you use to disabournaling from single user? you can do that in single user, right? would it be something similar without sudo, because single user is already root?
 
Originally posted by cb911
so if you're not supposed to run fsck, how do you maintain a journaled volume? just by using disk utility?

Yep, and an occasional repair permissions (that kind of problem is really caused by problems in user space, rather than in the core OS) should be all you generally need.

What Apple don't seem to explain very well is that the journal is pretty much a replacement for fsck. Short of a hardware failure (in which case fsck can sometimes do more harm than good if your aim is to recover data), the older repair utilities should rarely be required. If you leave the journal on, save those tools as a last resort if nothing else will solve a problem (in other words, don't run fsck "just in case," because then you're basically working against the journal system).
 
Originally posted by iMeowbot
Yep, and an occasional repair permissions (that kind of problem is really caused by problems in user space, rather than in the core OS) should be all you generally need.

What Apple don't seem to explain very well is that the journal is pretty much a replacement for fsck. Short of a hardware failure (in which case fsck can sometimes do more harm than good if your aim is to recover data), the older repair utilities should rarely be required. If you leave the journal on, save those tools as a last resort if nothing else will solve a problem (in other words, don't run fsck "just in case," because then you're basically working against the journal system).

Ah, thanks for that info, I've had a fair bit of grief with Panther (Safari crashing, Mail freezing and Kernel Panics aplenty) and went to run fsck only to find that it aint so easy now so I didn't. Repairing permissions doesn't seem to find any repairs to do so I guess I'll wait until the next few updates come out to hopefully stabilize things. I don't seem to be alone in having problems so I'm sure things will be addressed eventually.
 
well i just turned off journaling, mainly because i don't think the performance hit (albeit very small) is worth it for me. i do alot of Photoshop and similar work, and i had noticed a bit of a slow down in the last couple of days.


but i'm still curious - if i've got journaling enabled, will that speed up browsing folders with alot of files. i.e. 5000+ pictures?
 
Originally posted by cb911
but i'm still curious - if i've got journaling enabled, will that speed up browsing folders with alot of files. i.e. 5000+ pictures?

Nope. To get that you'd either need to muck around with the way directories are stored, or play around with supplementary indexing schemes. Apple and Be people both played with those kinds of ideas in the past, so it's possible that such a thing could surface on OS X some day.

The Panther Finder is a heck of an improvement over its predecessor, and they managed to do that without changing the ODS. It could well be that there's more optimization that can be done, now that the rewrite is out in the field and working.
 
Ugh... None of you understand what journaling is.

Don't disable journaling. Also, don't try to force an fsck on a journaled filesystem. The most important thing you can remember about journaling is this:

On a journaled filesystem fsck is no longer necessary.

I don't mean to sound condescending, but let me briefly describe how journaling works:

When a filesystem is journaled, before any data is written to disk, it is first written to the journal, which is basically a table of writes that are about to take place. That way, if the computer crashes in the middle of a write, when it is rebooted, the journal is replayed and all the pending writes are completed.

(For those of you that are familiar with relational databases, this is very similar to how a transaction log ensures that the database maintains integrity even if it crashes in the middle of a commit)

This basically makes it so that your filesystem never gets corrupted (I shouldn't say never, there is always some small chance that it could get corrupted, thus the reason for backups).

But a filesystem that is journaled will never need to be fscked. Apple even says that if you force an fsck on a journaled filesystem you could cause corruption because fsck doesn't know how to handle a journaled filesystem.

Also, on the performance issue, some benchmarks I've seen seem to indicate that a journaled filesystem might actually be faster at some things than a non-journaled filesystem. This is because writes are queued up in the journal and executed all at once, instead of just a few at a time.
 
Re: Ugh... None of you understand what journaling is.

Originally posted by illumin8
This basically makes it so that your filesystem never gets corrupted (I shouldn't say never, there is always some small chance that it could get corrupted, thus the reason for backups).

There is additionally the issue of using the same filesystem on older versions of an operating system or a foreign system (think portable drives), where metadata journal extensions are not implemented. In that event, the journal would no longer be able to guarantee a consistent state and a recovery utility may well be required if something bad happens.

Also, on the performance issue, some benchmarks I've seen seem to indicate that a journaled filesystem might actually be faster at some things than a non-journaled filesystem. This is because writes are queued up in the journal and executed all at once, instead of just a few at a time.

This scenario will play out only if your applications tend to perform intermittent writes -- you are, after all, writing the metadata twice, so absolute disk write time necessarily increases. Quite a lot of interactive applications can benefit here, but a program that constantly changes the filesystem, such as a busy mail server, isn't going to have that slack time and will have to do a little bit of waiting. Those applications, of course, are the ones where a small ongoing performance hit is a good deal better than having a system unavailable while, say, a traditional recovery after a power failure completes.
 
i've read a few Apple KB documents about journaling. i thought it was only really beneficial for you if you you're running a server or similar where data integrity is critical?

for the average user, or someone using apps like Photoshop and Final Cut Pro wouldn't the HD 'slowdown' outweigh the benefits?

so what you're saying is that with journaling enabled there is less permission corruption?

when you're talking about 'writes' do you mean mostly data written by the system (OS X)?
 
Originally posted by cb911
i've read a few Apple KB documents about journaling. i thought it was only really beneficial for you if you you're running a server or similar where data integrity is critical?

for the average user, or someone using apps like Photoshop and Final Cut Pro wouldn't the HD 'slowdown' outweigh the benefits?

so what you're saying is that with journaling enabled there is less permission corruption?

when you're talking about 'writes' do you mean mostly data written by the system (OS X)?

I want to clarify something about permission corruption. Permission corruption is caused by some applications and installers that intentionally change the permissions of system libraries and files to something that they shouldn't be. It is caused by the application telling Mac OS to change the permissions. There's nothing you can do to avoid this because most installers have to be run as root (or sudo root by prompting you for your password), and therefore they have the ability to change anything on your computer. Journaling does nothing to help this. It's not really considered corruption because there's no data loss. It can just break certain applications if the application expects to have read or write access to a file and the permissions don't allow it.

As far as journaling goes:

It is beneficial for you if you ever have an "unclean" shutdown. If, for example, your system hangs hard and you can't force quite the Finder, sometimes the only option is to power cycle, and normally an fsck would be required on reboot. Another situation is a power outage if you don't have a UPS. I would highly recommend using journaling if you don't have a UPS. Also, sometimes corruption can't be repaired by fsck and you've lost your whole system (very rare, but it does happen).

Personally, I think Journalling is well worth the small performance hit. You get guaranteed reliability on your filesystems. You know that if you save a file it will actually get written to disk. Also, you know that if you have to reboot after an unclean shutdown, there's no need to wait for a 10 minute long fsck. The fsck can be very long on a big filesystem. I've seen mail servers that took two days to run an fsck (running linux on ext2 filesystem, which is not journalled).

It's really up to you whether you want to use it or not, but there's a reason why Apple made it the default filesystem for Panther. It's reliable and decreases your chances of data loss significantly. Whether you run a server or a workstation, if your data is important to you it's a good idea to run with journaling. My Sun workstation has been using Journaling ever since Solaris 7 and it's great. I've never lost any data due to an unclean shutdown.
 
hhmmm... you might just have convinced me to turn it back on...

but i've got it off now, so i'm going to see how it goes.

is there any chance that journaling could be casing some weird problems? i've had the Finder quit on me 3 times in the last two days, while i was moving files as well. but i think the files are ok, but this is definitely behavior that i've never seen before.

who knows, i might turn journaling back on. but of course everyone should realise that there is no substitute for regular backup.
 
Originally posted by cb911
is there any chance that journaling could be casing some weird problems? i've had the Finder quit on me 3 times in the last two days, while i was moving files as well. but i think the files are ok, but this is definitely behavior that i've never seen before.
I don't think it would cause strange problems because journaling has been available on BSD unix for a few years now and is very stable. I believe Apple just ported it over, so you're getting the stability of a few years of testing even though it's a new feature in Mac OS X.

Anyway, I'm running 10.3.1 from a clean install on my new PowerBook (with journalling enabled) and I've had no problems with data loss or strange application crashes (so far). The only thing that's been unstable on Panther is Safari crashes once in a great while when I'm browsing a site with heavy javascript. I'm sure it's just bugs in Safari.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.