X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=Documentation%2Fmd.txt;h=e2b536992a2798ccaf32133f9d6ed08879a6778d;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=203231307a2606ce39b4e5c97a82319582a085d1;hpb=5273a3df6485dc2ad6aa7ddd441b9a21970f003b;p=linux-2.6.git diff --git a/Documentation/md.txt b/Documentation/md.txt index 203231307..e2b536992 100644 --- a/Documentation/md.txt +++ b/Documentation/md.txt @@ -2,6 +2,8 @@ Tools that manage md devices can be found at http://www..kernel.org/pub/linux/utils/raid/.... +Boot time assembly of RAID arrays +--------------------------------- You can boot with your md device with the following kernel command lines: @@ -11,6 +13,8 @@ for old raid arrays without persistent superblocks: for raid arrays with persistent superblocks md=,dev0,dev1,...,devn +or, to assemble a partitionable array: + md=d,dev0,dev1,...,devn md device no. = the number of the md device ... 0 means md0, @@ -34,15 +38,31 @@ A possible loadlin line (Harald Hoyer ) looks like this: e:\loadlin\loadlin e:\zimage root=/dev/md0 md=0,0,4,0,/dev/hdb2,/dev/hdc3 ro -------------------------------- + +Boot time autodetection of RAID arrays +-------------------------------------- + +When md is compiled into the kernel (not as module), partitions of +type 0xfd are scanned and automatically assembled into RAID arrays. +This autodetection may be suppressed with the kernel parameter +"raid=noautodetect". As of kernel 2.6.9, only drives with a type 0 +superblock can be autodetected and run at boot time. + +The kernel parameter "raid=partitionable" (or "raid=part") means +that all auto-detected arrays are assembled as partitionable. + + +Superblock formats +------------------ + The md driver can support a variety of different superblock formats. -(It doesn't yet, but it can) +Currently, it supports superblock formats "0.90.0" and the "md-1" format +introduced in the 2.5 development series. -The kernel does *NOT* autodetect which format superblock is being -used. It must be told. +The kernel will autodetect which format superblock is being used. Superblock format '0' is treated differently to others for legacy -reasons. +reasons - it is the original superblock format. General Rules - apply for all superblock formats @@ -50,6 +70,7 @@ General Rules - apply for all superblock formats An array is 'created' by writing appropriate superblocks to all devices. + It is 'assembled' by associating each of these devices with an particular md virtual device. Once it is completely assembled, it can be accessed. @@ -57,10 +78,10 @@ be accessed. An array should be created by a user-space tool. This will write superblocks to all devices. It will usually mark the array as 'unclean', or with some devices missing so that the kernel md driver -can create approrpriate redundancy (copying in raid1, parity +can create appropriate redundancy (copying in raid1, parity calculation in raid4/5). -When an array is assembled, it is first initialised with the +When an array is assembled, it is first initialized with the SET_ARRAY_INFO ioctl. This contains, in particular, a major and minor version number. The major version number selects which superblock format is to be used. The minor number might be used to tune handling @@ -82,15 +103,16 @@ array using HOT_REMOVE_DISK. Specific Rules that apply to format-0 super block arrays, and - arrays with no superblock (non-presistant). + arrays with no superblock (non-persistent). ------------------------------------------------------------- An array can be 'created' by describing the array (level, chunksize etc) in a SET_ARRAY_INFO ioctl. This must has major_version==0 and raid_disks != 0. -Then uninitialised devices can be added with ADD_NEW_DISK. The + +Then uninitialized devices can be added with ADD_NEW_DISK. The structure passed to ADD_NEW_DISK must specify the state of the device and it's role in the array. -One started with RUN_ARRAY, uninitialised spares can be added with +Once started with RUN_ARRAY, uninitialized spares can be added with HOT_ADD_DISK.