Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have an SSD and regular HDD drive in my laptop. The SSD drive is not used at all; it is not even being mounted. I am using Arch Linux. I'd like to start using the SSD, and from what I have read I believe mounting /usr there would be a good idea. My question is: with an installed system, how do I go about setting up the /usr partition on the SSD and moving the current files to this new location?

share|improve this question
    
You could use the SSD as a cache –  Gabriel Sep 4 '13 at 8:06
add comment

1 Answer 1

up vote 8 down vote accepted

Note: These are generalized instructions. Some comments below indicate that your specific distro may or may not have problems with you doing this. That is why the backup in step 4 is recommended.

  1. Format SSD. What file system to use on SSD is another question.
  2. Boot from a rescue CD and mount up both HD and SSD.
  3. rsync -avP /usr from HD to SSD.
  4. Move /usr to /usr_backup just in case things fail.
  5. Create empty /usr on HD for a mount point.
  6. Update /etc/fstab on HD to mount /usr from the SSD.
  7. Reboot and hope.
  8. Don't touch /usr/lost+found/
share|improve this answer
1  
If you consider keeping the contents of the old /usr, then you can skip step 4 and 5. Mounting the SSD partition on top of /usr will hide the old contents. Only keep in mind that it will get outdated as the system is updated. –  antje-m Jan 22 '12 at 1:56
1  
But, by creating a new /usr_backup, you can delete it once everything is verified to be working, and free up some space in the root. –  sybreon Jan 22 '12 at 2:11
1  
For step 2, you can just reboot into single-user mode; you don't need a rescue disk for this. (In GRUB, append single to the kernel options line.) This avoids the need for the "mount HD" part of the step, too; it should be mounted as part of a single-user boot. –  Warren Young Jan 22 '12 at 5:31
2  
Note: this is not straightforward. Having /usr on a separate partion is not supported in Arch, which means that you will need to take some additional steps... –  jasonwryan Jan 22 '12 at 6:17
1  
After step 6, you should verify whether mounting the ssd as /usr works before rebooting. –  user unknown Jan 22 '12 at 11:19
show 4 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.