Partitions for Swap, Users & Apps

aceofdubs

Registered
My goal

1. Move swapfiles to my Swap partition.
2. Have my Users partition mount where my existing Users folder resides.
3. Have my Apps partition mount where my Applications folder resides.

Today I accomplished goal 1 and managed to get swapfiles running on a dedicated partition. It was actually too friggin easy. I just went here >> http://testuser.eshirazi.com/, followed the instructions and PRESTO. Swapfile0, along with other virtual memory files are on my swap volume and I am already noticing a significant performance boost!

Unfortunately, I haven't had as much luck with moving my Users and Applications to their own partitions. I tried creating fstab in etc using labels, and then modifying the rc file. This trick worked like a charm under Panther, but now that I have upgraded to Tiger, it is very unstable and sometimes the volumes dont mount! I have also had problems installing software since moving my Applications.

Basically, I would love it if the partitions would mount seemlessly into the directories they replace. It would also be cool if these volumes where invisible on the desktop.

What is the best way to do this? I have searched high and low and it seems everyone uses fstab to accomplish this. Am I doing something wrong, or is there another way in Tiger?

DISCLAIMER: My knowledge of Unix is rudimentary at best. Please be gentle!
 
Post back what your fstab file looks like. I do the same thing,
use labels to mount drives.
I haven't made /Users and /Applications mount points,
but I don't see it being a problem.

Here's how my /etc/fstab file looks.
Just to note, the stars aren't actually there,
I just put them there to edit out my user name.
I also haven't had any problems with the drives
not mounting at the correct mount point.

Code:
#Device         Mount point             Type    Setting Dump    fsck order

LABEL=Swap      /private/var/vm         ufs     auto,rw 1       2
LABEL=Projects  /Users/*/Projects       hfs     auto,rw 1       3
LABEL=Music     /Users/*/Music          hfs     auto,rw 1       4
LABEL=Backup    /opt                    hfs     auto,rw 1       5

A small note: the Finder insists the mountpoints are aliases.
They all work fine, you can double click on them to open 'em up,
but it is a bit annoying.

If you have the Developer Tools installed (Xcode Tools or whatever the
Tiger DVD calls 'em now), then you can use the SetFile command line tool
(it's in /Developer/Tools/) to make a folder invisible.
You do that for the mount point (while the drive/partition is mounted), and
the drive won't be displayed on the Desktop (or in the Finder, either).

The command would be SetFile -a V /path/to/mount/point
(and if you later decide you want to see it after all, do the same command
but with a lowercase v).
 
Thanks for the extra tip DS!

Just curious though...when I pull this little trick, OS X creates an invisible alias to my volumes in their respective positions. If I make them vanish from the desktop, how on earth will I access them (aside from showing invisible files)?

Ideally I would like them to mount right into the directory and not on the desktop. Is this possible?
 
It does mount right into the directory, but the Finder shows mounted drives/partitions on the Desktop, so you'll see it there as well. That doesn't mean that it's mounted there. It just shows up there as well.

Rand, I agree with you for the most part, though there are some uses for partitions. Just to note, for me, none of the above in the fstab file I posted are partitions. ;)
 
Here is a question for ya DS...

I just ran into a little glitch with my setup. I have multiple computers which I often run in Target Disk Mode via firewire to transfer files. As it turns out, OS X does not like it when you have two volumes mounted with the same name...especially when one of those volumes happens to be your home directory!

I understand now that I need to create user partitions with unique names, but I could use your help to suss out the details. For example...

Lets say instead of a "Users" volume, I call it "WorkDrive"...would it be possible for me to create a "Users" folder within this volume that will mount where its supposed to? If so, would the changed code look like this?....

for fstab:
LABEL=WorkDrive/Users /Users hfs rw 1 2

After booting into Single User Mode:
cd /
mv Users Users-old
mkdir WorkDrive/Users
chmod 775 WorkDrive/Users

Very curious what you think.
 
I haven't tried it, but I'm 99% sure that wouldn't work. The LABEL thing is just what the drive/partition is named, so I'm pretty sure that path names using it aren't going to work - autodiskmount (what mounts these using the labels) will just see the whole thing as the drive name, and either crash (because it might barf on the /), or just complain that the specified drive/partition doesn't exist.

Truthfully, the only scheme I've come across that will mount arbitrary paths like that is a WebDAV share, but I'm pretty sure it would cause problems as a home directory (and probably be a bit slow as well). I'd definitely not recommend trying that one out!

I'm not sure I get your first comment. How is something else mounting that is clashing with the name of the /Users directory? The only way I could see that one happening is if you used NetInfo to change where OS X "sees" where user's home directories are instead of directly mounting them at /Users. Regularly mounted volumes are mounted at /Volumes, so there should be no way it would clash with something mounted somewhere else. Actually, it shouldn't clash if everything is mounted under /Volumes either, but I can see there being a few cases where it might. Post a bit back on this one, it sounds a bit unusual to me.
 
okay..well how about this?

for fstab:
LABEL=UsersG4 /Users hfs rw 1 2

for Single User Mode:
cd /
mv Users Users-old
mkdir UsersG4
chmod 775 UsersG4

Does the partition HAVE to be called users?

The reason I ask is because when I mount my other computer via firewire, my Users partition vanishes and OS X tells me it cant find my home directory.
 
Yes, it has to be called Users. If you did the above, then the UsersG4 drive/partition wouldn't get mounted, because there would be no /Users folder for it to get mounted at. Well, it would be mounted, but most likely under /Volumes.

How does your Users partition "vanish"? Is it on the other computer? If it is, then shutting it down or putting it to sleep would make that happen.

Or are you disconnecting something else to connect the other computer via firewire? This sounds really strange, no drives/partitions should disappear just because something else is mounted.
 
First the Volume disappears and I get a warning

"Home Directory not found"

This has only happened once. I just tried it again and it was fine.
Either way, I am seriously considering switching from LABELS to UUIDs at this point.
Then I can name my drives whatever I want.
 
Back
Top