Server Fault is a question and answer site for system and network administrators. 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

There's is an ext3 filesystem on top of Linux md raid1, array consists of two hard drives. Various services, including databases run on and write to it.

Let's say for argument's sake that to minimize services downtime, it would be nicer to be able to:

Option A:

  • connect external drive (possibly a multi-drive weekly rotation)
  • sync the array to it (--> doesn't really matter how long it takes, services are up)
  • switch runlevel -> shut down all but basic non-writing services
  • re-mount filesystem read-only
  • disconnect external drive from array and physically
  • re-mount filesystem read-write
  • default runlevel -> restart services

Nicer, as in versus Option B:

  • connect external drive
  • backup runlevel -> shut down all services
  • make file level backup (--> possibly lengthy operation, even with incremental approach, services are down)
  • default runlevel -> restart all services

Question is, does the ext3 filesystem stay sane on the external drive in case of Option A? Is it safe to disconnect the drive while filesystem is mounted read-only?

How different is it from cleanly unmounting the filesystem first; will there be a recovery run on next mount? This is a rootfs, which is why I cannot cleanly unmount it.

share|improve this question

First, if you mount a FS read-only, it will not be modified.

Second, for your backup problem you might want to look at LVM and its snapshot feature which allows you to shutdown services (if necessary), make the snapshot, restart the service and make a file level backup from the snaphshot and delete the snapshot after the backup has finished. Your approach in Option A is highly unusual.

share|improve this answer
Yes, "unusual" is probably true but aside from that, I guess I should be more accurate in the question: disconnecting hardware with filesystem still mounted, although RO vs completely unmounting filesystem before disconnecting hardware: is there a difference? This is a rootfs, so I cannot completely unmount filesystem. Other than that, I did build the system on top of LVM so that approach is also doable here. – lkraav Jan 10 '12 at 22:13

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.