MacOS size weirdness

Keary Suska yellowdog-general@lists.terrasoftsolutions.com
Mon Jul 15 10:45:06 2002


on 7/14/02 10:31 PM, astout2@swarthmore.edu purportedly said:

> Forgive me for belaboring this point...
> The block size explanation makes sense to me, except for one thing.
> The weirdness isn't so much that my system folder takes up different
> space on different volumes, it's that it's not telling me the space it's
> actually taking up.  Here's the info:
> on 1.0Gb HFS standard volume, get info tells me 252.5 MB on disk
> (224,735,017 bytes)
> on 5.0Gb HFS standard volume, get info tells me 431.2 MB on disk
> (224,735,017 bytes)
> But the space that's actually being taken up by data + wasted space on
> the 1.0 Gb volume is 431.2 Mb.  The 1.0Gb volume should have a
> smaller block size, and thus less wasted space--the "252.5 MB on disk"
> reflects that, but the effective disk usage (as reported by get info on the
> 1.0 Gb volume icon, or by trying to put something else big on that
> volume) suggests that the block size(=>wasted space => effective disk
> usage) is larger.
> Can someone explain this?  Is there a way I can get the number I'm
> actually interested in (effective disk usage) on the 1.0 Gb volume without
> such experimentation?

Based on submitted information, I can reliably state that the max block
count is an unsigned 2-byte integer, or 65,536 blocks. Thus the block size
on a 1g drive 16k, and 80k (!) on a 5g drive. So you can see that the
"wasted" space builds almost exponentially. That is likely the reason for
the great discrepancy, especially if you have a large number of small files
(<80k on 5g drive).

In any case, what is reported "on disk" is (most likely) the true disk
usage. However, because of block size issues, it can be tricky to determine
how much more data will fit on the file as it is directly related to the
size of each file.

> More to the point:  the motivation behind all this is that I want to partition
> my 20Gb hard drive so that I have some partitions for Linux and some
> for Mac, but I want the Linux side to be able to read the Mac
> partitions--so really, those are shared partitions.  Some of these
> partitions might be 5.0Gb, for which HFS isn't particularly well suited due
> to the block size issue--even, I understand it, if what I'm putting on it is,
> say, mp3s.  But Linux can't read HFS+, right?  Suggestions?

HFS+ can be mounted read-only in Linux, but I don't think it can be accessed
by other than the HFSplus utilities. HFS can be mounted read/write, and I am
pretty sure that there is kernel support so any filesystem I/O call should
be able to access it. If you don't need write access from the Linux side, I
recommend HFS+. Keep in mind though that there is more than one way to
exchange files between Mac and Linux.

> And a tangentially related question:  if I've got a dual-boot MacOS 9.1
> and YDL, can I run that MacOS 'system' via MOL from the linux side (that
> is, can I tell MOL "use this system folder on this volume here"), or does
> MOL maintain its own virtual hard disk in its own format, unbootable
> outside of MOL?

MOL must have a bootable Mac partition, and will use whichever one you
specify. The newest MOL has some auto-configure functionality, but I don't
know if that goes further than networking.

Keary Suska
Esoteritech, Inc.
"Leveraging Open Source for a better Internet"