Skip navigation

New SL install on SSD; moving user files over

10488 Views 29 Replies Latest reply: Apr 18, 2013 2:14 PM by Wahid Kabir RSS
1 2 Previous Next
Michael Winner Level 1 Level 1 (0 points)
Currently Being Moderated
Jan 22, 2011 4:52 AM
I installed a new SSD and now have a fresh SL install up and running. I'd like to use the SSD for applications, and the older "regular" hard drive (still in the box) for user files. What would be the easiest way to get rid of all the application and SL stuff on the older hard drive, leaving it strictly for my user files (music, video, docs, etc.)? Should I just wipe the drive clean and pull the stuff in from Time Machine? Or is there some other approach to use? Thanks.
  • The hatter Level 9 Level 9 (58,535 points)
    Currently Being Moderated
    Jan 22, 2011 6:02 AM (in response to Michael Winner)
    It might help if your profile showed hardware, Mac, as to how to proceed.

    There are simple steps to have home folder any drive you want. Or to link applications to use alternate location for the media library and folders.

    Clone your OS on the SSD now that you have it setup. You'll want to be able to clone it back with erase from time to time with most SSDs to restore performance.
    Mac Pro 8800GTX Corsair F90 SSD, Mac OS X (10.6.5), 3.2GHz 10K VelociRaptors Win7 GTX 460
  • Pondini Level 8 Level 8 (38,710 points)
    Currently Being Moderated
    Jan 22, 2011 3:52 PM (in response to Michael Winner)
    As long as you don't mind reinstalling your 3rd-party apps from the original discs (or re-downloading them) and re-entering any purchase keys / serial numbers, yes, that will work.

    Delete the folders mentioned, but also delete the hidden system folders on the old HDD. Download the free [Tinker Tool|http://www.bresink.com/osx/TinkerTool.html] app. It allows you to change the Finder to show hidden files (among many other things). Select the first option under Finder, then click +Relaunch Finder+ at the bottom. Reverse this when done. Do not use any of the other options unless you know the possible consequences.

    You might want to put one Admin user account on the SSD, so you can log on to your Mac when/if there's a problem with the HD.
    24" iMac 9,1 2.66 GHz; 4gb; 640 gb, Mac OS X (10.6.6), dual-band AEBS
  • Thomas Brierley Level 3 Level 3 (540 points)
    Currently Being Moderated
    Jan 22, 2011 4:08 PM (in response to Michael Winner)
    It is possible to move the entire "/Users" directory to another volumes and then use a symbolic link to redirect from the original (like an alias). This can be doe with any component of the default OS X install.

    However... you would benefit greatly from leaving the users libraries on the SSD, because this contains lost of small app cache files.. apps actually use to speed up certain operations and leaving them on the HDD would slow things down.

    It would be best to just keep your large media files on the HDD... keeping your SSD as free as possible will significantly increase it's longevity as this allows wear levelling to perform to it's fullest, and also provide the best performance with the least performance degradation from NAND garbage.

    You could achieve this by ether just storing your files however you wanted on the HDD... or linking for instance your Movies, Music, Pictures and Downloads directories from the SSD to ones on the HDD.
    Other OS
  • Thomas Brierley Level 3 Level 3 (540 points)
    Currently Being Moderated
    Jan 23, 2011 7:42 AM (in response to Michael Winner)
    Michael Winner wrote:
    Can I ask you to elaborate a bit on the approach recommended here? Are you suggesting leaving users libraries folders on the SSD, but moving their other folders onto the HDD? I presume this means it's okay to have these folders on separate drives, but is there something special I need to set it up, so that the library files are referenced properly?


    Yes this is what i am suggesting... moving the user directories to the HDD will not take full advantage of the SSD speed. the important user subdirectory is the library this contains lots of small caches and preference files that are used by apps. These files can be read faster and due to their number and size also accessed faster, therefore they should remain on the SSD as it will be a great benefit to general operation (any Mac OS admin who has set up networked user accounts will tell you this about the user directory). generally the library does not take up much space, although some apps do put media resources in there (many people end up moving them out if they are set up with a small fast disk / slow large disk - be it a HDD RAID or SSD).

    What i am suggesting is that you only move the user's subdirectories that will contain large volumes of data, i.e. the Music, Movies, Downloads, Documents directories.

    what specifically you move is up to you, all that is important is that you know large volumes of data such as music, movies, software backups on dmgs etc should not remain on the SSD, as firstly they will not benefit greatly enough in normal use from the throughput or access speeds of the SSD... and for the occasions when they do it's just not worth sacrificing that precious SSD capacity because filling it to the brim will affect it's performance and longevity.

    I own a 120GB intel X25-M SSD in a MBP, and personally i just store my personal files on a separate HDD with my own directory structure and leave the user directory pretty empty. However i don't use itunes on this computer or any other software that makes significant use of the user directories.

    Is this something different than what your proposing in the last paragraph? Does this recommendation meaning setting up the users accounts on the SSD, but using aliases (?) to reference the actual files, which would remain on the HDD? Again, can you elaborate on this...what you're suggesting, and how I'd set it up. Thanks!


    Like i said above, don't move the whole users directory, or a whole user, only move the subdirectories. This can be done with an alias or a symbolic link, the difference is slight... a symbolic link is from the unix side of things (darwin/freeBSD etc) and is a more foolproof method that pretty much everything abides by. Aliases are something unique to Mac OS, apps will follow then, but not all command line software will. (the chances are you will never come across this problem, unless you try to use aliases for more than the contents of your user directory).

    So if you wanted to keep your Music folder on the HDD then: copy the folder to the HDD in a place that it will remain, then delete the original on the SSD and create an alias in it's place (ether right click on the HDD Music folder and select create alias or drag the HDD Music folder to where it should be on the SSD while holding command + option/alt.

    If you want to alias existing directories from your old user account (from the system on the HDD) then you must first change the ownership of those directories so that they match that of the account you are linking them to... if you need to do this i will leave it to another post in the interest of not lengthening this one any more.
    Other OS
  • Thomas Brierley Level 3 Level 3 (540 points)
    Currently Being Moderated
    Jan 25, 2011 11:32 AM (in response to Michael Winner)
    Sort of, that's not a particularly good guide if you are unfamiliar with the shell. If you follow it, make sure you understand what each line does (don't enter them blindly). There are some things in that guide that are specific to the author's setup and also some things that are plain wrong - for instance he linked the trash for the user directory incorrectly making trash not work properly.

    The command that creates the link is "ln", more specifically you want a symbolic link rather than a hard link which you can do by adding the -s option i.e. "*ln -s*", you then enter the source path (what you are linking to) and the target path (where you want the link to be placed). For example:

    ln -s original_file linktofile


    That's all there is to it... you can organise your directories first without the terminal, the important thing is to get each path correct..so here's an example you can apply to each directory you want to move:

    For the sake of simplicity lets assume:

    SSD name is "SSD"
    HDD name is "HDD"
    The user directory name is "Michael"
    The user subdirectory to move is "Music"

    First of all you need to decide where to put them on the HDD... you could put the moved directory anywhere you like - but lets just say that we will use the same structure that OS X uses on the root device "Users/Michael" then put them inside there, that way you can do the same for any other users you add to the system.

    So go to you're HDD and create a directory called "Users", then another one inside it called "Michael".

    Now move the "Music" directory from the SSD's "/Users/Michael" directory into the HDD's "/Users/Michael" directory (you might need to copy then delete the original).

    Now all we have to do is initiate the link command and put the two paths in... Now the full path of our actual Music directory will be "/Volumes/HDD/Users/Michael/Music", and the path to where we want to put our link will be "/Volumes/SSD/Users/Michael/Music" (the last directory there doesn't exist but we are telling ln that this is what we want the link to be called).

    All together now:

    ln -s "/Volumes/HDD/Users/Michael/Music" "/Volumes/SSD/Users/Michael/Music"


    Make sure you put the paths in quotes otherwise spaces in names will not be interpreted properly, and also make sure the Case is correct.

    There is actually a quicker way than typing out each path... type (without pressing enter):

    ln -s 


    note - there is a space after s, and you do not need quotes with this method

    Then you can drag and drop the HDD's "/Users/Michael/Music" directory from the finder into the terminal window and it will write the full path for you... then drag and drop the SSD's "/Users/Michael" directory into the terminal window and complete it by adding a slash and the name of the link to the end. A difference you might notice is that spaces and special character will be "escaped" with a backslash so if your HDD was called "Macintosh HDD" it will write it like this: */Volumes/Macintosh HDD/Users/Michael*

    Now you should be able to use this method for all of your user directories... only move the ones you want, but i recommend leaving library alone and moving everything else you think will be filled with large volumes of data.

    hope that makes sense.
    Other OS
  • Thomas Brierley Level 3 Level 3 (540 points)
    Currently Being Moderated
    Jan 26, 2011 11:07 AM (in response to Michael Winner)
    no you don't need to cd to any of the working directories if you followed my mini tutorial because you should be using absolute paths (so it doesn't matter what working directory you are in). relative paths aren't particularly reliable with ln for some reason and besides one of the paths will have to be absolute when going across volumes.

    That error could be referring to ether of the paths... Things to consider when writing paths on the cli:

    1. names are Case Sensitive

    2. using a / at the beginning of the path will refer to the root volume (use for absolute paths) otherwise it will be relative to the current working directory.

    3. spaces and special characters must be escaped by using a \ (backslash) before the character.

    4. you can instead encase paths in "quotes" without having to escape spaces and special characters

    5. you can use the tab key to autocomplete names (another way of checking that what you are typing is correct also)

    6. you can avoid having to remember all the above if you simply drag and drop files/directories from the finder into the terminal windows to write absolute paths for you.

    Another thing to remember is that it wont overwrite files/directories by default so make sure you remove the directories on the SSD that you have created a mirror of. (although this should throw a "file/directory exists" error

    If you like you can post some of the commands you are trying and i'll let you know if they are at least syntactically correct.
    Other OS
  • Thomas Brierley Level 3 Level 3 (540 points)
    Currently Being Moderated
    Jan 27, 2011 11:52 AM (in response to Michael Winner)
    Michael Winner wrote:
    The info on the "test" symbolic link directory I've created on the SSD indicates that it's an alias. Is that OS X shorthand for the symbolic link, or could I have actually created an alias rather than an SL?


    If you are referring to the "get info" finder dialogue then yes - it calls links aliases, and also calls aliases aliases confusing if your trying to determine specifically which it is. I don't actually know how to create aliases from the cli - but ln is a generic nix tool so i doubt it would have been aded to that.

    Ideally the only non-symbolic link folder remaining on the SSD will be the library folder, correct?


    Within a user directory (like you said) yes - in my opinion, as the user library is more like an extended part of the system and apps than bulk user data. Some system and app performance will depend on the speed that files within the user library can be accessed.

    I'm not going to do any web publishing, so I can drop the Sites folder entirely, correct?


    I don't think there should be any harm in that - although the OS does default to that directory when enabling web sharing - not sure what the side effects of it not existing might be.

    Earlier in the thread it was recommended that I create one user account entirely on the SSD, so that I'll be able to log in if the HDD gives me trouble. Thoughts on this? I've cloned the current, pre-symbolic link install on the SSD, so that should work as a fallback, no?


    If the contents of a user directory are unreadable and even unwritable then the OS will still allow the user to log in - except it will get the default preferences. but in your case because you are keeping the Library on the SSD it wont matter if the HDD is there or not until you go and use the other directories... as all your preferences and caches etc are in your library.

    Since you've been so generous...guess I'll ask if you have any other advice for getting this setup "right" and taking maximum advantage of the SSD.


    There isn't much else to do that will make a vast amount of difference... The important thing is to remember is not to let it get filled up to much... try to keep it's default state as empty as possible. There are two reasons for this..

    Firstly wear levelling; it is only effective on the free space - if you fill up almost all of your SSD with static data and then use the last remaining space for temporary data storage then it will wear out that remaining capacity comparatively quickly (the wear levelling mechanism can juggle the nand page allocation for pages being re-written - but for the most part the pages holding the static data aren't going to get any use.)

    (take this with a pinch of salt - you can safely fill 3/4 of your drive and then use the remaining for temporary data, but it's healthy to keep in mind - only extreme cases are likely to wear out the drive very quickly)

    Secondly performance: This is to do with garbage collection and 'TRIM' - i wont get into the details here but as you may already know SSD performance degrades with use as data is mixed into pages - this is a reversible performance degradation but it is exacerbated by lack of free space.

    There are various articles and forum threads on the web to do with Mac OS tweaks for SSDs, but pretty much all of these are centred around increasing the life span of the SSD - or more specifically decreasing write amplification due to the number of writes opposed to quantity of data written.

    One quick tweak that makes absolute sense to do is enabling noatime … as with most unix file-systems HFS+ will write the access time of a file to the file-system every time a file is read - this means one write for every read (check your activity monitor to see this, you will always see a write operation when there is a read operation). access time isn't exactly of great use and there are no effects from disabling it… to do so you can use this launch daemon:


    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
    "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
    <key>Label</key>
    <string>com.noatime</string>
    <key>ProgramArguments</key>
    <array>
    <string>mount</string>
    <string>-vuwo</string>
    <string>noatime</string>
    <string>/</string>
    </array>
    <key>RunAtLoad</key>
    <true/>
    </dict>
    </plist>


    What this does is add the noatime option as a default when the mount command is called for root

    You need to save this as a unicode file in your /Library/LaunchDaemons directory and change the owner ship and group to root:wheel… but i've written simple mini script to do it all for you, copy and paste this into your terminal then enter your password and it will write it to the correct place for you:


    echo '<?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
    "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
    <key>Label</key>
    <string>com.noatime</string>
    <key>ProgramArguments</key>
    <array>
    <string>mount</string>
    <string>-vuwo</string>
    <string>noatime</string>
    <string>/</string>
    </array>
    <key>RunAtLoad</key>
    <true/>
    </dict>
    </plist>' | sudo tee /Library/LaunchDaemons/com.noatime.plist
    sudo chown root:wheel /Library/LaunchDaemons/com.noatime.plist


    if you ever wanted to disable it for some reason simply delete the file "/Library/LaunchDaemons/com.noatime.plist"

    Other tweaks are mostly to do with creating ramdisks and moving certain system directories containing logs and temp files to them… however this is beyond the scope of a quick copy and paste script, you must understand specifically what you are doing so you can adjust the sizes of the ramdisks appropriately and make important files restorable (because ramdisks are volatile)

    Personally i don't think doing this is worth the effort, also if you don't have masses of RAM… or usually make use of all of it anyway then theres a good chance your ramdisk will be paged out to a swap file which kind of makes it pointless.

    Anyway - hope that helps, enjoy your SSD !
    Other OS
1 2 Previous Next

Actions

More Like This

  • Retrieving data ...

Bookmarked By (2)

Legend

  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.