[DRBD-user] syncing to disk
Scott Beck
sbeck at gossamer-threads.com
Wed Mar 9 22:06:38 CET 2005
Hey All,
I did some reading and some more tests with this. If you look in the
linux kernel documentation linux/Documentation/filesystems/proc.txt it
explains the settings for how syncing to disk works in linux. There is a
pdflush daemon which wakes up every so often to sync data which is old
enough to be synced to disk. How often this wakes up is configurable
via /proc/sys/vm/dirty_expire_centisecs and on my system (2.6.10 kernel)
defaults to 30 seconds. How old the data needs to be before it is synced
to disk is configurable via /proc/sys/vm/dirty_writeback_centisecs and
on my system defaults to 5 seconds.
This means within 35 seconds of writing data to disk it _will_ be
written to disk according to the kernel docs and the setting on my
system.
This does not happen when using drbd and I think it is may be a problem
with the syncing code.
I did another test with a drbd partition. In this test I copied the
linux kernel onto the drbd partition and then I ran `sync` (which should
make pdflush to wake up and flush all data to all disks). I did hear the
disk writing after I ran this. I then unplugged the system. After it
boots up again I am missing 54 files from that linux kernel I copied, a
total of 2k of data.
This is with drbd version 0.7.9, linux kernel 2.6.10.
This was on a scsi machine Adaptec AIC-7902 controller with dual Opteron
242.
Cheers,
Scott
--
-------------------- Gossamer Threads Inc. ----------------------
Scott Beck Email: scott at gossamer-threads.com
Lead Software Developer Phone: (604) 687-5804
http://www.gossamer-threads.com Fax: (604) 687-5806
More information about the drbd-user
mailing list