[Date Prev][Date Next] [Chronological] [Thread] [Top]

RE: Question on Sleepycat docs re: pagesize cautions

> -----Original Message-----
> From: owner-openldap-software@OpenLDAP.org
> [mailto:owner-openldap-software@OpenLDAP.org]On Behalf Of Allan Streib

> It does not appear to me that "set_pagesize" is one of the
> options that
> can appear in DB_CONFIG (it's not a DB_ENV method) so I'm
> assuming that my
> ext3 filesystem pagesize of 4096 will be used, and that the cautionary
> statement "In the case of a hot backup, the utility you use
> to copy the
> databases must read database pages atomically" found in
> "Database log file
> archival"[3] does not need to concern me if I use cp to archive my
> database files? Or should I use "dd bs=4096" to be safe?

The back-bdb code sets explicit page sizes, independent of the underlying
filesystem's page size. The default is 4K for most files, with 16K for the
id2entry database. You can override these values at compile time, see
back-bdb.h (look for PAGESIZE)...

It's probably easier to do a hot backup using slapcat. Maybe db_dump/db_load
is OK too, but I wouldn't use cp or dd since they'll miss data in the BDB
cache that hasn't been checkpointed.

  -- Howard Chu
  Chief Architect, Symas Corp.       Director, Highland Sun
  http://www.symas.com               http://highlandsun.com/hyc
  Symas: Premier OpenSource Development and Support