Editing dhcpd.conf without corrupting leases
Simon Hobson
dhcp1 at thehobsons.co.uk
Tue Apr 14 16:07:23 UTC 2009
Randall C Grimshaw wrote:
>Under the possibility that it might be buffers in his environment,
>could a solution be as simple as issuing a 'sync' command before
>restarting?
No. The disk buffers are transparent to applications - when you read
a file, you will automatically be given data from the write cache for
anything not yet committed to disk.
As I read it, the problem is that the application is terminated part
way through writing out a record - so the bit that's missing never
existed and so cannot be committed to disk with a sync call.
It would appear that the only way to fix this is to modify the
program so that it will never quit part way through an update. Either
by building up the record and writing it with one atomic call, or by
deferring any quit instruction until the record is complete.
--
Simon Hobson
Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed
author Gladys Hobson. Novels - poetry - short stories - ideal as
Christmas stocking fillers. Some available as e-books.
More information about the dhcp-users
mailing list