The macosxhints Forums

The macosxhints Forums (http://hintsforums.macworld.com/index.php)
-   System (http://hintsforums.macworld.com/forumdisplay.php?f=4)
-   -   OS X thinks Disk Full - ? (http://hintsforums.macworld.com/showthread.php?t=12989)

eoinrussell 06-25-2003 05:02 PM

OS X thinks Disk Full - ?
 
I'm hoping this is an easy one. Out of the blue on a restart from Classic, OS X seems to think my disk is full. I cannot copy files and apps that write a file on startup all 'unexpectedly quit'. I have plenty of free disk space and have tried logging in as a different user - no luck.

Any ideas?

Thanks.

Gimpy00Wang 06-25-2003 05:07 PM

Are you possibly out of inodes? Do a "df -i" and look at iused and ifree. This is hopefully not the case since you should have millions of inodes (depending on the size of your disk), but it's wortht a check...

- G!mpy

hayne 06-25-2003 05:21 PM

Quote:

Originally posted by Gimpy00Wang
Are you possibly out of inodes? Do a "df -i" and look at iused and ifree.
Before getting to the original poster's problem, I'd like to note that 'df -i' does not do what you think it does. Inodes as they are usually understood in traditional UNIX filesystems do not exist in HFS+ (OS X's default filesystem). See my posting titled "'df -i' output understood" on this thread: http://forums.macosxhints.com/showth...threadid=11940

Now back to the problem.
The use of the 'df' command (without the -i) would indeed give us more info. Please copy and paste back here the results of executing the following command in Terminal:

df /

It might also be a good idea to startup in single-user mode (hold Command + S while restarting) and type 'fsck' at the prompt. Repeat until it says the disk appears to be okay and then type 'reboot'. This checks your disk for problems and fixes them just as Disk Utility does.

eoinrussell 06-25-2003 05:29 PM

ok - I solved the problem. I checked the inodes and whatnot. df / reported that I had no available space. I actualy had about 200 megs. I dumped another 400 megs of stuff and now everything is fine - df / reports available space. This does not make much sense to me but at least I can launch my apps again.

Thanks for the help.

hayne 06-25-2003 05:47 PM

10% buffer
 
Quote:

Originally posted by eoinrussell
df / reported that I had no available space. I actualy had about 200 megs.
How did you determine that you had 200 MB free disk space? I guess you are calculating this from the total size of the disk and the amount you have used. But it is not possible to use 100% of a disk's capacity as explained below.

Note that 'df' subtracts off a 10% buffer zone before reporting "available" space. E.g. if your disk holds 100 GB, and you have used 90 GB, 'df' will report zero space available.
I believe the kernel does not let normal (non-root) users use up more than 90% of the disk. This is a safety measure as the OS needs considerable disk space for its own operations and if the disk were to actually get too full, it would be unrecoverable. So 'df' is just reporting what is truely available for your use.

Beyond the safety issue, disks get increasingly slow as they get filled up. It is unwise to use more than 90% of the disk in OS 9 as well. But I guess the OS 9 system does not prevent you from doing that.

mervTormel 06-25-2003 05:47 PM

uh, you might want to reconsider your "everything's okay" position.

you are definitely on the precipice of more problems.

one should try to keep about 10-20% free space on one's boot partition. breathing room for this OS that is alive until it runs out of, er, breathing room. then all sorts of nasty, monstrous things can happen.

of course, 10-20% of 6GB and 60GB is a wide gap, but obviously, 200MB free begins to approach failure.

[edit: what hayne said. thanx, hayne! -mt]

petey 06-25-2003 06:02 PM

from what i understand...

#1 using an HFS+ partition under any OS with less than 15% free space runs the risk of unrecoverable file system damage.

#2 on a totally different subject, OS X generates swap files. the "Disk Full" message is about the OS worrying it won't have room to write more swap. you can fill a non-boot partition more than 99% full without getting "Disk Full" errors.

eoinrussell 06-25-2003 06:04 PM

wow - I had no idea of any of this. I guess it is time for some summer cleaning...

petey 06-25-2003 06:08 PM

Quote:

Originally posted by mervTormel

one should try to keep about 10-20% free space on one's boot partition.
i'd say you should keep 10-20% free, PLUS whatever room is taken up by swap at peak usage.

djn1 06-25-2003 06:08 PM

It's also worth bearing in mind that the OS X virtual memory system generates swap files which are 76.2MB in size, ... each! My machine has been up for just over two days and I currently have three; i.e. 228.6MB. On occasions, when I've been doing a lot of memory intensive tasks, this has jumped to around 15 to 20 swapfiles; i.e. around 1GB to 1.5GB. In other words, 600MB is hardly any free space at all and 200MB is a miniscule amount - both are, as Merv and hayne indicate, dangerously low amounts. If possible you should seriously consider either replacing your drive or backing some stuff up and deleting it from your drive.

mervTormel 06-25-2003 06:25 PM

Quote:

Originally posted by petey
i'd say you should keep 10-20% free, PLUS whatever room is taken up by swap at peak usage.
implied :D

but, as i said, a percentage of a large partition is larger than said percentage of a smaller partition.

so, the percentage is just a rule of thumb, and true mgt of the issue comes in knowing the characteristics of one's work habits and monitoring RAM and disk space and other metrics while doing heavy lifting.

in fact, it also requires knowing when you're doing heavy lifting. use some kind of monitor on the desktop and get into the habit of eyeballing it while you work so you can get a feel for these metrics and the operations that trigger them.

hayne 06-25-2003 06:28 PM

humorous note
 
I get email notifications about additions to this thread and I have Entourage set up to use a text-to-speech AppleScript to announce the sender & subject of incoming email messages when Entourage is in the background.

I have been reading other postings and coming back to this thread to read activity here. Meanwhile I've noted that Entourage has vocally reported messages about "OS X thinks this cool". I didn't remember a thread of that title and went back to the forums "show new" page and didn't see anything there.

It took me a minute before I realized that the vocal announcement were referring to this thread!

djn1 06-25-2003 06:28 PM

Quote:

Originally posted by mervTormel
use some kind of monitor on the desktop and get into the habit of eyeballing it while you work so you can get a feel for these metrics and the operations that trigger them.
I'd vote for iPulse which gives good visual feedback on RAM usage and page-in/outs (amongst other things).

djn1 06-25-2003 06:33 PM

Re: humorous note
 
Quote:

Originally posted by hayne
I get email notifications about additions to this thread and I have Entourage set up to use a text-to-speech AppleScript to announce the sender & subject of incoming email messages when Entourage is in the background.
Hi hayne, could I snag a copy of your script?

hayne 06-25-2003 06:56 PM

(off topic) AppleScript to announce email messages
 
As requested, here is my AppleScript for Entourage that announces new email messages:
Code:

tell application "Entourage"
        if frontmost then return -- don't announce if Entourage is frontmost
        set selectedMessages to current messages
        repeat with theMessage in selectedMessages
                set theSender to the display name of sender of theMessage
                set theSubject to subject of theMessage
                say "new message from '" & theSender & "'"
                say "Subject: " & theSubject
        end repeat
end tell

There have been several articles on the main MacOSXHints site about this sort of thing - so go search.

djn1 06-25-2003 07:03 PM

Re: (off topic) AppleScript to announce email messages
 
Quote:

Originally posted by hayne
As requested, here is my AppleScript for Entourage that announces new email messages:
Thank you.

mervTormel 06-25-2003 07:22 PM

Quote:

Originally posted by djn1
I'd vote for iPulse which gives good visual feedback on RAM usage and page-in/outs (amongst other things).
iPulse was to modern and blinky/flashy/busy for me.

i use Flame, over top of Memory Monitor, over top of Load Monitor in a 128x128 stamp in the bottom right corner, translucent so the metrics shine thru. it's been a real handy and delightful meter that catches yer eye when the rig starts to grunt.

they've been NSUIelement'd to 1 so they take no dock slots :D

djn1 06-25-2003 07:29 PM

Quote:

Originally posted by mervTormel
i use Flame, over top of Memory Monitor, over top of Load Monitor in a 128x128 stamp in the bottom right corner, translucent so the metrics shine thru. it's been a real handy and delightful meter that catches yer eye when the rig starts to grunt.
Thanks for those Merv. Incidentally, the site for Load Monitor seems to have dissapeared.

mervTormel 06-25-2003 07:34 PM

flame, too.

if you want them, i'll zip 'em up and post them.

djn1 06-25-2003 07:37 PM

I managed to get Flame from here (a few minutes ago):

http://www.matthewdrayton.com/flame/index.html

... but I would like to try Load Monitor if you don't mind posting it.

mervTormel 06-25-2003 07:45 PM

Quote:

Originally posted by djn1
... but I would like to try Load Monitor if you don't mind posting it.
email sent

djn1 06-25-2003 08:06 PM

Quote:

Originally posted by mervTormel
email sent
Thanks, I can see why the combination would appeal, but I think I'll stick with iPulse, i) because it produces less drag on my system, and ii) because I like 'modern and blinky/flashy/busy' ;) Incidentally, if you set a refresh rate of around one second it isn't too obtrusive.

Gimpy00Wang 06-25-2003 10:04 PM

Quote:

Originally posted by mervTormel
flame, too.

if you want them, i'll zip 'em up and post them.
Could you please...

- G!mpy

mervTormel 06-25-2003 10:08 PM

gimp, which one?

http://www.matthewdrayton.com/flame/index.html

Gimpy00Wang 06-25-2003 10:14 PM

Quote:

Originally posted by mervTormel
gimp, which one?

http://www.matthewdrayton.com/flame/index.html
I just grabbed Flame and Memory Monitor, but I can't find a link to Load Monitor. You have a URL? :)

- G!mpy

mervTormel 06-25-2003 10:22 PM

gimp, sent you a PM

yellow 06-26-2003 10:08 AM

Flame doesn't seem to work.. at least, if it's supposed to monitor system load, you'd think it would 'get hotter' using something like SETI@Home which uses all available CPU cycles.. Or are we talking serious load something in the 8-10 range for white hot?

*grin* It didn't even change colors when I opened every app in my Dock at once. (Which sent the prebinder into a tizzy!)

Bummer, 'cause it looks pretty cool!

hayne 06-28-2003 12:40 AM

correction (Re: 10% buffer)
 
Quote:

Originally posted by hayne
Note that 'df' subtracts off a 10% buffer zone before reporting "available" space. E.g. if your disk holds 100 GB, and you have used 90 GB, 'df' will report zero space available.
I believe the kernel does not let normal (non-root) users use up more than 90% of the disk.
I must issue a correction on what I said above.
I believe that what I had said was historically true for UNIX, but I have just looked at the source code for OS X's HFS file system and, although the basic idea of what I had said is true, the percentage is wrong by a factor of 10 - it is a 1% reserve, not a 10%.

The source file hfs/hfs.h ( http://www.opensource.apple.com/darw.../bsd/hfs/hfs.h ) has the following defined constants:
Code:

/*
 * HFS_MINFREE gives the minimum acceptable percentage
 * of file system blocks which may be free (but this
 * minimum will never exceed HFS_MAXRESERVE bytes). If
 * the free block count drops below this level only the
 * superuser may continue to allocate blocks.
 */
#define HFS_MINFREE            1
#define HFS_MAXRESERVE          (u_int64_t)(250*1024*1024)

So the amount of disk space that is reserved by the kernel (unavailable except to the root user) is 1% of the disk, up to a maximum of 250 megabytes.

Sorry for the incorrect information (with 10%) that I had posted earlier.

mervTormel 06-28-2003 12:50 AM

heh
 
so, that's why all my math came out to almost the size of one swapfile on my 7.0GB root partition.

was driving me quite mad, really.

thanx, hayne.

malvolio 06-29-2003 01:14 AM

Quote:

Originally posted by djn1
It's also worth bearing in mind that the OS X virtual memory system generates swap files which are 76.2MB in size, ... each! My machine has been up for just over two days and I currently have three; i.e. 228.6MB. On occasions, when I've been doing a lot of memory intensive tasks, this has jumped to around 15 to 20 swapfiles; i.e. around 1GB to 1.5GB.
This is why I set up a dedicated swapfile partition. :D

djn1 07-01-2003 04:00 PM

Quote:

Originally posted by mervTormel
flame, too.

if you want them, i'll zip 'em up and post them.
hi Merv, is there any chance of another copy of load monitor? I reinstalled over the w/end and seem to have misplaced it :(

mervTormel 07-01-2003 05:51 PM

Quote:

Originally posted by djn1
is there any chance...
on the wire.

djn1 07-01-2003 06:07 PM

Quote:

Originally posted by mervTormel
on the wire.
Marvellous, thanks :D


All times are GMT -5. The time now is 06:29 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.