PDA

View Full Version : [Optibay] How to move your media to the HDD while leaving the ~/Library on the SSD




neonsuperfuture
Aug 8, 2010, 07:09 PM
Just to let everybody know, I found a pretty straightforward way to do this without having to mess with every single app's preferences. I have a 13 mbp and I replaced the HDD with an intel SSD. The original HDD went into the optibay instead of the superdrive. At first I just moved my whole home folder to the HDD, so that iTunes, iPhoto and everything else would have worked on there not filling up the SSD with unnecessary stuff. But then I felt like my HDD was spinning most of the time and I read that, as I thought, it is better to leave the ~/Library folder on the SSD to avoid this, since every running app basically reads and writes to this folder all the time. So here's what I did:

1) I moved the home folder back to the SSD, copying my ~/Library folder from the HDD in there (this is its default location so you don't have to do anything if you never changed it)

2) I rebooted the mbp and deleted every folder in the "new" home directory except the Library one:

a) Open Terminal
b) Type: sudo rm -rf Folder

change "Folder" accordingly (eg. Downloads)

3) I created links from the "new" home folder to the old one for every folder I wanted to stay on the HDD (Downloads, Music, Movies etc.). This is how you do it:

a) Open Terminal
b) Type: ln -s "/Volumes/HDD Drive/Users/name/Folder" "Folder"

you have to change "HDD Drive" with the name of your HDD, "name" with your username and "Folder" whith the folder you are linking to (eg. Downloads)

If you never moved your home folder you must also create corresponding folders on the HDD before doing this, and point every link to the right folder, wherever you created them.

That's it, this way every app will just be redirected to the HDD when accessing one of the folders in your home directory, while the Library folder will stay on the SSD improving speed and possibly battery life when compared to moving the whole home folder to the HDD.

Finally, you would also want to do the same thing for a couple of other folders, that are:

~/Library/Mail
~/Library/Mail Downloads
~/Library/Caches/com.apple.Safari/Webpage Previews

I did the same thing with the ~/.Trash folder, I don't know if this even makes sense but whatever, you need a couple more lines to do it:

1) Open Terminal
2) Type: sudo rm -rf .Trash
3) Type your password
4) Type: ln -s "/Volumes/HDD Drive/Users/name/.Trash" ".Trash"


Last thing, I don't know if doing this with the Desktop folder will cause any issues, what do you think? (EDIT: yes it works)

NOTE:
I had an issue after going through this process, so that when I tried to delete a file from the HDD it always said "This item will be deleted immediately. You can’t undo this action.". I messed around a bit with permissions and stuff and got around it:

Open finder > right click on the HDD > Get Info
Make sure you have permissions to read and write, then click on the wheel at the bottom of the window and select "Make me the owner" if available and then "Apply changes to all enclosed items"
Check "Ignore ownership for this volume"
Reboot and you should be fine

btw, I now have that same issue when deleting files from the SSD, this is fair since all my data is on the HDD but I'm still looking for a better solution.


I hope this will help somebody, cheers



Corndog5595
Aug 8, 2010, 07:24 PM
Wouldn’t it be easier to just create an alias and then replace the folder icon with one that doesn’t have an arrow?

Edit: nevermind, I see now that OS X doesn’t allow you to do anything to the existing media folders.

diablo2112
Aug 8, 2010, 07:41 PM
Great post and summary of how to create links to the /library folder. Thanks for this.

Corndog5595
Aug 8, 2010, 07:51 PM
I am kinda confused by this. What exactly are you trying to tell us? I read the post like 4 times but I cant figure it out. It seems like you are just showing a more complicated way to make an alias to a folder on the HDD (so that it will download it to the alias that is on the SDD but will be actually go on to the HDD).

neonsuperfuture
Aug 8, 2010, 07:57 PM
I am kinda confused by this. What exactly are you trying to tell us? I read the post like 4 times but I cant figure it out. It seems like you are just showing a more complicated way to make an alias to a folder on the HDD (so that it will download it to the alias that is on the SDD but will be actually go on to the HDD).


Well, if you have an SSD and an HDD in your mbp you ideally want to keep the SSD just for the OS and the apps, while leaving all the media and documents on the HDD. You can actually achieve this pretty easily by moving your home folder to the HDD from system preferences > accounts. However, as I said, this is not the best way to do it since you will have your home/library folder on the HDD being accessed all the time by the apps you are using, thus having the HDD spinning most of the time.

Alternatively, you could leave your home folder on the SSD and change every app's preferences to point do different folders than the default ones (eg. you could make Safari download files to a custom folder, or iTunes point to a library on your HDD). This means every time you install something new you have to make sure it stores data on the HDD and it would be a pain in the ass to do it for every single app.

In the end, since you want your entire home folder to be on the HDD except the home/library folder that you want to keep on the SSD, this is the solution I found..

Eddyisgreat
Aug 8, 2010, 08:23 PM
Wait you are creating symbolic links and not aliases, right?

I use service called "SymbolicLinker (http://seiryu.home.comcast.net/~seiryu/symboliclinker.html)" for that.

ayeying
Aug 8, 2010, 10:31 PM
I'm a bit confused as well, but I do understand the concept you're trying to do and to be honest, I'm was looking for something exactly similar until I realized it would interfere badly with booting with my boot camp partition.

But I'm not entirely sure why you're moving the home folder then removing the home folder and all that though... maybe i'm just too tired

neonsuperfuture
Aug 9, 2010, 05:05 AM
Wait you are creating symbolic links and not aliases, right?

I use service called "SymbolicLinker (http://seiryu.home.comcast.net/~seiryu/symboliclinker.html)" for that.

yep, btw you just have to do this once and you're ok forever so I guess the terminal is just ok.

to everybody who are confused, with this method you are just able to keep your home folder on the SSD (that is advisable for a few reasons) and keep your storage (music, movies, downloads, pictures, documents) on the HDD, so you don't fill the SSD and you avoid frequent writes and deletes that would decrease its performance. that's it, hope it's a bit more clear :)

MacModMachine
Aug 9, 2010, 06:53 AM
I'm a bit confused as well, but I do understand the concept you're trying to do and to be honest, I'm was looking for something exactly similar until I realized it would interfere badly with booting with my boot camp partition.

But I'm not entirely sure why you're moving the home folder then removing the home folder and all that though... maybe i'm just too tired

you are right,

its a bad idea....especially with a home folder on hdd and rest of osx on ssd, i have done somthing like this with bad results.

neonsuperfuture
Aug 9, 2010, 07:26 AM
well the point here is that you can actually choose what parts of your home folder you want on the SSD and what parts you want on the HDD. I think having the Movies folder on the HDD, for example, will hardly cause any issue whatsoever