View Full Version : iMac partitioned drive...
Max Miles
Dec 29, 2005, 03:12 PM
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
belvdr
Dec 29, 2005, 03:18 PM
From an earlier post here (http://forums.macrumors.com/showthread.php?t=146612&highlight=Users):
While there are no speed benefits, it helps in the fact that if the multiple users fill up the user partition, the system will still be happy with a system partition that has free space.
Also, there's no trouble in getting it to work right. It's BSD and it will follow the symlink.
To do this, let's say you named your second partition UserPart. Go into terminal.
First, copy the Users folder to the second partition:
cd /
cp -rvp Users /Volumes/UserPart
Now rename the original folder and link it to the second partition:
mv /Users /Users.old
ln -s /Users /Volumes/UserPart/Users
To test the link works later, create a temp file:
touch /Users/newpart.tmp
That's it. Now check that it works by double-clicking your first partition icon and the browsing to Users and you should see your new file called newpart.tmp. You can now drag that to the trash.
Max Miles
Dec 29, 2005, 06:01 PM
Thanks belvdr, I'll give this a try right now,
m
Max Miles
Dec 29, 2005, 06:12 PM
One problem, this isn't working:
mv /Users /Users.old
do I have to rename these folders?
m
Max Miles
Dec 29, 2005, 06:37 PM
actually both parts of the first commands do not work. Any ideas why? Terminal describes "cp" as an illegal option.
m
yellow
Dec 29, 2005, 06:51 PM
Try using sudo as a prefix..
sudo cp -rvp Users /Volumes/UserPart
Etc..
And the "illegal option" is most likely because one of the flags (-rvp) isn't supported in the Jaguar version of cp. Though it should..
Maybe you'll get more milage out of this:
http://www.macosxhints.com/article.php?story=20010619195610633
mrichmon
Dec 29, 2005, 07:01 PM
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:
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:
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:
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
Dec 29, 2005, 07:55 PM
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
Dec 29, 2005, 09:32 PM
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
Dec 29, 2005, 10:32 PM
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:
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:
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:
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.
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
Dec 30, 2005, 02:01 AM
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
vBulletin® v3.8.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.