|
|
|
Re: How to use replacement? | |
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
|
On Mon, 4 Jun 2012 14:34:28 +0800 majianpeng <majianpeng@xxxxxxxxx> wrote:
> >On Mon, 4 Jun 2012 09:53:21 +0800 majianpeng <majianpeng@xxxxxxxxx> wrote:
> >
> >> Hi:
> >> At present, md is supporting replacement.
> >> In function: state_store()
> >> > } else if (cmd_match(buf, "replacement")) {
> >> > /* Can only set a device as a replacement when array has not
> >> > * yet been started. Once running, replacement is automatic
> >> > * from spares, or by assigning 'slot'.
> >> > */
> >> I can using spare disk.But how to use slot?
> >
> >If you want to ensure that a particular device becomes a replacement for a
> >particular other device, then
> > cd /sys/block/mdX/md
> > echo frozen > sync_action
> > echo NN:MM > new_dev # where NN is major and MM is minor of new device
>
> If the array had a persistent superblock, the operation returned error.
> The message like:
> [ 262.934070] md: sde does not have a valid v1.2 superblock, not importing!
> How can do it ?
>
You need to write a superblock out to the device first.
mdadm already does this when adding a spare to an array, and it is
a similar operation.
NeilBrown
Attachment:
signature.asc
Description: PGP signature
![]() |
![]() |