Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

When I read articles on running Linux from a flash drive, many recommend that directories that see many or constant writes be mounted in ram (e.g. as tmpfs). My question is - Which directories will these typically be, and is there any way to monitor disk activity that would show which directories see many writes?

share|improve this question
    
hmm... /var and /proc? Can't give you a list complete enough to qualify as an answer, but that's what seems logical at first glance. –  rumtscho Mar 30 '10 at 21:05
    
Also, /tmp earns a few frequent flyer miles. –  Dennis Williamson Mar 30 '10 at 21:36
1  
The swap partitions –  Nifle Mar 30 '10 at 21:38

2 Answers 2

up vote 2 down vote accepted

/proc is generally a procfs system which doesn't live in disk. So I wouldn't worry about that.

The obvious one would be /tmp -- this is where any temporary files that get generated are going to be stored.

/var/run and /var/lock can be mounted as tmpfs since they do not need to persist over a reboot.

/var/log could be a possibility as well as long as you are OK not keeping logs over a system reboot.

share|improve this answer

/var and /tmp are obvious candidates.

Ksfmd may be of help (I don't have direct experience with it, but it seems to have the potential to help you monitor your system to decide what gets mounted where).

You might be able to build a more exact match to what you want to do with the inotify toolkit.

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.