Home
Not a big deal if your startup drive doesn't have a lot of files, but a guy here has one that has 750k files and this makes fsck churn for about a solid minute before proceeding with boot. He's threatening to go back to Snow which boots in less than 1/2 the time.

Before 10.7, fsck only ran if the volume wasn't journaled or if the journal was dirty from a hard dismount. Now it seems to always run. I'm having problems finding how to disable it.

Various googling finds information on editing fstab. If you check in /etc/ you will find fstab.hd contains a warning that it's being ignored and going away. But "fstab" is NOT there. Through experimentation I've found that if you make it, it will try to use it. But I apparently can't get the syntax right.

UUID=longvolumeidfromdiskutilgoeshere / hfs rw 0 0

(those spaces are spaces, not tabs) If you want to specify a volume name with a space in it you thus have to use octal. ("\040") But when I try the above it does indeed appear to skip fsck on the boot but then it hangs only a few lines later when it apparently can't find the mount point. Attempting to replace "/" with "/Volumes/Macintosh\040HD" doesn't work either, it still says it can't find the mount point. From what I've read, the "0 0" should prevent fsck from running if I can get it to take it.

Is anyone here more familiar with fstab?
Originally Posted By: Virtual1
Not a big deal if your startup drive doesn't have a lot of files, but a guy here has one that has 750k files and this makes fsck churn for about a solid minute before proceeding with boot. He's threatening to go back to Snow which boots in less than 1/2 the time.

Before 10.7, fsck only ran if the volume wasn't journaled or if the journal was dirty from a hard dismount. Now it seems to always run.


Are you sure there's been a change? 750k files isn't a lot. I have over twice that many, and never see fsck run when I restart.

I also think it's "volume isn't journaled and volume wasn't dismounted properly". If the volume is journaled, no changes to the catalog happen until after they've been added to the journal and the journal has been flushed to disk. Even after a bad dismount, the journal can be used to bring the catalog quickly back to a consistent state.

Have you checked the physical health of the disk? I'm thinking that maybe it's having trouble writing to the sector that says "unmounted cleanly". Or maybe it's getting errors writing to the journal?

Are you sure it's the startup volume that fsck is running against? Other volumes should get checked, if needed, after startup, but still...

Is he sure it's fsck causing the delay? Lion can take a while to restart if you had lots of apps running when you shut down, because it takes time to re-launch them all and re-open all their documents.
This behavior (always running fsck at boot) is not consistent with my experience. I've only been running Lion to troubleshoot software I develop, but I definitely have not observed it running fsck on a cleanly dismounted boot volume.

This suggests to me that there's something specific about that machine that's triggering this behavior. It might be useful to check the health of the drive, the partition map, and the directory on that machine carefully to see if anything's out of whack.
I have checked the All Messages log after restarts under Lion and have not noticed fsck running.

The method used to make something always run at boot time is launchd. If you open Activity Monitor, you can see that launchd is the parent process of many other processes, by selecting a process and using the Inspect button.

Oddly enough, I now have several launchd processes running. One was launched by kernel_task, and the others were apparently launched by the first launchd process, or one of the earlier ones.
Originally Posted By: MicroMatTech3
Oddly enough, I now have several launchd processes running.


The first task that runs when you start up your computer is the one with PID=0 ("kernel_task"). In a sense, this task "is" the system. The first thing it does is launch a copy of launchd (PID=1), which launches everything else.

The copy of launchd with PID=1 has user=root, and (among other things), loads from /System/Library/LaunchDaemons and /Library/LaunchDaemons descriptions of all your daemon processes, and launches them as needed.

As each user logs in*, it also fires up a copy of launchd specific to that user. That task, among other things, loads from the various Library/LaunchAgents files descriptions of "agents", background tasks that operate on behalf of that user, and launches them as needed.

* The "login" does not need to be through LoginWindow. I see a copy of launchd with user=_spotlight.
Originally Posted By: ganbustein
Originally Posted By: MicroMatTech3
Oddly enough, I now have several launchd processes running.


