Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: warning: /etc/fstab doesn't do what you think



At 10:52 AM +0200 6/28/01, Jayce Piel wrote:
>On mercredi, juin 27, 2001, at 09:00 , Peter Bierman wrote:
>
>> I've seen a bunch of messages here lately that describe using
>> /etc/fstab to mount volumes at boot.
>>
>> You don't want to use /etc/fstab on darwin.
>>
>> Drives are detected and mounted asychronously, which means that the
>> same physical disk might be assigned a different /dev/diskN node
>> depending on how quickly other devices respond to bus probing.
>>
>> Put simply, /dev/disk2s5 for example, might not be the same partition
>> two boots in a row. It usually will be, but isn't required to be.
>>
>>
>> If you want to put your VM files on a dedicated partition, reorder the
>> startup items dependencies so that VM is started after volumes are
>> mounted. Have VM specify the swapfiles by the full path
>> /Volumes/somedisk/somewhere.
>
>It seems to not be in startup items dependencies, but in /etc/rc... And
>the problem is bigger than that...
>Because if we launch SystemStarter before launching dynamix_pager, all
>startup services will launch before swap is activated, and if there is
>not enough RAM, it could be buggy...
>The best way is then to create a StartupItem for dynamic_pager and play
>with dependencies...


This was just discussed on the darwin-dev list. Automounter will eventually have a facility for doing what fstab does. There's really no other way to deal with it when you consider USB and FireWire disks, which have no constant physical location.

As for using StartupItems, indeed, the best fix would be to move the dynamic_pager start into a StartupItem, and make it the very first one. Then play with moving the local volume mounts to happen before it.

Yes, this means that VM is off when you start SystemStarter. That's not as bad as you might think. Assuming any machine getting that far has at least 64MB (or even 32), it's unlikely that you'll run out of real RAM before you get VM on.

For example, when you run the Mac OS X Installer from the CD, it doesn't turn on VM until you actually start an install on some particular disk, because it doesn't know where to put the swapfiles until then. That's a lot more happening than just SystemStarter.

Toss a vm_stat in various points of system startup to see how much is still free. Turning on VM doesn't change the free RAM, it only adds a backing store for when you run out.

-pmb


References: 
 >warning: /etc/fstab doesn't do what you think (From: Peter Bierman <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.