SHARE
TWEET

hubertf

a guest Aug 15th, 2008 363 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. WAPBL(4)                 BSD Kernel Interfaces Manual                 WAPBL(4)
  2.  
  3. NAME
  4.      WAPBL -- Write Ahead Physical Block Logging file system journaling
  5.  
  6. SYNOPSIS
  7.      options WAPBL
  8.      options WAPBL_DEBUG
  9.      options WAPBL_DEBUG_SERIALIZE
  10.  
  11. DESCRIPTION
  12.      The WAPBL driver provides meta-data journaling for file systems.  In par-
  13.      ticular, it is used with the fast file system (FFS) to provide rapid file
  14.      system consistency checking after a system outage.  It also provides bet-
  15.      ter general-use performance over regular FFS.
  16.  
  17.      WAPBL currently maintains its journal in one of two locations:
  18.  
  19.      - After the file system
  20.              The journal is placed in the same partition as the file system,
  21.              but between the file system and the end of the partition.
  22.  
  23.      - Within the file system
  24.              The journal is allocated as a special contiguous file within the
  25.              file system.  The journal file is not visible via normal file
  26.              system access.
  27.  
  28.      A new journal is created automatically when a file system is mounted via
  29.      mount(8) with the -o log option.  If no journal size has been specified
  30.      with tunefs(8), then the size of the journal will be based on 1MB of
  31.      journal per 1GB of file system, to a maximum journal size of 64MB.
  32.  
  33.      If there is adequate space between the end of the the file system and the
  34.      end of the partition, then unless the journal size has been specified
  35.      with tunefs(8) then the journal will be created after the file system.
  36.      To obtain space between the file system and the end of the partition the
  37.      size of the partition can be adjusted using disklabel(8).  Care must be
  38.      taken not to damage existing data on existing partitions, but this method
  39.      will work well if, for example, a swap partition can be shrunk in order
  40.      to accommodate the journal after the file system on a partition before
  41.      the swap partition.
  42.  
  43.      For a new file system,
  44.  
  45.            newfs -s -64m /dev/rwd0a
  46.  
  47.      can be used to leave space for a 64MB journal at the end of /dev/rwd0a.
  48.  
  49.      To specify the size of the journal within the file system tunefs(8) can
  50.      be used as follows:
  51.  
  52.            tunefs -l 64m /dev/rwd0a
  53.  
  54.      to indicate that a journal of size 64MB on the file system on /dev/rwd0a
  55.      should be created the next time that file system is mounted.  This must
  56.      be done before the file system is mounted with the ``-o log'' option.
  57.      For existing file systems and general use, however, simply using
  58.  
  59.            mount -o log /dev/rwd0a /mnt
  60.  
  61.      will be sufficient to create an appropriate journal within the file sys-
  62.      tem.  Running
  63.  
  64.            tunefs -l 0 /dev/rwd0a
  65.  
  66.      will schedule the log for removal on the next read-write mount, and run-
  67.      ning
  68.  
  69.            tunefs -l 0 /dev/rwd0a
  70.  
  71.      followed by
  72.  
  73.            mount -o log /dev/rwd0a /mnt
  74.  
  75.      will remove the log and then re-create it with the default size.  This
  76.      method can also be used to grow or shrink the size of the journal.
  77.  
  78.      With the journal, fsck(8) is no longer required at system boot.  If the
  79.      system has been shutdown in an unclean fashion then the journal will be
  80.      replayed when the file system is mounted.  fsck(8) can still be used to
  81.      force a consistency check of the file system should that be desired.
  82.  
  83.      WAPBL(8) has a number of debugging options.  The option
  84.  
  85.            options WAPBL_DEBUG
  86.  
  87.      turns on general debugging.  The option
  88.  
  89.            options WAPBL_DEBUG_SERIALIZE
  90.  
  91.      forces the serialization of all IO.  This is currently be used to help
  92.      alleviate a performance issue seen on multi-core machines, where multiple
  93.      simultaneous extractions of tar-files can cause degenerate performance.
  94.  
  95. SEE ALSO
  96.      config(1), fsck(8), newfs(8), mount(8), umount(8)
  97.  
  98. CAVEATS
  99.      An unreplayed WAPBL journal (eg after a crash or power failure) may cause
  100.      problems if the file system is then used with an older kernel or userland
  101.      what isn't WAPBL aware.
  102.  
  103.      An older fsck(8) that isn't WAPBL aware will not be able to deal with an
  104.      in-filesystem log.
  105.  
  106.      WAPBL requires the super block to be in the UFS2 format.  Older FFSv1
  107.      file systems will need to be updated to the newer super block layout with
  108.      the -c option to fsck_ffs(8).
  109.  
  110.      fsync(2) causes the journal to be committed to disk, resulting in non-
  111.      negligible performance issues.  This can have an impact on database soft-
  112.      ware and other software that calls fsync(2) often.
  113.  
  114.      File system snapshots (fss(4)) currently do not work with WAPBL.
  115.  
  116.      There are some pending issues with high metadata-rate workloads (like
  117.      multiple simultaneous tar-file extractions) resulting in degenerate file
  118.      system performance.  The current work-around is to use
  119.  
  120.            options WAPBL_DEBUG_SERIALIZE
  121.  
  122.      as mentioned above.
  123.  
  124.      In-file system log allocation should be done on a relatively quiet file
  125.      system.  The error path for log allocation failures could result in a
  126.      ``dangling inode'' issue, requiring an fsck(8) to fix.
  127.  
  128.      If the file system is full or close to full then making a journal can
  129.      fail.
  130.  
  131. HISTORY
  132.      WAPBL was originally written by Darrin B. Jewell while at Wasabi Systems
  133.      Inc.  Wasabi Systems contributed the code to NetBSD and was integrated by
  134.      Simon Burge, Antti Kantee, Andy Doran, and Greg Oster.
  135.  
  136.      WAPBL first appeared in NetBSD 5.0.
  137.  
  138. BSD                              July 21, 2008                             BSD
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top