Путеводитель по Руководству Linux

  User  |  Syst  |  Libr  |  Device  |  Files  |  Other  |  Admin  |  Head  |



   mdadm    ( 8 )

управлять MD-устройствами, также известными как Linux Software RAID (manage MD devices aka Linux Software RAID)

For Misc mode:

-Q, --query
              Examine a device to see (1) if it is an md device and (2)
              if it is a component of an md array.  Information about
              what is discovered is presented.

-D, --detail Print details of one or more md devices.

--detail-platform Print details of the platform's RAID capabilities (firmware / hardware topology) for a given metadata format. If used without argument, mdadm will scan all controllers looking for their capabilities. Otherwise, mdadm will only look at the controller specified by the argument in form of an absolute filepath or a link, e.g. /sys/devices/pci0000:00/0000:00:1f.2.

-Y, --export When used with --detail, --detail-platform, --examine, or --incremental output will be formatted as key=value pairs for easy import into the environment.

With --incremental The value MD_STARTED indicates whether an array was started (yes) or not, which may include a reason (unsafe, nothing, no). Also the value MD_FOREIGN indicates if the array is expected on this host (no), or seems to be from elsewhere (yes).

-E, --examine Print contents of the metadata stored on the named device(s). Note the contrast between --examine and --detail. --examine applies to devices which are components of an array, while --detail applies to a whole array which is currently active.

--sparc2.2 If an array was created on a SPARC machine with a 2.2 Linux kernel patched with RAID support, the superblock will have been created incorrectly, or at least incompatibly with 2.4 and later kernels. Using the --sparc2.2 flag with --examine will fix the superblock before displaying it. If this appears to do the right thing, then the array can be successfully assembled using --assemble --update=sparc2.2.

-X, --examine-bitmap Report information about a bitmap file. The argument is either an external bitmap file or an array component in case of an internal bitmap. Note that running this on an array device (e.g. /dev/md0) does not report the bitmap for that array.

--examine-badblocks List the bad-blocks recorded for the device, if a bad- blocks list has been configured. Currently only 1.x and IMSM metadata support bad-blocks lists.

--dump=directory

--restore=directory Save metadata from lists devices, or restore metadata to listed devices.

-R, --run start a partially assembled array. If --assemble did not find enough devices to fully start the array, it might leaving it partially assembled. If you wish, you can then use --run to start the array in degraded mode.

-S, --stop deactivate array, releasing all resources.

-o, --readonly mark array as readonly.

-w, --readwrite mark array as readwrite.

--zero-superblock If the device contains a valid md superblock, the block is overwritten with zeros. With --force the block where the superblock would be is overwritten even if it doesn't appear to be valid.

Note: Be careful to call --zero-superblock with clustered raid, make sure array isn't used or assembled in other cluster node before execute it.

--kill-subarray= If the device is a container and the argument to --kill-subarray specifies an inactive subarray in the container, then the subarray is deleted. Deleting all subarrays will leave an 'empty-container' or spare superblock on the drives. See --zero-superblock for completely removing a superblock. Note that some formats depend on the subarray index for generating a UUID, this command will fail if it would change the UUID of an active subarray.

--update-subarray= If the device is a container and the argument to --update-subarray specifies a subarray in the container, then attempt to update the given superblock field in the subarray. See below in MISC MODE for details.

-t, --test When used with --detail, the exit status of mdadm is set to reflect the status of the device. See below in MISC MODE for details.

-W, --wait For each md device given, wait for any resync, recovery, or reshape activity to finish before returning. mdadm will return with success if it actually waited for every device listed, otherwise it will return failure.

--wait-clean For each md device given, or each device in /proc/mdstat if --scan is given, arrange for the array to be marked clean as soon as possible. mdadm will return with success if the array uses external metadata and we successfully waited. For native arrays this returns immediately as the kernel handles dirty-clean transitions at shutdown. No action is taken if safe-mode handling is disabled.

--action= Set the "sync_action" for all md devices given to one of idle, frozen, check, repair. Setting to idle will abort any currently running action though some actions will automatically restart. Setting to frozen will abort any current action and ensure no other action starts automatically.

Details of check and repair can be found it md(4) under SCRUBBING AND MISMATCHES.