Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Max Miles

macrumors member
Original poster
Dec 4, 2003
58
0
British Columbia
I installed OS X on an OLD Rev. D iMac this morning and had to partition the drive as a condition for installing 10.2 Now I'm wondering what to do about the fact the home folder of the user is on a partition of only 5 Gigs. The other partition is something like 69 Gigs, which is where the user should be storing all of her music, pictures, documents, etc. Anyone know how to move the home folder in a stable manner, etc, to the second partition? I've heard something about "symbolic links"?

max
 

mrichmon

macrumors 6502a
Jun 17, 2003
873
3
Max Miles said:
One problem, this isn't working:

mv /Users /Users.old

do I have to rename these folders?

m

This move would need to be done as the super user.

However, you should not use cp to copy the Users directory to the new partition since cp will not copy over the Apple specific attributes or resources.

The safe way to do this (assuming you have already deleted the copy of Users that you made on your user partition using "cp") is:

Code:
sudo mkdir /Volumes/<userpart>/Users
sudo chown root:admin /Volumes/<userpart>/Users
sudo chmod o+t /Volumes/<userpart>/Users
cd /Users

where <userpart> is the name of the partition you want to move your user folder to.

The commands above set up your new (and empty) Users folder. Now you need to copy the home directories for each of your users across:

Code:
sudo ditto -rsrc /Users/<username> /Volumes/<userpart>/Users/<username>

Repeat the ditto command for each of your users substituting the actual user folder names for <username>. You may also want to copy across the /Users/Shared folder.

At this stage you should have two identical copies of your Users folder, the original one at /Users and the new one at /Volumes/<userpart>/Users. Browse around a bit to check that the permissions all look the same (using ls -lag).

When you are happy that the new Users folder is correctly copied you need to move the old users folder to a new name and create a symbolic link since OS X expects to find the users folder at /Users. The commands to do these two steps are:

Code:
sudo mv /Users /Users.old
sudo ln -s /Volumes/<userpart>/Users /Users

Now logout and log back in (do not reboot yet). Open a terminal and run the command pwd this should print out /Volumes/<userpart>/Users/<username> if everything has worked. If it prints out /Users/<username> then you have not set up the link correctly.

You can now open NetInfo, navigate to the users listing and edit each of the users you have created so that their home directory is listed as /Volumes/<userpart>/Users/<username> instead of /Users/<username>. By changing the NetInfo entry you eliminate the extra lookup needed when a program accesses /Users and then needs to lookup /Volumes/<userpart>/Users to access the files.

Now, reboot your computer and work with it for a week or so. If you don't encounter any problems you can delete the backup /Users.old folder since you no longer need it.

Edit: corrected errors in ditto and ln commands.
 

Max Miles

macrumors member
Original poster
Dec 4, 2003
58
0
British Columbia
mrichmon,

Fantastic directions, thank you. I'm encountering one problem, or perhaps a few, I'm not sure. The link is not getting created, anyway. "pwd" is giving me the old Users folder. So where I think I may have gone wrong is:

sudo ditto -rsrc /Users/<username> /Volumes/<userpart>/Users

There's no designation for where in the new Users directory <username> is placed. Should I word this...

sudo ditto -rsrc /Users/<username> /Volumes/<userpart>/Users/<username>

? Or does it matter. There's going to be only one user on the iMac.

The last command I tried was..

sudo ln -s /Volumes/<userpart>/Users Users

and this hasn't worked. I'm presuming the "ln" is not "1n"...

Thanks for the help! ~max
 

belvdr

macrumors 603
Aug 15, 2005
5,945
1,372
Max Miles said:
mrichmon,

Fantastic directions, thank you. I'm encountering one problem, or perhaps a few, I'm not sure. The link is not getting created, anyway. "pwd" is giving me the old Users folder. So where I think I may have gone wrong is:

sudo ditto -rsrc /Users/<username> /Volumes/<userpart>/Users

There's no designation for where in the new Users directory <username> is placed. Should I word this...

sudo ditto -rsrc /Users/<username> /Volumes/<userpart>/Users/<username>

? Or does it matter. There's going to be only one user on the iMac.

The last command I tried was..

sudo ln -s /Volumes/<userpart>/Users Users

and this hasn't worked. I'm presuming the "ln" is not "1n"...

Thanks for the help! ~max

For ln, make sure you first:

cd /

then

do your link. However, your old /Users directory must be renamed before you can create the symlink.
 

mrichmon

macrumors 6502a
Jun 17, 2003
873
3
Max Miles said:
mrichmon,

Fantastic directions, thank you. I'm encountering one problem, or perhaps a few, I'm not sure. The link is not getting created, anyway. "pwd" is giving me the old Users folder. So where I think I may have gone wrong is:

sudo ditto -rsrc /Users/<username> /Volumes/<userpart>/Users

There's no designation for where in the new Users directory <username> is placed. Should I word this...

sudo ditto -rsrc /Users/<username> /Volumes/<userpart>/Users/<username>

? Or does it matter. There's going to be only one user on the iMac.

The last command I tried was..

sudo ln -s /Volumes/<userpart>/Users Users

and this hasn't worked. I'm presuming the "ln" is not "1n"...

Thanks for the help! ~max

Yes, my bad. The ditto command should be:

Code:
sudo ditto -rsrc /Users/<username> /Volumes/<userpart>/Users/<username>

Just tested that ditto command to make sure. (If you have already renamed the users folder it should be sudo ditto -rsrc /Users.old/<username> /Volumes/<userpart>/Users/<username>.)

And to create the symbolic link it should be ln (both letters, no numbers) but I left out a /. The correct command (after you have renamed the old Users folder) is:

Code:
sudo ln -s /Volumes/<userpart>/Users /Users

Max I've edited the original instructions to correctly reflect these commands. The best bet is for you to go through all of the process again. Before you go through the corrected procedure you need to do two things:
  1. ensure that you still have the backup of your home directory in /Users.old. Assuming that backup exists, then you can remove all of the new /Volumes/<userpart>/Users directory.
  2. if you have already moved the original user folder then you should move it back to the original location using the command sudo mv /Users.old /Users
 

Max Miles

macrumors member
Original poster
Dec 4, 2003
58
0
British Columbia
mrichmon, it worked! Thanks for the detailed how-to. Woot! Now this old iMac is up and running with an 80 Gig and 10.2.9

And thanks to Yellow and belvdr for their notes.

m
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.