Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Partitioned OS X installation with seperate swap partition..... UNIX
I'm not going to get into a battle of whether or not to partition an OS X installation. I found partitioning useful, but found very little information on how to do it. So here it goes.

The overall goal of this article is how to properly do a partitioned install on OS X. I will be the first to admit that I'm a new OS X user, but I've been a FreeBSD user for quite sometime. I even tried using all of the hints on macosxhints.com and none of them ever completely worked.

Using the other hints, if you booted your system in verbose mode and watched the log on the screen, the partitions were never mounted properly by the BSD subsystem. Granted OS X has some failsafe procedures and these partitions ended up being mounted anyways, but it caused me nothing but problems down the road. Here is what I came to find out. Without properly mounting the partitions at bootup, your Applications and Users partitions get mounted under /Volumes instead of under /. This can cause some serious problems when a program starts traversing your directory structure and doesn't find those two folders where it expects to find them. When I started installing applications it just started dumping them in the root of my system drive instead of under the Applications partition like I wanted.

I saw plenty of people who were talking about using BSD symbolic links to fix this, but that really is more of a band-aid than an actual fix. The instructions on how to partition this install are pretty much the same as the other posts, but the key here is the modifications made to the fstab file. Simply using the Label=partitionnamehere option doesn't work. What my trick does is it makes the file system look identical to a single partition (according to the OS, that is), even though you actually have multiple partitions setup.

Please remember to backup before proceeding!

Start the OS X installation by booting off of your system restore CD. Once you are at the welcome screen, click installer and then click on Disk Utility. The disk utility will open up and allow you to view your drives and their current status. Select the drive that you wish to partition and then click on the partition button. Choose a partition scheme that will work for you. Please remember to leave plenty of space on each partition for expansion, as this cannot be easily undone later.

On my installation, I chose to create four partitions. One for the system files, one for the Applications directory, one for the Users directory, and one as a swap/scratch partition for OS X and Adobe applications. I recommend setting your swap partition to 1 gig. Anything more than that is wasteful unless you have some huge Photoshop projects. Make sure you set the swap partition to UFS instead of HFS+. UFS is far less prone to fragmentation. A fragmented swap file defeats the hole purpose of a separate partition.

I chose 6 gigs for my System partition, 10 gigs for my Applications partition, 1 gig for swap, and the rest of my drive for the Users partition. The user partition is bigger because I store most of my files in my home directory. Once you have selected your partition layout, click the Partition button. The Disk Utility will partition the drive and then format all of the partitions. Once this process has been completed, you can drop back out to the installer and continue the OS installation.