The first task that runs when you start up your computer is the one with PID=0 ("kernel_task"). In a sense, this task "is" the system. The first thing it does is launch a copy of launchd (PID=1), which launches everything else.

The copy of launchd with PID=1 has user=root, and (among other things), loads from /System/Library/LaunchDaemons and /Library/LaunchDaemons descriptions of all your daemon processes, and launches them as needed.

As each user logs in*, it also fires up a copy of launchd specific to that user. That task, among other things, loads from the various Library/LaunchAgents files descriptions of "agents", background tasks that operate on behalf of that user, and launches them as needed.

* The "login" does not need to be through LoginWindow. I see a copy of launchd with user=_spotlight.


Interesting. On most *nix systems, the first thing that the kernel does is launch init. The presence of init, which is so vital to most *nix variants that if it quits, the system kernel panics, is necessary to initialize any other process. I just noticed that on my system init isn't running at all. On OS X has launchd entirely replaced init?
Originally Posted By: tacit
On OS X has launchd entirely replaced init?

This is an Apple document (ca. 2005):

EDIT: Hmm, here's a nice link: http://launchd.macosforge.org/post/13/

[but basically the answer is yes, launchd was developed to replace init (and more).]
There are times when I am concerned about whether this Website gets enough traffic, and there are times when I remind myself that quality of content is king.

Thanks for the details about the multiple launchd processes, gangbustein, and for the reference to the apparently no longer online Apple doc, Hal. And thanks to Tacit, without whose efforts none of us would be reading any of this.

I assume that Hal knows how to put phrases into quotation marks in Google, to search for the specified terms as an expression. (If I did not feel comfortable with Hal's skills, my first Terminal session would not have been something he suggested.) The failure to find the entire, original Apple document raises the interesting question of just when Google started to keep cached versions of documents.
Originally Posted By: MicroMatTech3
There are times when I am concerned about whether this Website gets enough traffic, and there are times when I remind myself that quality of content is king.

Thanks for the details about the multiple launchd processes, gangbustein, and for the reference to the apparently no longer online Apple doc, Hal. And thanks to Tacit, without whose efforts none of us would be reading any of this.

I assume that Hal knows how to put phrases into quotation marks in Google, to search for the specified terms as an expression. (If I did not feel comfortable with Hal's skills, my first Terminal session would not have been something he suggested.) The failure to find the entire, original Apple document raises the interesting question of just when Google started to keep cached versions of documents.

[yep, i googled with quotes... but didn't obtain actual "apple.com" results.]

Okay, you got me thinking... so i decided to try the Internet Archive Wayback Machine. I managed to find that their snapshot dated December 3, 2010 was the latest one storing the correct content.

Thus I have edited my first post accordingly. smile

EDIT: rats... now they're saying that the Dec. 3rd snapshot resides on a machine which is down.
Here's a link to the previous (Oct. 15, 2010) version, just in case: Getting Started with launchd

Hal,

Once again, you have made the point about the uniqueness of this Website. The contents of the archive.org version are now in my Yojimbo database. Thank you.
From It Knows:

[1] In 1999, Google’s web index – its copy of every page on the internet – was updated once every three or four months. By 2003 parts of the index were updated once a day, and by 2007 the rate was once every few minutes. By 2009 it was no longer possible to say that the web was being crawled at such and such a speed: if Google considered there was a chance a page might be updated it engineered things such that any change on that page was reflected in its index exactly as it happened. A search for ‘hudson river’ on 15 January 2009 would have showed that a plane had crash-landed on it before it was reported by CNN.
Nice web site!
The London Review of Books is one of the periodicals that some libraries mistakenly cancelled when their budgets were cut.

The article "It Knows" was linked from Arts & Letters Daily, a Website of the Chronicle of Higher Education. It has a wonderful set of links in the left margin.
Originally Posted By: MicroMatTech3
The article "It Knows" was linked from Arts & Letters Daily, a Website of the Chronicle of Higher Education.

Wow! What a great site....a person could spend a lot of time here. Thanks.

ryck
© FineTunedMac