Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to setup RAID1 so that a ramdisk in the RAID configuration has occasional synchronisation with a physical disk (that is very battery intensive to run, so I hope to let it spinout).

Is there a way I can set the commission frequency on the RAID config such that it will only burst-write to the HDD every, let's say, 5 minutes?

share|improve this question
up vote 0 down vote accepted

If you use mdadm for your software-raid-1 and set it up with a dirty-map, you could connect/disconnect that disk every N seconds to the md-device.

In md-terms that is

  • set faulty
  • remove
  • re-add
share|improve this answer

Well, for some FSes you can have such tweaks, say for EXT3, EXT4 man mount mentions «…

commit=nrsec Sync all data and metadata every nrsec seconds. The default value is 5 seconds. Zero means default.

…» — That might suffice for your needs.

Also, there's vm.dirty_writeback_centisecs sysctl which is described as: «…

The pdflush writeback daemons will periodically wake up and write `old' data out to disk. This tunable expresses the interval between those wakeups, in 100'ths of a second.

Setting this to zero disables periodic writeback altogether.


So, actually probably you don't have to mess with RAM-disk/HDD RAID1 at all.

share|improve this answer
Thanks, but those options allocate more RAM so I'll end up storing stuff twice. I probably could end up not using a ramdisk, but I really like the performance that I can get out of it; and in any case, it's a learning experience. – kvanberendonck Aug 25 '12 at 17:33
@kvanberendonck, «storing stuff twice» — why is that? ) – poige Aug 25 '12 at 18:26

Your Answer


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.