Once you have OS X up and running, you need to open up terminal and run some commands to prepare our partitions to be used by the OS. First we need to duplicate the Users and Applications folders to their respective partitions. At the command prompt run the following commands:
$ sudo ditto -v -rsrcFork /Applications /Volumes/Applications 
$ sudo ditto -v -rsrcFork /Users /Volumes/Users
Once this operation has completed, we need to update our system to attach the new partitions as usable file systems for OS X. We do this by editing fstab under /etc. To do this, you must first find the unix label for the partitions. Do this by typing the following:
$ df –k
This will print out a partition list and their relative mount points. You are looking for something like the following:
/dev/disk0s7   7208960   4882716   2326244   68%  /Volumes/Applications
/dev/disk0s9   23529816  3279444  20250372   14%  /Volumes/Users
The important part of this is the /dev/disk0s7. ***NOTE*** Your label will vary. Write down the unique numbers after the /dev/disk portion to get the correct partition location for your system. We will use this later. Now it's time to update fstab to modify how OS X mounts and uses the partitions. Do this by typing the following:
$ sudo pico –w /etc/fstab
This will open pico, a unix text editor, and load the fstab file. At the end of this file type the following in:
/dev/disk0s3 /Volumes/swap ufs rw 1 2
/dev/disk0s7 /Applications hfs rw 1 2
/dev/disk0s9 /Users hfs rw 1 2
Please change the information above to match what we wrote down earlier. The UFS and HFS parts make a difference, too. You need to set these to whatever you chose to format the partition during installation. (Notice how swap is set to ufs, or the Unix Filing System). Once you have typed this in, press control-O to save the file, and then Control-X to exit pico. Now we will load the fstab info into netinfo:
$ sudo niload -m fstab / < /etc/fstab
Once this has been completed, you are finished with this portion of the work. Now we must load OS X into single user mode to properly create placeholders for the partitions. Do this by restarting your computer and holding down Command-S immediately after the chime. You will see some unix code fly by, and then you will be dumped to a unix prompt. Now it's time to make OS X behave the way we want it to. Check the file systems by typing the following:
$ /sbin/fsck –y
Now mount the root partition in read/write mode:
$ /sbin/mount –uw /
Move the Applications and Users directory to alternate directories as a backup in case something goes wrong:
$ mv /Applications /Applications-old
$ mv /Users /Users-old
Now create empty directories for to use as placeholders to mount our partitions into:
$ mkdir Users
$ mkdir Applications
Now let's set the appropriate permissions for the directories:
$ chmod 755 Users
$ chmod 755 Applications
Now we will reboot the computer and watch the startup to make sure there are no errors. Do this by typing the following:
$ reboot
When your computer chimes, hold down the Command-V keys. This will print the verbose logging to the screen. Look for the following:
/dev/disk0s7    /Applications  (local, journaled)
/dev/disk0s9    /Users		(local, journaled)
If you see something similar to above, you've done it! You now have a partitioned system that keeps your User, System, and Applications files separate. This is especially useful for system crashes. You can simply reload OS X and follow the instructions above (minus the ditto commands) and keep your Applications and User files intact. Now let's finish moving the swap file. Open up terminal again and type the following:
$ sudo pico –w /etc/rc
Now let's search for the correct line. Type control-W and type swapdir in the search field. This will bring you to a spot in the file with the following information:
echo "Starting virtual memory"
swapdir=/private/var/vm
Comment the swapdir out by putting a # sign in front of it so it looks like this:
#swapdir=/private/var/vm
Now type the following below the commented line:
swapdir=/Volumes/swap/vm
So now the file should look something like this:

echo "Starting virtual memory"
#swapdir=/private/var/vm
swapdir=/Volumes/swap/vm
Type Control-O to save and Control-X to exit. Restart the system. Once it has been rebooted, verify that your swap file has been moved by openeing the swap drive, opening the vm folder, and verifying that a file called swapfile0 exists. If it does, you're all done! If it doesn't, go back and check for mistakes.
    •    
  • Currently 3.50 / 5
  You rated: 4 / 5 (6 votes cast)
 
[69,642 views]  

Partitioned OS X installation with seperate swap partition..... | 37 comments | Create New Account
Click here to return to the 'Partitioned OS X installation with seperate swap partition.....' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Size of the swap partition
Authored by: hamarkus on Aug 09, '04 12:55:46PM

According to Activity Monitor, I currently have a VM size of 12GB, this usually hoovers around 10GB, depending on how many big programms I have open. If I use a lot of memory in one application (e.g. 15 tabs in Mozilla, big InDesign project) all of the palettes of e.g. the Adobe programms get pushed out of real memory into the VM part and it takes several seconds to load them again when you switch to these programms.

