~brightbox/ubuntu/raring/lvm2/fix-for-1076304

« back to all changes in this revision

Viewing changes to doc/kernel/raid.txt

  • Committer: Package Import Robot
  • Author(s): Dmitrijs Ledkovs
  • Date: 2012-08-14 14:35:57 UTC
  • mfrom: (3.1.25 sid)
  • Revision ID: package-import@ubuntu.com-20120814143557-93aill2tp3kf3o30
Tags: 2.02.95-4ubuntu1
* Merge from Debian unstable, remaining changes:
  - debian/patches/avoid-dev-block.patch: Prefer any other device name over
    names in /dev/block/ since lvm.conf won't handle this.
  - debian/rules:
    - copy .po file to .pot file for Rosetta (Ubuntu specific).
  - debian/{dmsetup,lvm2}-udeb.install:
    - install initramfs and udev hooks in udebs (Debian bug 504341).
  - auto-start VGs as their PVs are discovered (Ubuntu specific):
    - add debian/tree/lvm2/lib/udev/rules.d/85-lvm2.rules: use watershed plus
      the sledgehammer of vgscan/vgchange to turn on VGs as they come online.
    - debian/tree/lvm2/usr/share/initramfs-tools/scripts/hooks/lvm2:
      - add 85-lvm2.rules to the list of udev rules to copy.
      - depend on udev.
    - debian/control:
      - add versioned Depend on watershed in lvm2 for udev rules.
      - add Depends on watershed-udeb in lvm2-udeb for udev rules.
      - add versioned Depend/Breaks on udev in dmsetup for udev rules.
      - add Depend on initramfs-tools in dmsetup so system is not potentially
        rendered unbootable by out-of-order dpkg configuration.
    - debian/rules:
      - do not install local-top scripts since Ubuntu mounts root using udev.
      - do not install init scripts for lvm2, since udev starts LVM.
    - debian/lvm2.postinst: handle missing lvm2 init script.
    - debian/tree/dmsetup/lib/udev/rules.d/60-persistent-storage-dm.rules:
      watch dm devices for changes with inotify
  - add mountroot failure hooks to help fix bad boots (Debian bug 468115):
    - debian/tree/lvm2/usr/share/initramfs-tools/scripts/init-premount/lvm2
  - remaining changes to upstream event manager packages (Debian bug 514706):
    - debian/rules:
      - enable dmeventd during configure.
    - debian/dmeventd.{8,manpages}: install dmeventd files.
  - rename debian/clvm.defaults to debian/clvm.default so it is installed
    correctly.
  - debian/control: add dmsetup-udeb to libdevmapper1.02.1-udeb recommends.
  - debian/rules: make sure dmsetup and lvm2 initramfs-tools scripts are
    executable.  When the Ubuntu-specific ones are added with a patch,
    they may lose their executable bit.
  - Add and install clvmd resource agent
  - Add dependency on libudev-dev to libdevmapper-dev so that the .pc file
    works.
  - debian/{clvmd.ra,clvm.init}:
    - create /run/lvm if it doesn't exist.
  - debian/clvm.init:
    - exit 3 if not running on status action.
  - Call dh_installman so that our dmeventd manpage actually gets installed
  - Install the missing fsadm manpage.

 * libdevmapper-dev:
  - move .so symlinks and pkgconfig files to multiarched locations.
  - mark libdevmapper-dev M-A: same

 * libdevmapper-event1.02.1:
  - Add Breaks: dmeventd (<< 2.02.95-4ubuntu1) due to debian symbol rename

 * debian/lvm2.{preinst,postinst,postrm}:
  - Implement removal of obsolete /etc/init.d/lvm2 conffile, which
    should not have been re-introduced in Quantal.

 * Dropped Changes, included in Debian:
  - Mostly included packages for upstream event manager (Debian bug 514706).
  - debian/patches/rules-subdir.patch: removed as reordering will cause
    build failure with dmeventd.
  - debian/patches/libdm-event-static.patch: removed as other static libs
    aren't being built anymore either.
  - Update symbols for libdevmapper-event.
  - Update libdevmapper-event, dmeventd descriptions to match Debian
    boilerplate.

 * Disappeared Changes:
  - Don't install documentation in udebs. No diff found, but no docs are
    installed into udebs either.

 * Resurected Changes:
  - corrected dropping the wrong init script. Now clvm.init is shipped
    and lvm2.init is dropped in favor of udev rules as per original
    intention (LP: #1037033).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
dm-raid
 
2
-------
 
3
 
 
4
The device-mapper RAID (dm-raid) target provides a bridge from DM to MD.
 
5
It allows the MD RAID drivers to be accessed using a device-mapper
 
6
interface.
 
7
 
 
8
The target is named "raid" and it accepts the following parameters:
 
9
 
 
10
  <raid_type> <#raid_params> <raid_params> \
 
11
    <#raid_devs> <metadata_dev0> <dev0> [.. <metadata_devN> <devN>]
 
12
 
 
13
<raid_type>:
 
14
  raid1         RAID1 mirroring
 
15
  raid4         RAID4 dedicated parity disk
 
16
  raid5_la      RAID5 left asymmetric
 
17
                - rotating parity 0 with data continuation
 
18
  raid5_ra      RAID5 right asymmetric
 
19
                - rotating parity N with data continuation
 
20
  raid5_ls      RAID5 left symmetric
 
21
                - rotating parity 0 with data restart
 
22
  raid5_rs      RAID5 right symmetric
 
23
                - rotating parity N with data restart
 
24
  raid6_zr      RAID6 zero restart
 
25
                - rotating parity zero (left-to-right) with data restart
 
26
  raid6_nr      RAID6 N restart
 
27
                - rotating parity N (right-to-left) with data restart
 
28
  raid6_nc      RAID6 N continue
 
29
                - rotating parity N (right-to-left) with data continuation
 
30
 
 
31
  Refererence: Chapter 4 of
 
32
  http://www.snia.org/sites/default/files/SNIA_DDF_Technical_Position_v2.0.pdf
 
33
 
 
34
<#raid_params>: The number of parameters that follow.
 
35
 
 
36
<raid_params> consists of
 
37
    Mandatory parameters:
 
38
        <chunk_size>: Chunk size in sectors.  This parameter is often known as
 
39
                      "stripe size".  It is the only mandatory parameter and
 
40
                      is placed first.
 
41
 
 
42
    followed by optional parameters (in any order):
 
43
        [sync|nosync]   Force or prevent RAID initialization.
 
44
 
 
45
        [rebuild <idx>] Rebuild drive number idx (first drive is 0).
 
46
 
 
47
        [daemon_sleep <ms>]
 
48
                Interval between runs of the bitmap daemon that
 
49
                clear bits.  A longer interval means less bitmap I/O but
 
50
                resyncing after a failure is likely to take longer.
 
51
 
 
52
        [min_recovery_rate <kB/sec/disk>]  Throttle RAID initialization
 
53
        [max_recovery_rate <kB/sec/disk>]  Throttle RAID initialization
 
54
        [write_mostly <idx>]               Drive index is write-mostly
 
55
        [max_write_behind <sectors>]       See '-write-behind=' (man mdadm)
 
56
        [stripe_cache <sectors>]           Stripe cache size (higher RAIDs only)
 
57
        [region_size <sectors>]
 
58
                The region_size multiplied by the number of regions is the
 
59
                logical size of the array.  The bitmap records the device
 
60
                synchronisation state for each region.
 
61
 
 
62
<#raid_devs>: The number of devices composing the array.
 
63
        Each device consists of two entries.  The first is the device
 
64
        containing the metadata (if any); the second is the one containing the
 
65
        data.
 
66
 
 
67
        If a drive has failed or is missing at creation time, a '-' can be
 
68
        given for both the metadata and data drives for a given position.
 
69
 
 
70
 
 
71
Example tables
 
72
--------------
 
73
# RAID4 - 4 data drives, 1 parity (no metadata devices)
 
74
# No metadata devices specified to hold superblock/bitmap info
 
75
# Chunk size of 1MiB
 
76
# (Lines separated for easy reading)
 
77
 
 
78
0 1960893648 raid \
 
79
        raid4 1 2048 \
 
80
        5 - 8:17 - 8:33 - 8:49 - 8:65 - 8:81
 
81
 
 
82
# RAID4 - 4 data drives, 1 parity (with metadata devices)
 
83
# Chunk size of 1MiB, force RAID initialization,
 
84
#       min recovery rate at 20 kiB/sec/disk
 
85
 
 
86
0 1960893648 raid \
 
87
        raid4 4 2048 sync min_recovery_rate 20 \
 
88
        5 8:17 8:18 8:33 8:34 8:49 8:50 8:65 8:66 8:81 8:82
 
89
 
 
90
'dmsetup table' displays the table used to construct the mapping.
 
91
The optional parameters are always printed in the order listed
 
92
above with "sync" or "nosync" always output ahead of the other
 
93
arguments, regardless of the order used when originally loading the table.
 
94
Arguments that can be repeated are ordered by value.
 
95
 
 
96
'dmsetup status' yields information on the state and health of the
 
97
array.
 
98
The output is as follows:
 
99
1: <s> <l> raid \
 
100
2:      <raid_type> <#devices> <1 health char for each dev> <resync_ratio>
 
101
 
 
102
Line 1 is the standard output produced by device-mapper.
 
103
Line 2 is produced by the raid target, and best explained by example:
 
104
        0 1960893648 raid raid4 5 AAAAA 2/490221568
 
105
Here we can see the RAID type is raid4, there are 5 devices - all of
 
106
which are 'A'live, and the array is 2/490221568 complete with recovery.
 
107
Faulty or missing devices are marked 'D'.  Devices that are out-of-sync
 
108
are marked 'a'.