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?

  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.

  • 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 clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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