Shouldn't therefore a really big scratch partition (~10GB) be a better choice?
(1GB RAM, 2.5" 60GB)



[ Reply to This | # ]
Leave space for burning
Authored by: gw on Aug 09, '04 01:43:00PM

If you do partition, note that DVD and CD burning within OSX/Finder rely on spare space on the boot/system partition - so a System size of 6GB may let you run your system but not burn a DVD.

Of course if you don't have a DVD burner it's irrelevant.

I use 10GB system and it works well, I have most applications there too, although a couple of bigger apps (iDVD) are on another partition.

---
----
"I only conceptualize, everything else is hardware."
Prof. L.B. Wilson



[ Reply to This | # ]
Size of the swap partition
Authored by: aramis on Aug 09, '04 02:00:02PM

My understanding of the VM Size is that it includes all shared libraries as well as any memory mapped IO.

Even though a shared library is only loaded into physical memory once (physical being either chips or in swap files), each process gets its own virtual copy of the library mapped into its own space. If 20 processes all load the same 1MB shared library, then the total VM size for all those processes will go up by 20MB. The actual physical memory you use (chips plus swap) will only go up by 1MB, though.

Likewise, if you have a 500MB file memory mapped, the VM size goes up by 500MB, but the actual physical memory goes up by zero since the file is still stored on disk and not actually loaded into memory (not counting disk cache, which is a whole different story).



[ Reply to This | # ]
Size of the swap partition
Authored by: hamarkus on Aug 09, '04 03:46:03PM

Thanks for the info, I always get nervous when the VM size reaches twice the free disk space...



[ Reply to This | # ]
Size of the swap partition
Authored by: folkert on Aug 09, '04 03:13:00PM
i am too lazy to write up a full hint, but since the original poster mentioned a swap partition of one gigabyte...

i also chose a 1GB swap partition, only to find that the dynamic_pager does not make the most efficient use of it with default settings. dynamic_pager seems to have two modes of allocating new virtual memory, one where it doubles the size of the new swapfile with each file, and one where the size of the swapfile is fixed. now, with a one gig partition and a variable swapfile size, the following happpened: dynamic_pager happily created pages when needed, but, after a little over .75GB of VM where in use, refused to create a new swapfile because the size of the new file was slightly larger than the remaining space. the answer i found for my system was to start dynamic_pager with parameters
dynamic_pager -F ${swapdir}/swapfile -S 67108864 -H 33554432 -L 134217728

where -S means 'create swapfiles with a size of 64MB', -H 33554432 means 'create a new file when less than 32MB of free swapfile memory available' and -L 134217728 means 'discard a swapfile if more than 128MB of swapfile memory are unused'.

of course, the actual sizes i chose could be rather braindead. for further reading, try man dynamic_pager.
cheers,
-folkert.

---
$ hexdump /mach_kernel|head -1
0000000 feed face 0000 0012 0000 0000 0000 0002


[ Reply to This | # ]

Size of the swap partition
Authored by: sjk on Aug 12, '04 02:11:19PM
See huge swap files in 10.3.4 ?? on Apple Discussions for more about that topic.

[ Reply to This | # ]
Swap partition size
Authored by: Pedro Estarque on Aug 09, '04 03:07:37PM

The swap partition size depends on the amount of RAM you have installed, and the OSX version you use. 10.3 is much more swap hungry. Until 10.2 swap files were created in 80 MB each. They must have a new algorithm now as swap files are created like this:
swapfile0 64 MB
swapfile1 64 MB
swapfile2 128 MB
swapfile3 256 MB
swapfile4 512 MB

But they never exceed twice the amount of RAM you have.
For example: I have 768 MB of RAM, so I will never have a swapfile5 as it would be 1GB in size and the total would be 2 GB, more then 1536 which is the double.
I don't think UFS would be better then HFS+ cause if you only use the partition for swap, there is no fragmentation at all, as file sizes and order of creation are always the same.



[ Reply to This | # ]
Swap partition size
Authored by: folkert on Aug 09, '04 03:19:15PM
swapfile0 64 MB
swapfile1 64 MB
swapfile2 128 MB
swapfile3 256 MB
swapfile4 512 MB
see my post in the other thread, this kind of pattern will use only 64+64+128+256 == 512MB on a one gig swap partition since the 512MB chunk will likely require just a little too much space. -folkert.

---
$ hexdump /mach_kernel|head -1
0000000 feed face 0000 0012 0000 0000 0000 0002


[ Reply to This | # ]

Swap partition size
Authored by: RiotNrrrd on Aug 10, '04 03:58:10AM
$ hexdump /mach_kernel|head -1
0000000 feed face 0000 0012 0000 0000 0000 0002
"hexdump -n 4 /mach_kernel" is much cleaner. :)

As for the main thread, use Swap_Relocator: here

Ignore all the n00b comments that claim it doesn't work in 10.3.x. It does.

[ Reply to This | # ]
Swap partition size
Authored by: jalbrecht2000 on Aug 09, '04 04:14:17PM

The reason I opted for UFS over HFS+ was overhead. There is no need for a journaling file system on your swap partition. Journaling your swap file system will only hinder a systems performance. If the system were to crash there is no reason to have the swap journaled for recovery.

This coupled with the lack of fragmentation on UFS and a little research swayed me to use UFS instead. However either way will work.

---
__________
Justin



[ Reply to This | # ]
Swap partition size
Authored by: Anonymous on Aug 11, '04 08:53:44AM

You can turn HFS journalling off, which I do. And the comment about fragmentation not being a problem on a swap partition is still relevant. If you're smart and put nothing else on that partition, it essentially gets cleaned out each time you reboot.

Further, 1 GB swap is foolishly, dangerously low for a MacOS X install. I have 1 GB of installed RAM, and I -regularly- get over 2GB of swapfiles dropped on my disk. My personal "high-water" mark for my usage is 4 GB of swap files, and so I made my partition 6 GB. It is always safer to be a little generous, since MacOS X behaves very poorly when it starts running out of swap space. In the days of 10.1, you could panic your machine. Panther seems to be a bit more tolerant, but odd errors will occur.



[ Reply to This | # ]
Swap partition size
Authored by: lerici on Jun 24, '07 07:42:19PM

I agree with Justin's statement.

UFS IS going to be SAFER for any partition where there are a lot of dynamic changes ... such as spool swap and tmp. Just for the reasons he gave.

In order to achieve "higher performance" hfs+ apparently gives up a great deal of stability. As as has been shown in some of the recent algorithms tomes the larger the tree the less it matters whether it is "organized" a certain way or not. In point of fact the more random it is "layered" the better. So as partitions grow in size becoming huge it may be that the performance gains achieved with hfs will become less and less.

Bottom line: Random good, complex trees may be bad.



[ Reply to This | # ]
Swap partition size
Authored by: timcrawf on Aug 09, '04 04:34:38PM

Are you ure this is a Rule? I have an original 12" alBook with ony 640 MB of RAM and I typically get (this is not from my system right now, as I rebooted this morning and it has not gone this high yet)
swapfile0 64 MB
swapfile1 64 MB
swapfile2 128 MB
swapfile3 256 MB
swapfile4 512 MB
swapfile5 512 MB

for a total of 1.5 GB
This can occur in 3 day, or it might take 10, but if I don't reboot for some reason or another, It wil get this big



[ Reply to This | # ]
Swap partition size
Authored by: jalbrecht2000 on Aug 09, '04 05:25:07PM

There are a ton of debates on how big a swap partition should be. The overwhelming majority in the BSD community (and one that I've always used on my servers) is to make the swap twice the size of available RAM. Your mileage may vary....

---
__________
Justin



[ Reply to This | # ]
Swap partition size
Authored by: VernerEgon on Aug 10, '04 01:17:43PM
Pedro Estarque wrote:
swapfile0 64 MB
swapfile1 64 MB
swapfile2 128 MB
swapfile3 256 MB
swapfile4 512 MB

But they never exceed twice the amount of RAM you have. For example: I have 768 MB of RAM, so I will never have a swapfile5 as it would be 1GB in size and the total would be 2 GB, more then 1536 which is the double.

I am afraid that this is nonsense. I have often had more than twice the size swapfiles than my RAM - and I even have a GB in my PB, and I cannot understand why it should not exceed that when your open applications need more memory than what you have.
I even think that limiting a swap space to less than 3-5 GB, no matter what size your physical RAM is at, will lead you into trouble sometime.
Having had an iBook with about 1-1.5 GB left on the harddisk and 320 MB RAM, it often occured to me that there was no more space on the harddisk because of swapfiles. Had I only had 640 MB on a separate swap partition, my iBook would have crashed constantly.
My advice is not to trust old *nix-rules of the thumb. Hell, even on my AIX at work, we upped the VM to 20 GB at one time even though we only had 8 GB of physical memory back then. But using Smitty that is of course no big deal...

OSX is quite a different animal than what old BSD- and *nix-folks here seem to be used to. It certainly does not stop at twice the size of RAM.



[ Reply to This | # ]
Swap partition size only 2X - wrong!
Authored by: zahadum on Feb 26, '06 05:41:18AM

not true at all!

take a look at activity monitor!

tiger (and i am almost certainabout panther too) will easily chomp through 4GB or 5GB of VM under heavy loads (snowG3 640MB).

making definitive statements like this - that are just plain wrong - do a diservice to less experienced readers.

---
mailto:osxinfo _at_ yahoo.ca



[ Reply to This | # ]
Partitioned OS X installation with seperate swap partition.....
Authored by: adriaant on Aug 09, '04 06:35:10PM
How is this new? Everything in this hint is taken from older hints on osxhints and from http://kung-foo.tv/xtips.php.

I don't mind a rehash, but "found very little information no how to do it" is bollocks:
Partitioned OS X installation with seperate swap partition.....
Authored by: vdubjetta2001 on Aug 09, '04 07:28:27PM

Please have a little patience for those of us who aren't BSD gurus and haven't been using it for eons.



[ Reply to This | # ]
Partitioned OS X installation with seperate swap partition.....
Authored by: discordantus on Aug 10, '04 11:30:57AM

two things:
- afaik, using the device (/dev/disk#s#) file in the fstab hasn't been mentioned here before. so that's new on it's own.
- having the whole process laid out like that is new too.I imagine it will be very helpful for those who are trying to dig up the whole enchilada on installing OS X on a partitioned setup.



[ Reply to This | # ]
Partitioned OS X installation with seperate swap partition.....
Authored by: EatingPie on Aug 11, '04 02:39:10PM

Yes, this HAS been explained AND spelled out.

<http://www.macosxhints.com/article.php?story=20031104150206554>

The only part that's not in the actual text of the hint has to do with the fstab, but if you read the comments, it's there.

-Pie

---
-Pie
<http://www.storybytes.com>



[ Reply to This | # ]
Partitioned OS X installation with seperate swap partition.....
Authored by: jalbrecht2000 on Feb 16, '05 12:28:34PM

What I meant by "very little information" was that nothing was very well formatted or put together. After pulling info from about 5 different sources, I was able to figure it out.

Coming from the support realm, I just wasn't satisifed with the bits and pieces that were spread here and there.

---
__________
Justin



[ Reply to This | # ]
This scheme won't work all of the time...
Authored by: TigerKR on Aug 10, '04 01:51:45AM

This hint will only work for single disk setups. If you have multiple disks, especially across multiple busses, then the disk numbering order won't necessarily be the same after every reboot.

For instance, what's now listed on my system (using df -k) as disk4s10 - might be disk6s10 on the next reboot (this is because I have 8 drives on 3 busses). This will (and has) caused a world of trouble as directories and files will not be where they are expected to be in your fstab file.

Please see the following link for reference and scroll down to the bottom to read my post: http://www.macosxhints.com/article.php?story=20031104150206554



[ Reply to This | # ]
Some corrections and hints
Authored by: morphis on Aug 10, '04 10:56:29AM

You don't need to use

sudo niload -m fstab / < /etc/fstab

In Panther just editing the fstab works fine.

And do use /dev/disk#s## use UUID's as per
Create a more dynamic fstab using UUIDs

Also to fsck a journaled disk use /sbin/fsck –yf

And when using chmod

chmod 1775 Users
chmod 775 Applications

I have done many installations like this (thow I don't usually bother with the swap)
I will be making available on my dot mac account some scripts and tips I use when installing panther HERE



[ Reply to This | # ]
Some corrections and hints
Authored by: discordantus on Aug 10, '04 11:20:46AM

I can't seem to get the whole uuid thing working half of the time. This seems like the best solution to me, if uuid's are going to be this finicky.



[ Reply to This | # ]
Some corrections and hints
Authored by: steveo on Aug 10, '04 12:59:24PM

You can easily find your UUID's from the system log. After
you have made your partitions and restart(so they mount),
just grep for them in the syslog.

fgrep -i diskarbitrationd /var/log/system.log

that should get you what you're looking for



[ Reply to This | # ]
Some corrections and hints
Authored by: morphis on Aug 16, '04 07:59:11AM
Also if your disk was formated using the Disk Utility you Don't need to run

/System/Library/Filesystems/hfs.fs/hfs.util -s

Since A UUID is already set by Disk Utility

[ Reply to This | # ]
Partitioned OS X installation with seperate swap partition.....
Authored by: skell on Aug 10, '04 05:52:55PM

There always

iPartition
http://www.coriolis-systems.com/index.php



[ Reply to This | # ]
Do Not Move Your Swap!!
Authored by: EatingPie on Aug 11, '04 03:05:29PM

I authored the previous hint on the swap, and thoroughly tested it, including comments covering the fstab entry.

<http://www.macosxhints.com/article.php?story=20031104150206554>

If you force-reboot, this fstab method may not allow your swap partition to mount. Changing the /etc/rc file was the ONLY method I used that worked through force-reboot or kernel panic.

Secondly...

I DO NOT RECOMMEND MOVING SWAP ON PANTHER!

Unless, of course, you're willing to give up a huge chunk of space. With 1GB of RAM, after starting several apps (8-10, including Photoshop), I overflowed my swap partition and destroyed. OSX does recover this after a number of reboots and fscks (using the method outlined in my hint anyway :) ). But it invariably happens again.

You need at least a 10GB partition for swap with 1GB of RAM. That's *at least*. Even if your swap files do not show being very large, something is still going on that you're not seeing... and that can toast your partition.

This does not apply to Jaguar, which as has been pointed out, was far more swap friendly.

-Pie

---
-Pie
<http://www.storybytes.com>



[ Reply to This | # ]
Do Not Move Your Swap!!
Authored by: Rojer on Aug 25, '04 06:02:04PM

Hello Forum:

I read the discussion here and at the Apple forum.
Maybe we must take a look how OSX manages virtual memory.
Good reading at:

http://developer.apple.com/documentation/Performance/Conceptual/ManagingMemory/Concepts/AboutMemory.html

QUOTE:

Note: Unlike most UNIX-based operating systems, Mac OS X does not use a preallocated swap partition for virtual memory. Instead, it uses all of the available space on the machine's boot partition.

ENDQUOTE
Conclusion: use of virtual memory space is more or less independent of RAM size.

So the larger the boot partition maybe the better!

I am now retired and used to program real-time stuff at Estel (steel factory and blast furnaces) in Holland.

What we did was writing application programs to avoid paging.
Usually we made subroutines (e.g. I/O ) core-resident (loaded and fixed in core memory) to avoid using the library on the hard disk.
This reduces use of virtual memory and swapping.
Another consideration is the size of installed RAM in the computer.
More RAM less swapping.

Then came the tuning of your system to give priority to applications
of the system. An application with a high priority will run longer
than others with a lower priority.

I did not study the use of priority in OSX.
Maybe it is good not to let many applications run together because there is competition for resources.

So that is my first post!
Frank





[ Reply to This | # ]
Why UNIX partitions exist ....
Authored by: lerici on Jun 24, '07 07:33:55PM

I found your note about the use of swap partitions interesting ...

yet ...

Having used UNIX systems for nigh on 25 years + ...
I would ask you the following:

1. Do you think its secure to have constantly changing, dynamic data
on the same partition as your "crown jewels"? The static root files, your
root partition's vm kernel, critical shared libraries and applications?

2. Ask yourself given the nature of the beast (i.e. hard disks) if this
is a safe thing to do? Have this dynamic area on the same partition with
your critical user specific data as well? VM unix and root entities are easily recreated from install disks ... separate from the security issues.

3. Do you trust HFS+ journaled case sensitive or insensitive file systems? I sure don't.

So ... that said one should at least put the User directory on a separate partition. If you have enough expertise so should /private/var. /tmp should be linked to /var/tmp on that separate partition. Finally swap should live separately allowing the root entities, the "crown jewels" to
remain reasonably static. You should also try to use UFS partitions where and when you can.

Finally think about what you said ... that VM swap uses all the rest of the free space on the volume ... do you think that is safe? Make a swap partition at least 2-3X times the size of your physical memory. Better safe than sorry ... especially if you own a macbook or powerbook.



[ Reply to This | # ]
OS X Partitions: UFS vs. HFS+
Authored by: lerici on Jun 27, '07 02:26:56PM

The problem with the single partitions assumption it appears to fail to take into account Mac OS X virtual memory system. It takes advantage
of empty space on the single partition most users have for paging activities. This is very similar to what Apollo Domain/IX used to
do. IN fact the empty regions of the disk were used to turn the entire network of nodes into a sort of VM area. Access to remote
node's disks would it to be mapped to the local node's VM area. Very, very "kewl" for 1980's technology. Fairly object oriented
as well.

What happens when the disk becomes full of files? Wouldn't it then begin to slow down? The bottom line on this sort of VM
system is that you can really only use 80% of the disk before performance degradation, and perhaps even failure might occur.

Thus making the use of non-fragmenting UFS file system enticing.

A better "disk utility" would take full advantage of UFS file systems and the inherent tuning associated with them. Perhaps it would
create special small partitions for swap and /private/var. Var means VARIABLE and thus constantly changing. The same would
be even truer for the swap / paging area. Swap may be a misnomer as paging of small blocks occurs. Actually swapping the entire
physical memory out could possibly occur through the use of very large applications and associated data files. Its hard to know
when the memory management algorithms would decide to do this.

Reliability is an issue. HFS+ file systems can be fragile and easily corrupted when they become full because of the way they
are organized. And the performance in the age of large file systems, many, many small files plus large files does not appear
to be significantly better than UFS.

IN my humble opinion the only way to take full advantage of Mac OS X incorporating both performance AND reliability would be
to judiciously mix and match HFS+ journaling (case sensitive preferably) with the fast Berkeley fast file system.

Plus smaller partitions take less time to defrag. And to backup. One can alter the rc scripts to take advantage of hfs_fsck and fsck to prune and repair the file systems between reboots. I have found that this makes the use of utilities such as Disk Warrior less frequent. For UFS file systems they aren't required at all.

One could also assume that striping across file systems would be safer using UFS as opposed to HFS+.

Disk utilities NEED to TAKE advantage of UFS particularly with advent of technologies like XSan on the server side. I believe
that someone should study this issue. Since the issue of NIH is a deal breaker within Apple it would be best done through
a research grant to some University such as Berkeley or Carnegie Melon.

- Peter Brewer



[ Reply to This | # ]
Partitioned OS X installation with seperate swap partition.....
Authored by: notmuch on Aug 14, '04 03:16:15PM

Excellent walk through. I have been wanting to do this for a while and following this article everything went smoothly. I think this is a pretty good partitioned setup to have. Nice work jalbrecht2000.



[ Reply to This | # ]
Partitioned OS X installation with seperate swap partition.....
Authored by: scd1973 on Aug 08, '06 09:06:50AM

Has anyone tried this on an Intel based Mac? I have an Intel imac running OS X 10.4.7.



[ Reply to This | # ]
Partitioned OS X installation with seperate swap partition.....
Authored by: Digifreak on Oct 07, '07 01:22:00AM

Thanks for the walkthrough.

It all works like a charm, or so I thought. Applications, Users & swap, all in place - all recognised.

Then I restart the machine, and find that my User folders has been replicated back onto y system folder and OSx is pointing to it - ignoring the pervious set up.

I've tried this three times now. Could it be that recent updates to the OS have meant this technique on longer works?

Any help appreciated.



[ Reply to This | # ]
Partitioned OS X installation with seperate swap partition.....
Authored by: vincentvw on Oct 29, '07 12:26:10PM

So will this (or any other partition-hint) work when upgrading to Leopard. I have separate partitions for my system, application, swap, and user-files and am wondering whether it will stay that way when I do an upgrade…



[ Reply to This | # ]
Partitioned OS X installation with seperate swap partition.....
Authored by: robackja on Feb 12, '09 08:29:54AM

User doing this (only using $ sudo vifs to edit fstab instead), everything worked, but the Finder fails to show /Appications or Applications in the sidebar. It shows my Applications as another volume, even though its mounted as /Applications through fstab. Is there anyway around this?



[ Reply to This | # ]
Partitioned OS X installation with seperate swap partition.....
Authored by: kesari on Aug 02, '10 06:27:29PM

Excellent tips and it's really very helpful and most of the steps are relevant for current snow leopard as well :) Also Justin, I should thank you for your quickest response for my question. I had never experienced some one responding within no time for a question asked wrt an old article. Btb here's the discussion thread to get this working on SL for those who's interested in this:
http://discussions.apple.com/thread.jspa?messageID=12031841#12031841
To simplify, use UUID instead of /dev/... for fstab and don't bother to move swap as suggested by couple of folks in this thread.



[ Reply to This | # ]