Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm getting a new laptop with a hard drive and a SSD drive. I plan to install 11.10.

I plan to partition in such a manner that:

  • I put the files that (almost) never change on the SSD and mount it as a read-only partition.
  • I put /home/ on the HD (and other locations that routinely are written to during normal operations, see question 1 below)

I basically want to not worry about the SSD getting worn out.

Two questions:

  1. What other locations (than /home) need to be put on the read-write hard drive?
  2. I need to modify my system from time to time: install some new packages, update packages, edit /etc/ configuration files, whatever. Is it possible set the read-only partition temporarily to read-write, do the changes and then change it back to read-only?

Update

Some interesting links:

Update 2

More interesting links. The first link describes an effort to replace various filesystem locations that stores transient state files with a /run toplevel location.

Making the /run directory available brings us a step closer to the point where it is possible to use the system normally with the root filesystem mounted read-only, without requiring any clunky workarounds such as aufs/unionfs overlays.

share|improve this question

4 Answers 4

You don't have to worry about the lifetime of your SSD. It'll last years, even with heavy I/O happening every day. Just use it as you would use a HDD. The only thing you need is setting the vm.swappiness to a lower value.

There are many other things, values that are 'said' to improve SSDs lifetime. However, every time they do some calculation the results show that even an older SSD would last 5+ years. And we are talking about the first SSDs.

share|improve this answer
    
That said, use SSD for your work, for your OS, etc. And use the HDD as a backup, for your movies, music. Such stuff. (Oh, and you should use Wuala or any other online backup kind of service which you trust/like. Since an off-site backup is always a good thing.) –  Shiki Oct 20 '11 at 13:07
    
OK, I see your points about lifetime of SSDs. But I still want a solution like the one I describe. –  codeape Oct 20 '11 at 20:48
    
Sure, no prob. It's just ... doesn't worth it. But you are right, the question asks for a different answer (which can be marked as a solution). –  Shiki Oct 20 '11 at 21:47

I agree with others saying that making an SSD read-only may be a bit too much, but if you still want to tinker with it as a fun exercise, you may look at using UnionFS for making your SSD read-only (well, almost).

The point of UnionFS is that you have 2 partitions - data is read from partition #1 (your SSD), but if it's written, it's written to partition #2 (HDD in your case), from which point the new data "hides" the data on the first partition, so for programs it looks like there's a single read-write partition.

Obviously, after you continue modifying data on the UnuinFS partition for some time (system updates etc), more and more data migrate to the HDD and SSD is used less and less. You may need to come up with some solution to move the data from HDD to SSD from time to time.

With this approach you could even not bother with "which directories should I move to partitions on HDD" - the filesystem will figure it out by itself.

share|improve this answer
    
Looks like there is a solution to move files in aufs2, aufs.sourceforge.net/aufs2/brsync/README.txt –  codeape Oct 31 '11 at 13:11

I recently bought a PC with SSD + HDD like you and did something similar, dividing the partitions. However, I did not set the SDD to read-only (just my decision, not that is something better or worse).

Concerned about avoiding excesive writing, I put /tmp /var and /swap (apart from obviously /home) in the HDD, following mostly this link:

http://bandaancha.eu/tema/1680390/instalar-ubuntu-ssd-hd

I am sorry it's in Spanish, but you can say the partitions graphic anyway. Of course you can set the partitions with different sizes (I did)

share|improve this answer

That'd be no use. Every file or folder needs to be written to once in a while. It's like that with every operating system. If you want to spare you SSD, put the Ubuntu live ISO on your SSD (like you'd do with a USB drive), configure a persistent filesystem on the HDD for it, and configure it to use a partition on the HDD as your home folder (and storage for the persistent filesystem file). The result would be that all there is on the SSD drive would be an ISO file (wich is read-only).

share|improve this answer

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.