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

The background:

Here I have a spare x86 board which has a low energe costing AMD CPU built on it. I am planning to DIY a home use file server with it running a Debian base system and some common service programs such as ftp/telnet/svn/samba... etc.
The main storage media is a 4GB EIDE flash disk, with possibility to mount USB HDDs. The board can support up to 1GB of RAM. The rough idea is to install Debian on the 4GB flash disk, and using external USB HDDs as data storage.
Since the flash disk has a limited number of erase cycles, I would like to avoid data writing to it as much as possible. The Linux swap partition, among other things, is to be disabled.

My questions are:

What are the other possible ways in which my system would write data to the flash disk at run time, and how to avoid them?
For one thing whether linux persists log messages to hard disk?

EDIT - one more question:

Is there any tool can monitor disk data writing events?

share|improve this question
up vote 2 down vote accepted
  1. Mount filesystems on flash disk with noatime flag in /etc/fstab.
  2. You can easily redirect log files to any other disk by editing /etc/rsyslog.d/* or similar file (unsure which exact syslogd is used on Debian, but similar files exist on all platforms).

You can use dstat -dD sda,sdb,sdc 60 to monitor data volumes read/written.

share|improve this answer
hi jippie, thank you for the answer. is it feasible to mount the whole root fs read-only, except with some sub directories still rw? how? – oldwhy Dec 15 '12 at 16:13
either you mount ro or you mount rw. You might want to consider two partitions, but I think that defeats your goal all together. – jippie Dec 15 '12 at 17:39
I'm sure you can partition the flash disk as you like -- make /usr/ mount read-only by default, and only remount it r/w when you're doing software upgrades. – Shadur Dec 16 '12 at 16:03

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.